Bug 1594 - The device notifier is not aware that VLC can play audio CDs
Summary: The device notifier is not aware that VLC can play audio CDs
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 1
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Luc Menut
QA Contact:
URL: https://git.reviewboard.kde.org/r/102892
Whiteboard: affects Mageia 1 and Cauldron
Keywords: UPSTREAM
: 2928 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-05 11:40 CEST by Frédéric "LpSolit" Buclin
Modified: 2011-10-18 17:19 CEST (History)
8 users (show)

See Also:
Source RPM: kdelibs4-4.6.5
CVE:
Status comment:


Attachments
patch for vlc-opencda.desktop (407 bytes, patch)
2011-06-13 00:13 CEST, Frédéric "LpSolit" Buclin
Details | Diff

Description Frédéric "LpSolit" Buclin 2011-06-05 11:40:44 CEST
With Mandriva 2010.2, this problem was not happening. This is new to Mageia 1.

When inserting an audio CD in the tray, nothing is detected and no notification is displayed about a new media being available. But if I ask VLC to read the audio CD from /dev/cdrom, it plays the music correctly. In /etc/fstab, I can read:

 /dev/cdrom /media/cdrom auto umask=0,user,iocharset=utf8,noauto,ro 0 0

In /etc/fstab.old, I can read:

 /dev/cdrom /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0

I guess fstab.old is the configuration file from Mandriva 2010, based on its timestamp (Dec 22, 2009).
Comment 1 Sander Lepik 2011-06-05 11:50:27 CEST
Can you try to comment out that line and reboot? This line should not be needed at all.

CC: (none) => sander.lepik

