Description of problem: When I manually switch CDs without using the UI, gnome-cd does not really cope well at all - it either then errors, or leaves the old CDDB info up, etc. Version-Release number of selected component (if applicable): 2.16.1-2.fc6 How reproducible: Every time Steps to Reproduce: 1. play cd 2. switch cd 3. attempt to play again
Switch CD, how? That probably means that HAL isn't picking up that the CD changed. Does the audio CD appear/disappear from the desktop?
Right click on desktop icon, choose 'eject'. The desktop icon remains, gnome-cd still tries to play, etc.
(In reply to comment #2) > Right click on desktop icon, choose 'eject'. > > The desktop icon remains, gnome-cd still tries to play, etc. This sounds like either a gnome-vfs bug or a hal bug. Does hal notice the device go away? lshal --monitor is your friend here...
[notting@nostromo: ~]$ lshal --monitor Start monitoring devicelist: ------------------------------------------------- <insert CD #1> storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = true volume_part_1_size_357697536 added <right click, eject> ... silence ... <insert CD #2> ... silence ... <hit eject button on drive> storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = false volume_part_1_size_357697536 removed <insert CD #2 again> storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = true storage_model_UJDA745_DVD/CDRW property storage.removable.media_size = 640739328 (0x2630e800)
(In reply to comment #4) > <insert CD #1> > > storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = true > volume_part_1_size_357697536 added > > <right click, eject> > ... silence ... Try doing 'gnome-mount -t -v -e /dev/cdrom' and post the output? Wait. Did the disc pop out? > <insert CD #2> > > ... silence ... > > <hit eject button on drive> > > storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = false > volume_part_1_size_357697536 removed > > <insert CD #2 again> > > storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = true > storage_model_UJDA745_DVD/CDRW property storage.removable.media_size = 640739328 > (0x2630e800) > Something is wrong here. I'll try to reproduce it. Also, please attach output of 'lshal --long --show storage_model_UJDA745_DVD/CDRW'. Thanks.
Also, please try to reproduce with with gnome-cd uninstalled or moved out of the way.
Created attachment 148528 [details] CD device entry $ lshal --long --show storage_model_UJDA745_DVD/CDRW lshal.c 186 : INFO: called LIBHAL_FREE_DBUS_ERROR but dbusError was not set. Assuming the attached is what you want.
Seems to work with gnome-cd killed. $ gnome-mount -t -v -e -d /dev/cdrom gnome-mount 0.5 Resolved device file /dev/cdrom -> /dev/scd0 libhal-storage.c 1401 : INFO: called LIBHAL_FREE_DBUS_ERROR but dbusError was not set. ** (gnome-mount:10456): DEBUG: Ejecting /org/freedesktop/Hal/devices/volume_part_1_size_357697536 ** (gnome-mount:10456): DEBUG: in unmount_done : user_data = 0x0 Ejected /dev/scd0 and lshal --monitor shows it. When gnome-cd is running: $ gnome-mount -t -v -e -d /dev/cdrom gnome-mount 0.5 Resolved device file /dev/cdrom -> /dev/scd0 libhal-storage.c 1401 : INFO: called LIBHAL_FREE_DBUS_ERROR but dbusError was not set. ** (gnome-mount:10514): DEBUG: Ejecting /org/freedesktop/Hal/devices/volume_part_1_size_357697536 ** (gnome-mount:10514): DEBUG: in unmount_done : user_data = 0x0 Ejected /dev/scd0 So, gnome-mount works the same in either case, but hal doesn't get the notification.
Actually, after ejecting, lshal --monitor gets the 'media_availabe=false' change... as soon as I close gnome-cd.
I bet this one is a dupe of bug 206847 :-)
Anyway, reassigning back to gnome-media. The problem is that gnome-cd, or one of it's libraries, is keeping the fd open using O_EXCL. I wonder what other software (Rhythmbox, Banshee, etc.) suffer from this?
In that O_EXCL locks out other things, yes. The CD isn't multisession. I suspect if the eject process tried to open with O_EXCL and errored out if it couldn't open it that way, things would be 'better'.
> I suspect if the eject process tried to open with O_EXCL and errored out if it > couldn't open it that way, things would be 'better'. Yah. Let me burn an audio disc (who uses these anymore? :-) ), reproduce it and I'll fix this in HAL. Still, gnome-cd ought to be fixed to close the fd when it's not needed.
OK, fix committed to HAL for this http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=ff20966d70fe8a0f23b2195ec8d6579201c0d4ba Will be in Rawhide in a few days. With this, attempts to eject the disc will result in this dialog http://people.freedesktop.org/~david/gnome-mount-busy-error.png As a matter of fact, the eject button works is gnome-cd so I think we're all good now and this bug can be closed.
This is now in Rawhide.