README kernel polling instructions

This commit is contained in:
IgnorantGuru 2013-12-23 08:35:49 -07:00
parent 67ee58ebe8
commit 40b7f621ca

53
README
View File

@ -248,54 +248,59 @@ ENABLE KERNEL POLLING
doesn't report a change to the device, or udevil doesn't see a filesystem
on the device, this is a symptom that kernel polling is not enabled.
Kernel polling is a new feature of the Linux kernel and udev, so most
distros don't yet have it enabled. Even if you are using udisks, enabling
kernel polling is recommended to eliminate the need for udisks to do
userspace polling. Kernel polling also corrects a common issue where the
eject button on a drive won't respond with the newer udev.
Kernel polling is a newer feature of the Linux kernel and udev, so some
distros don't yet have it enabled by default. To use kernel polling,
your Linux kernel may need to be 2.6.38 or newer, and udev may need to
be version 173 or newer.
To use kernel polling, your Linux kernel may need to be 2.6.38 or newer,
and udev may need to be version 173 or newer.
TO DETERMINE IF KERNEL POLLING IS ENABLED, run these commands:
TO DETERMINE IF KERNEL POLLING IS ENABLED:
cat /sys/module/block/parameters/events_dfl_poll_msecs
cat /sys/block/sr0/events_poll_msecs
If you get 0 or -1 from those commands, then it's probably disabled.
If you get 0 or -1 from both of those commands, kernel polling may be
disabled.
TO ENABLE KERNEL POLLING PERMANENTLY (survives a reboot), add this command
to your /etc/rc.local file (anywhere before the 'exit' line in that file):
TO ENABLE KERNEL POLLING PERMANENTLY (survives a reboot), add the
following command to your /etc/rc.local file (anywhere before the
'exit' line in that file):
echo 2000 > /sys/module/block/parameters/events_dfl_poll_msecs
Any number between 2000 and 5000 (milliseconds) should be reasonable - the
higher 5000 means poll every 5 seconds, which is less overhead but a little
slower.
Any number between 2000 and 5000 (milliseconds) should be reasonable -
the higher 5000 means poll every 5 seconds, which is less overhead but
a little slower.
OR you can pass this option to the kernel boot command line in grub:
OR pass this option to the kernel boot command line in grub:
block.events_dfl_poll_msecs=2000
OR add a udev rule to enable kernel polling on removable devices:
TO ENABLE KERNEL POLLING TEMPORARILY, enable common polling for the block
module:
echo 'ACTION=="add", ATTR{removable}=="1", \
ATTR{events_poll_msecs}=="-1", ATTR{events_poll_msecs}="2000"' \
> /etc/udev/rules.d/61-removable-storage-polling.rules
A reboot will be required for the above changes to take effect, or...
TO ENABLE KERNEL POLLING TEMPORARILY AND IMMEDIATELY, enable common
polling for the block module:
sudo bash -c 'echo 2000 > /sys/module/block/parameters/events_dfl_poll_msecs'
OR you can enable polling just for a single device like this (/dev/sr0 in
this example):
OR you can enable polling just for a single device like this (/dev/sr0
in this example):
sudo bash -c 'echo 2000 > /sys/block/sr0/events_poll_msecs'
The change should be immediate - media will be detected and the eject
button on the drive should work normally again. However, the above changes
will be lost when you reboot.
This change should be immediate - media will be detected. However, the
above change will be lost when you reboot.
References:
http://www.mail-archive.com/lfs-dev@linuxfromscratch.org/msg15714.html
http://blogs.gentoo.org/mgorny/2011/06/20/uam-can-now-mount-cds-and-dvds/
https://bugs.archlinux.org/task/25609
http://unix.stackexchange.com/questions/38582/
UNINSTALL
@ -324,7 +329,7 @@ TRANSLATE
LICENSE
udevil - Copyright (C) 2013 GPL3+
udevil - Copyright (C) 2014 GPL3+
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the