Comment 2 Frédéric "LpSolit" Buclin 2011-06-05 12:06:08 CEST
(In reply to comment #1)
> Can you try to comment out that line and reboot? This line should not be needed
> at all.

Didn't help. :(
Comment 3 Frédéric "LpSolit" Buclin 2011-06-05 12:25:52 CEST
Editing /etc/fstab and adding

 /dev/sr1 /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0

to match what I had in Mandriva 2010.2 didn't help either.
Comment 4 Dave Hodgins 2011-06-06 00:48:35 CEST
Comment out the line, run "tail -f /var/log/syslog", insert an audio cd and
copy/paste the lines added to syslog as a result of the cd being inserted (if
any).

CC: (none) => davidwhodgins

Comment 5 Frédéric "LpSolit" Buclin 2011-06-06 00:54:06 CEST
(In reply to comment #4)
> Comment out the line, run "tail -f /var/log/syslog", insert an audio cd and
> copy/paste the lines added to syslog as a result of the cd being inserted (if
> any).

No lines added to syslog when inserting the CD.
Comment 6 Dave Hodgins 2011-06-06 01:22:43 CEST
Is haldaemon running?  Use "service haldaemon status" to check.
Comment 7 Frédéric "LpSolit" Buclin 2011-06-06 01:24:48 CEST
# service haldaemon status
hald (pid 888) est en cours d'exécution...

So yes. :)
Comment 8 Frédéric "LpSolit" Buclin 2011-06-06 01:26:39 CEST
If that matters: note that I have two DVD drives.
Comment 9 Dave Hodgins 2011-06-06 02:56:21 CEST
Can you post the output of "ps -C hald-addon-storage -o command" and the
contents of /etc/fstab?
Comment 10 Frédéric "LpSolit" Buclin 2011-06-06 20:23:01 CEST
$ ps -C hald-addon-storage -o command
COMMAND
hald-addon-storage: no polling on /dev/fd0 because it is explicitly disabled
hald-addon-storage: polling /dev/sr1 (every 2 sec)
hald-addon-storage: polling /dev/sr0 (every 2 sec)

And their corresponding entries in /etc/fstab:

/dev/sr1 /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
/dev/sr0 /media/cdrom2 auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
/dev/fd0 /media/floppy auto umask=0,users,iocharset=utf8,noauto,exec,flush 0 0
Comment 11 Dave Hodgins 2011-06-06 23:16:11 CEST
Remove the entries for /dev/sr0 an /dev/sr1 from fstab.  If they are there, that
guarantees that the device notifier will not be called.

Also remove the directories /media/cdrom and /media/cdrom2.  The mountpoints
are created/deleted by hal when the filesystems are mounted/unmounted.

After removing the entries/directories, in a terminal (konsole, etc), run (as
root) "udevadm monitor info", then insert the audio cd.  This will confirm
whether or not udev is getting the insertion event.
Comment 12 Frédéric "LpSolit" Buclin 2011-06-06 23:33:30 CEST
KERNEL[1307396009.673932] change   /devices/pci0000:00/0000:00:0e.0/host1/target1:0:0/1:0:0:0/block/sr0 (block)
UDEV  [1307396009.861625] change   /devices/pci0000:00/0000:00:0e.0/host1/target1:0:0/1:0:0:0/block/sr0 (block)
Comment 13 Dave Hodgins 2011-06-07 02:00:10 CEST
So udev is seeing the cdrom insertion event.

Is your loginid in the group cdrom?  If not, add it using userdrake,
then logout/in for the group change to take affect, then try again
with the cdrom.
Comment 14 Frédéric "LpSolit" Buclin 2011-06-07 08:50:45 CEST
(In reply to comment #13)
> Is your loginid in the group cdrom?

Yes, it is. :-/
Comment 15 Dave Hodgins 2011-06-10 22:41:26 CEST
Is the device notifier in the system tray?

Which desktop manager are you using?

What's the output of "getfacl /dev/sr0"?
Comment 16 Frédéric "LpSolit" Buclin 2011-06-10 23:27:50 CEST
(In reply to comment #15)
> Is the device notifier in the system tray?

Yes, but it says there is no new device.


> Which desktop manager are you using?

KDE 4.6.3



> What's the output of "getfacl /dev/sr0"?

# getfacl /dev/sr0
getfacl : suppression du premier « / » des noms de chemins absolus
# file: dev/sr0
# owner: root
# group: cdrom
user::rw-
user:buclin:rw-
group::rw-
mask::rw-
other::---
Comment 17 Dave Hodgins 2011-06-10 23:47:15 CEST
Do you have any applications that device notifier can use to play audio cds
installed?

When I put in an audio cd, it shows 2 actions, play with amarok, or play
with kaffeine.
Comment 18 Frédéric "LpSolit" Buclin 2011-06-10 23:52:07 CEST
I have neither amarok nor kaffeine installed, so I have no idea what the device notifier tries to use next. But I have VLC installed, so the notifier could use it, assuming it's able to detect something. :) Or at least tell me that an audio CD is inserted.
Comment 19 Dave Hodgins 2011-06-11 08:56:00 CEST
Please install either one of them, and see if that fixes the problem.

If it does, then the bug report should be changed to vlc not creating
whatever file is used by the device notifier, to indicate that it is
capable of playing audio cds.
Comment 20 Frédéric "LpSolit" Buclin 2011-06-12 02:31:20 CEST
Installing Kaffeine fixes the problem. A notification appears when inserting an audio CD and offers to open it with Kaffeine. Thanks for helping me track this down. :)

Morphing the bug summary as suggested by Dave in comment 19.

Summary: Inserting an audio CD in the tray is not detected => The device notifier is not aware that VLC can play audio CDs
Source RPM: (none) => vlc-1.1.9-4.mga1.tainted

Comment 21 Dave Hodgins 2011-06-12 03:44:23 CEST
In the meantime, you can copy the kaffeine files in /usr/share/apps/solid/actions/
to start with vlc, and change all occurrences of kaffeine to vlc in those files.
Comment 22 Frédéric "LpSolit" Buclin 2011-06-13 00:13:23 CEST
Created attachment 556 [details]
patch for vlc-opencda.desktop

Actually, there is already a file named /usr/share/apps/solid/actions/vlc-opencda.desktop, but it triggers no action. If I replace

 X-KDE-Solid-Predicate=[ StorageVolume.ignored == false AND OpticalDisc.availableContent & 'Audio' ]

by

 X-KDE-Solid-Predicate=OpticalDisc.availableContent & 'Audio'

then it works fine.


See also https://bugs.launchpad.net/kubuntu-ppa/+bug/709868
Comment 23 Ahmad Samir 2011-06-15 00:27:18 CEST
This looks like a general problem in solid, it affects kde4-audiocd and kscd too.

Same issue, same fix, so upstream should fix whatever it broke...
Ahmad Samir 2011-06-15 00:27:24 CEST

CC: (none) => balcaen.john

Comment 24 Frédéric "LpSolit" Buclin 2011-06-15 00:55:59 CEST
Upstream bug: https://bugs.kde.org/show_bug.cgi?id=265870, but it gets no traction.
Frédéric "LpSolit" Buclin 2011-06-15 00:56:55 CEST

See Also: (none) => https://bugs.kde.org/show_bug.cgi?id=265870, https://launchpad.net/bugs/709868

Comment 25 Florian Hubold 2011-07-22 16:31:08 CEST
Until upstream fix this properly, could we have a fix in VLC, please?

CC: (none) => doktor5000

Stephen Germany 2011-08-10 00:09:19 CEST

CC: (none) => stephengermany

Comment 26 Samuel Verschelde 2011-10-01 02:02:35 CEST
Assigning to maintainer now that our maintainers database has an entry for
this package. Please assign back to bugsquad@mageia.org in case of a mistake
from me.

CC: (none) => stormi
Assignee: bugsquad => shlomif

Comment 27 John Balcaen 2011-10-04 00:49:57 CEST
*** Bug 2928 has been marked as a duplicate of this bug. ***

CC: (none) => derekjenn

Comment 28 Luc Menut 2011-10-16 14:35:20 CEST
As stated by Ahmad in comment 23, the real bug is in solid udisks backend (kdelibs).
FYI, I've just submit a patch for this bug on kde review board.
https://git.reviewboard.kde.org/r/102892

regards,
Luc

Keywords: (none) => UPSTREAM
URL: (none) => https://git.reviewboard.kde.org/r/102892
CC: (none) => lmenut
Hardware: i586 => All
Whiteboard: (none) => affects Mageia 1 and Cauldron, patch in review upstream

Comment 29 Luc Menut 2011-10-17 22:10:27 CEST
Patch now accepted upstream.

This bug should be fixed with:
- lib(64)solid4-4.6.5-1.3.mga1 for mga1 in update_testing (update candidate bug #3090 for validation by QA team),
- lib(64)solid4-4.7.2-5.mga2 for cauldron.

Assignee: shlomif => lmenut
Source RPM: vlc-1.1.9-4.mga1.tainted => kdelibs4-4.6.5
Whiteboard: affects Mageia 1 and Cauldron, patch in review upstream => affects Mageia 1 and Cauldron

Comment 30 Dave Hodgins 2011-10-17 23:08:03 CEST
Testing complete on i586 for the srpm
kdelibs4-4.6.5-1.3.mga1.src.rpm

Before the installation, amarok was the only option shown
by the device notifier, for an audio cd.

After installation, and restarting kde, the device notifier
is showing 7 options for an audio cd, including vlc.
Comment 31 Derek Jennings 2011-10-18 00:18:42 CEST
Confirmed bug fixed on x86_64
No regressions found elsewhere so far.
Comment 32 Frédéric "LpSolit" Buclin 2011-10-18 01:33:01 CEST
Works for me too on i586. Congratulations and thanks for the fix, Luc. :)
Comment 33 Dave Hodgins 2011-10-18 01:35:07 CEST
Could someone from the sysadmin team push the srpm
kdelibs4-4.6.5-1.3.mga1.src.rpm
From core updates testing to core updates.

Advisory:
This bug update to kdelibs4 fixes a problem in solid, that
prevented the device notifier from recognizing all applications
that could handle an audio cd.

https://bugs.mageia.org/show_bug.cgi?id=1594

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 34 Manuel Hiebel 2011-10-18 12:13:58 CEST
(if qa-bugs is not in cc or assigned to this bug, users who user the updates-push saved search don't see this one)

CC: (none) => qa-bugs

Comment 35 Luc Menut 2011-10-18 13:08:43 CEST
As stated in comment 29, there is already an update candidate bug - bug #3090 - assigned to qa-bugs with advisory and how to test. Please use it, instead of this one (this one is only a special case).
Comment 36 Manuel Hiebel 2011-10-18 17:19:21 CEST
as there is another bug open for the update, and it's already reported as resolved  here I think we can close this one.

Keywords: validated_update => (none)
Status: NEW => RESOLVED
CC: qa-bugs, sysadmin-bugs => (none)
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.