#725978 /usr/lib/udisks2/udisksd: Doesn't event on CD/DVD media insertion

Package:
udisks2
Source:
udisks2
Description:
D-Bus service to access and manipulate storage devices
Submitter:
Colomban Wendling
Date:
2026-11-13 13:21:01 UTC
Severity:
important
#725978#5
Date:
2013-10-10 15:05:19 UTC
From:
To:
Dear Maintainer,

Since the upgrade from udisks to udisks2, events for CD/DVD media
insertion aren't emitted any more, leading to desktop relying on it not
to automount/autodetect CDs or DVDs.

Simply trying to interact with the media triggers some event and is
then enough, like playing using MPlayer, or using lsdvd.  Also, if
udisks (1)'s daemon is running, it also makes udisks2's one work.

In practice, /usr/lib/udisks2/udisksd doesn't report any event on
CD/DVD media insertion.  /usr/lib/udisks/udisks-daemon does.


/usr/lib/udisks/udisks-daemon output when inserting a media:
	**** CHANGING /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** UPDATING /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** CHANGED /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** CHANGING /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** UPDATING /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** CHANGED /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** /proc/self/mountinfo changed
	**** MOUNTED /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** CHANGING /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** UPDATING /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0
	**** CHANGED /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0

/usr/lib/udisks2/udisksd output when /usr/lib/udisks/udisks-daemon is
also running:
	16:55:20.914:[5587]:[DEBUG]: uevent change /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0 [udiskslinuxprovider.c:902, udisks_linux_provider_handle_uevent()]
	16:55:20.915:[5592]:[INFO]: Cleanup check start [udisksstate.c:419, udisks_state_check_in_thread()]
	16:55:20.915:[5592]:[INFO]: Cleanup check end [udisksstate.c:457, udisks_state_check_in_thread()]
	16:55:27.562:[5587]:[DEBUG]: uevent change /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0 [udiskslinuxprovider.c:902, udisks_linux_provider_handle_uevent()]
	16:55:27.564:[5592]:[INFO]: Cleanup check start [udisksstate.c:419, udisks_state_check_in_thread()]
	16:55:27.564:[5592]:[INFO]: Cleanup check end [udisksstate.c:457, udisks_state_check_in_thread()]
	16:55:27.887:[5774]:[NOTICE]: Mounted /dev/sr0 (system) at /media/cdrom0 on behalf of uid 1000 [udiskslinuxfilesystem.c:1326, handle_mount()]

/usr/lib/udisks2/udisksd output after lsdvd-ing the device, without
/usr/lib/udisks/udisks-daemon running:
	16:57:36.323:[5587]:[DEBUG]: uevent change /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:1/2:0:1:0/block/sr0 [udiskslinuxprovider.c:902, udisks_linux_provider_handle_uevent()]
	16:57:36.325:[5592]:[INFO]: Cleanup check start [udisksstate.c:419, udisks_state_check_in_thread()]
	16:57:36.325:[5592]:[INFO]: Cleanup check end [udisksstate.c:457, udisks_state_check_in_thread()]
	16:57:36.666:[5829]:[NOTICE]: Mounted /dev/sr0 (system) at /media/cdrom0 on behalf of uid 1000 [udiskslinuxfilesystem.c:1326, handle_mount()]

And of course, when /usr/lib/udisks/udisks-daemon isn't running and not
touching the drive in anyway, /usr/lib/udisks2/udisksd doesn't trigger
any event so doesn't output anything.


Anyway, in practice it has a major effect on common desktops usability
by not reacting on CD/DVD media insertion.

FTR, using udev 175-7.2 doesn't change anything.


Regards,
Colomban

#725978#10
Date:
2013-10-10 16:01:06 UTC
From:
To:
Am 10.10.2013 17:05, schrieb Colomban Wendling:

udisks2 no longer does any media polling itself, but relies on the
kernel afaik. If the kernel doesn't generate any uevents on media
changes, this is where you should be investigating.

FWIW, it works nicely here, so this might be hardware / driver specific.


Michael

#725978#15
Date:
2013-10-10 18:40:40 UTC
From:
To:
Le 10/10/2013 18:01, Michael Biebl a écrit :

Good for it.

Apparently there is indeed no other event than tray open/tray close.  I
have no idea if there should be more though.

And I'm sorry, I spent enough time finding out udisks2 was the reason
why it stopped working, and then finding out how I could listen to
uevents myself;  I probably won't try to guess where could be the next
issue and what could maybe, perhaps, help on it.  I'm sorry I'm not a
kernel hacker.  I'd be happy to test ideas though.

Anyway, I'm afraid that if udisks2 doesn't work properly with Linux
3.10's sr_mod driver (or event half of the devices it handles), we're
going to have all kinds of problems.  Even if the driver gets "fixed" in
say, Linux 3.12, it'd still be broken for many a setup.

