Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 503536 - sys-fs/udev-208: Block devices don't appear because of disabled polling (?)
Summary: sys-fs/udev-208: Block devices don't appear because of disabled polling (?)
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-05 20:38 UTC by Roland Ramthun
Modified: 2023-09-18 01:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Ramthun 2014-03-05 20:38:11 UTC
On my stable amd64 system removable block devices (CD-ROM, SD card, et.c) don't appear for the kernel until I manually read data from the device node (e.g. by "cat /dev/sr0").

This means all automounting functions currently do not work for me.

The reason seems to be a value if 0 for the /sys/module/block/parameters/events_dfl_poll_msecs parameter. This setting is coming from /lib/udev/rules.d/60-persistent-storage.rules.

Setting the value of /sys/module/block/parameters/events_dfl_poll_msecs to e.g. 2000 fixes the problem and all removable media is recognized on insertion and the automounting mechanisms work again.

Is there a reason for disabling in-kernel polling via udev config or is this considered a bug?
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2014-03-05 20:57:47 UTC
Good question. Let's find out. Which kind of automounting do you mean? Like with sys-fs/udisks? Or something like autofs?
CONFIG_EPOLL=y missing from kernels config? emerge of sys-fs/udev complaining any other kernel setting is missing?
I see both 0 and 2000 in my 60-persistent-storage.rules for ATTR{parameters/events_dfl_poll_msecs}=
Comment 2 Roland Ramthun 2014-03-05 22:02:57 UTC
Hi Samuli, thanks for your fast response.

I use XFCE with thunar-volman for managing removable media. Technically it doesn't automount (all these options in thunar-volman are disabled), sorry for using this expression. The medium gets mounted when I click on the appropriate XFCE desktop icon for the SD card/CDROM/.... I have to admit I'm not sure how the full mechanism works, but I think it's udisks backed.

To be more precise, the problem symptom is the missing media icon. When I insert a CD virtually nothing happens on the desktop, in either the kernel messages or the syslog. Then I run "fdisk -l", "cat /dev/sr0" or something udisks related, e.g. "udisks --enumerate" and ~3 seconds later the media icon appears on the XFCE desktop (no mounting occurs, but that is wanted, configured behaviour).

CONFIG_EPOLL=y is set. udev emerge doesn't complain about my kernel config.

If I can provide more details I'll gladly do.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2014-03-06 06:24:51 UTC
Do you have cdrom in /etc/fstab? Is gnome-base/gvfs built with USE="gdu" or with USE="udisks"?
If it's built with USE="udev gdu", then entries in /etc/fstab should conflict with sys-fs/udisks:0 but if it's built with USE="udev udisks", then entries in /etc/fstab shouldn't matter for sys-fs/udisks:2.
In any case, if you have cdrom in fstab, remove it from there for a test.
Just covering the basics before we dug into deeper.
Comment 4 Roland Ramthun 2014-03-06 07:54:11 UTC
Good morning.

I'm using the default/linux/amd64/13.0/desktop profile and have no modifications regarding one of these three USE flags. This means gnome-base/gvfs-1.16.4 has USE="udisks udev -gdu" here.

My fstab has no entries for removable media, just the normal fixed hard drive.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2014-03-06 09:14:12 UTC
Can you pastebin the output of `udevadm test /sys/block/sr0` assuming sr0 is your cdrom? And `cat /sys/block/sr0/removable` is 0 or 1?
Comment 6 Roland Ramthun 2014-03-06 14:52:24 UTC
/dev/sr0 is indeed my optical drive.

The output of `udevadm test /sys/block/sr0` is
    without inserted medium: http://pastebin.com/UdgN0ByF
    with inserted medium: http://pastebin.com/r62uB8z1

Again the icon for the inserted medium didn't turn up until I ran `udevadm test /sys/block/sr0`.

cat /sys/block/sr0/removable is 1 in both conditions.
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2014-03-07 14:48:03 UTC
Is /usr/libexec/gvfs-udisks2-volume-monitor running? Is /usr/lib/udisks2/udisksd running?

Like,

ssuomin+  8245  0.0  0.0 264300  4884 ?        Sl   Feb21   0:02 /usr/libexec/gvfs-udisks2-volume-monitor
root      8248  0.0  0.0 417416  5376 ?        Sl   Feb21   2:10 /usr/lib/udisks2/udisksd --no-debug
Comment 8 Roland Ramthun 2014-03-07 15:14:04 UTC
They are both running.

roland@olifant ~ $ ps aux | grep -E "udisksd|gvfs-udisks2-volume-monitor"
roland    1386  0.0  0.0 207396  5416 ?        Sl   15:12   0:00 /usr/libexec/gvfs-udisks2-volume-monitor
root      1389  0.0  0.0 366204  7604 ?        Sl   15:12   0:00 /usr/lib/udisks2/udisksd --no-debug
Comment 9 Roland Ramthun 2014-03-15 15:38:51 UTC
Today I updated to the new stable sys-fs/udisks-2.1.3 and sys-fs/udisks-1.0.5, but unfortunately nothing changed.
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2014-05-11 10:42:46 UTC
I wonder if this is related to bug 461828
Comment 11 Roland Ramthun 2014-05-11 11:37:03 UTC
I'm not using genkernel, but I checked CONFIG_UEVENT_HELPER nevertheless. It is set to an empty string.

The software versions have updated with recent stabilizations, but the problem unfortunately persists.

I'm now on
sys-kernel/gentoo-sources-3.12.13:3.12.13
sys-fs/udisks-2.1.3:2
gnome-base/gvfs-1.18.3-r1
Comment 13 Mike Gilbert gentoo-dev 2023-09-18 01:10:28 UTC
Please file a new bug against sys-apps/systemd-utils if this is still an issue.