BTW, I have other machines with sr_mod-driven drives, but they don't run
unstable.  Maybe if nothing moves here I could try to put unstable on a
disc corner, but that's unlikely to happen too soon, sorry.

Colomban

#725978#20
Date:
2013-10-10 19:32:22 UTC
From:
To:
Le 10/10/2013 20:40, Colomban Wendling a écrit :

I just tested the uevent listener on a Stable install with another
machine with a sr_mod-driven drive, and without udisks 1 daemon there is
*no* events at all for the CD/DVD drive, so this would be broken here too.

Regards,
Colomban

#725978#25
Date:
2013-11-28 06:41:03 UTC
From:
To:
I encountered the same problem after upgrading to KDE-4.11, which needed
udisks2: no automount after inserting CD/DVD media -- a serious drawback.

After hours of searching the Internet, I could fix the issue only with udevil,
which worked like a charm but, sadly, hasn't come to Debian's repositories
yet.

#725978#30
Date:
2013-11-29 17:38:15 UTC
From:
To:
The same, obviously, not only in Unstable but in Testing too
with latest updates...

#725978#35
Date:
2013-11-30 15:11:46 UTC
From:
To:
I have the same problem. When a CD/DVD is inserted, nothing is happend.
My system is Debian testing with 3.11-2-686-pae.
And now, what can I do to mount my drive?

#725978#40
Date:
2013-11-30 15:26:11 UTC
From:
To:
@jerigondor
You could use udevil with its devmon. See
http://ignorantguru.github.io/udevil/ and
http://igurublog.wordpress.com/downloads/script-devmon/ if you don't want to
wait until it comes to Debian. As I said before, it works seamlessly.

#725978#45
Date:
2013-11-30 17:37:57 UTC
From:
To:
Same for me.
I solved the problem by applying this patch [1].

With:

$ udevadm monitor

nothing happens if CD is inserted.
The event is activated when "System Settings -> "Permissions" (for K3B) is opened or
with the command:

$ udisks --enumerate

maybe with other commands related to udisks. After those operations, the event is
correctly generated and the CD is recognized by device notifier.

I tried with official repository kernel 3.2, 3.10, 3.11 & 3.12 . Same error.
I'm on KDE 4.11 and Jessie.

Thanks for your job.

[1] bugs.debian.org/cgi-bin/bugreport.cgi?bug=713877

#725978#50
Date:
2013-11-30 18:12:53 UTC
From:
To:
Thanks for the link. Kernel polling can also be enabled with this in
/etc/rc.local:

echo 2000 > /sys/module/block/parameters/events_dfl_poll_msecs


So, you still have udisks. The problem is that udisks2 has replaced it (udisks
can be removed now) and automount doesn't work.

#725978#55
Date:
2014-03-03 22:30:15 UTC
From:
To:
Dear Maintainer,


All optical medias were not being recognized and mounted automatically.
CD and DVD mainly. USB2.0 remained normal.
I have had some problems with USB3.0 but I do not think it's the same problem.

See the answers below:


   * What led up to the situation?

     => This problem started after an upgrade.
        The udisks package was removed and replaced by udisks2.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

     => I used the command: "udevadm trigger" or tried mounting manually.

   * What was the outcome of this action?

     => After the command "udevadm trigger":
        DVD and data CDrom were mounted but, audio CD was not mounted correctly.

   * What outcome did you expect instead?

     => I expected the same response from mounting dvd, data cd and audio CDs.
        I hope better integration with xfce4 and automatic mounting of optical media.



It may be a problem with one of the packages:
udev, udisks2 and / or thunar-volman.
I specified udisks2 because the problem started after updating.
I'm a basic, but enthusiastic user of debian.
Excuse my terrible english. I am Brazilian.

I use xfce4, thunar and vlc.

#725978#60
Date:
2014-03-04 10:45:55 UTC
From:
To:
Just a little more information.
In my case, with systemd, the problem disappears and changes in a udev rule (or
creating a new one in accordance with [1]) are no longer needed.

$ cat /etc/default/init
INIT="/lib/systemd/systemd"

I'm using Udisks2 + Jessie

Thanks

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713877

#725978#65
Date:
2014-03-23 10:06:23 UTC
From:
To:
Hi,

I found this bug report when trying to figure out why USB devices are
not showing up in the xfce4 file manager Thunar.

It seems that udisks2 is detecting the insertion of the media (according
to "udevadm monitor"), but it is missing some step that prevents gvfs
from seeing the file system.

As noted in http://forums.debian.net/viewtopic.php?t=104661 you can
"unblock" it by issuing some command (an invalid "mount" command did it
for me).

My problem was solved by the workaround suggested by Tsu Jan:

echo 2000 > /sys/module/block/parameters/events_dfl_poll_msecs

Best regards,

	Marko