Bug 296657 - CD drive tray goes back in after 'Eject' when dolphin is running
Summary: CD drive tray goes back in after 'Eject' when dolphin is running
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: libsolid-udisks (show other bugs)
Version: 4.9-git
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
: 269146 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-24 02:38 UTC by Syam
Modified: 2012-08-06 15:10 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.5


Attachments
Patch against 4.8 (964 bytes, patch)
2012-07-13 11:36 UTC, Lukáš Tinkl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Syam 2012-03-24 02:38:11 UTC
When I try to eject a CD/DVD using the 'Device Notifier' or from the right-click context menu in the 'Places' panel item in Dolphin, the tray opens and then goes right back in. Running the 'eject' command from a terminal works without problems.

Test Case-1
---------------------------
1. Insert a CD
2. Device notifier pops up
3. Can't eject the CD from there since only 'mount' icon is visible (another bug, perhaps), so click on the 'mount' icon to mount the device
4. The 'eject' icon appears. Clicking on it has no effect (another bug, again?)
5. Open Dolphin and right-click the CD on the Places panel and select 'Eject'
6. The tray opens up and immediately goes back in before I can take out the CD

The problem in point no. 4 appeared after I updated to KDE 4.8.1. It was not there in KDE 4.7, although all other observations were there.
Choosing 'Release' first and then 'Eject' from Dolphin also has the same effect.

Eject the CD by pressing the physical button on the drive also works (with or without the device being mounted).
Comment 1 Syam 2012-03-24 02:39:06 UTC
I forgot to mention that I am on KDE 4.8.1. The new bug-tracker has 4.7 as the highest version.
Comment 2 Johann Bergles 2012-03-24 07:54:31 UTC
The eject command only works when dolphin is clsoed.

As long as Dolphin is open, even the comamndline "eject" command fails, and the CD/DVD will be go back in into the DVD Drive again.

I#ve setuped automount on all devices, maybe that's the reason why dolphin refuses thje eject.

Yes, the "Eject" button on the device notifier doesnt work at all. (Worked under KDE 4.7.x)

Intressting is that when you use "k3b" to eject the media it works fine, even when Dolphin is running.

All other KDE (and GTK) Programs fails to eject the media - means it will eject it and load again.
Comment 3 Ovidiu D. Niţan 2012-04-03 16:33:32 UTC
I got this problem too. I can't click "Eject" in Device Notifier and when I try to eject the CD-ROM tray in Dolphin the tray opens and then goes back in immediately.
Comment 4 Jaroslav Reznik 2012-04-12 15:35:45 UTC
Reported in Fedora too as https://bugzilla.redhat.com/show_bug.cgi?id=811609 during Fedora 17 Beta Desktop Validation tests.
Comment 5 Reza 2012-07-11 03:55:12 UTC
I can reproduce this in master.
It won't properly eject(tray open then close again) when dolphin is running.
Comment 6 Syam 2012-07-11 06:02:23 UTC
Thank you. Issues like these should be considered as blockers, IMHO. Such issues cause bad user experience and ruin the reputation of KDE & Linux.
Comment 7 Jacopo De Simoi 2012-07-11 06:33:34 UTC
It seems that you guys have reported two issues; the first one is “Device notifier does not eject CDs” which seems related to bug #296965.
The second one shows up when ejecting via dolphin, and this causes the weird “tray goes back in after eject” business.

Unfortunately atm I cannot test any of these issues, my dev machine is down
Could you please confirm my summary above? 
Thanks
Comment 8 Reza 2012-07-11 10:08:25 UTC
This issue can be separated just like your comment:
First issue: device notifier cannot eject the CD,  which might be considered as bug or feature request(to make ejecting CD possible without mounting it first). 
Currently the eject button is not displayed unless we mount the CD.
If we mount then comes 2nd problem.
Second issue: the mounted CD cannot be ejected if dolphin running.

(In reply to comment #7)
> It seems that you guys have reported two issues; the first one is “Device
> notifier does not eject CDs” which seems related to bug #296965.
> The second one shows up when ejecting via dolphin, and this causes the weird
> “tray goes back in after eject” business.
> 
> Unfortunately atm I cannot test any of these issues, my dev machine is down
> Could you please confirm my summary above? 
> Thanks
Comment 9 Syam 2012-07-11 11:26:59 UTC
The buggy behavior that I tried to report is the "tray goes back in after eject" problem.
The other issues ("not being able to eject without mounting first" and "Device notifier does not eject CDs") were also observed but I did not mean to stress on them since I couldn't confirm them and also because there are other not-so-difficult work-arounds (i.e. eject from Dolphin).

The observation made by "Johann Bergles" (i.e. eject works if Dolphin is closed) was news to me as I hadn't tried by closing Dolphin.

So, to summarise, there are three problems, out of which the first one is the one mentioned in this report:
1. tray goes back in after eject
2. Device notifier cannot eject without mounting first
3. Device notifier does not eject CDs (perhaps related to bug #296965)
Comment 10 Jacopo De Simoi 2012-07-11 11:54:07 UTC
> So, to summarise, there are three problems, out of which the first one is
> the one mentioned in this report:
> 1. tray goes back in after eject

Does this happen also when ejecting from Dolphin or via krunner?
Comment 11 Reza 2012-07-12 00:09:49 UTC
This behaviour is reproduceable when ejecting from Dolphin and krunner.

(In reply to comment #10)
> > So, to summarise, there are three problems, out of which the first one is
> > the one mentioned in this report:
> > 1. tray goes back in after eject
> 
> Does this happen also when ejecting from Dolphin or via krunner?
Comment 12 Jacopo De Simoi 2012-07-12 08:52:02 UTC
> So, to summarise, there are three problems, out of which the first one is
> the one mentioned in this report:
> 1. tray goes back in after eject
Let this be the issue reported by this bug report

> 2. Device notifier cannot eject without mounting first
Please check if there is a feature request for it, otherwise open it!

> 3. Device notifier does not eject CDs (perhaps related to bug #296965)
This is indeed the bug mentioned above
Comment 13 Jacopo De Simoi 2012-07-12 09:55:16 UTC
I can finally reproduce; 
my dev machine used to be a laptop and the cd tray does not close by itself, so I could never discover this issue.  Let me summarize.

As mentioned in the br, this issue can be reproduced

if the volume is unmounted (regardless of dolphin being open or not):
- eject from the command line works as expected
- solid-hardware eject /org/freedesktop/UDisks/devices/sr0 works
- eject via krunner works
- eject via dolphin does not work

if the volume is mounted (regardless of dolphin being open or not)
- eject from the command line does not work 
- solid-hardware eject /org/freedesktop/UDisks/devices/sr0 does not work
- eject via krunner does not work
- eject via dolphin does not work

Cheers
 __J
Comment 14 Lukáš Tinkl 2012-07-12 10:05:04 UTC
For the bugreporter and Jacopo, please provide:

rpm -q kde-workspace
rpm -q udisks
Comment 15 Jacopo De Simoi 2012-07-12 10:29:39 UTC
This (In reply to comment #14)
> For the bugreporter and Jacopo, please provide:
> 
> rpm -q kde-workspace
> rpm -q udisks

This is rep'le also on gentoo, by the way, in any case

udisks version: 1.0.4-r1
kde: 4.8.3 (it has already been checked on git master, though)
Comment 16 Lukáš Tinkl 2012-07-12 11:39:53 UTC
I can't reproduce here :/ This bug is fixed in kdelibs 4.8.4 and 4.9 but Fedora 4.9 packages use udisks2 backend in which case I'm interested in the above information.

$ solid-hardware list

would also be helpful
Comment 17 Syam 2012-07-13 01:54:21 UTC
Updated observations:
1. Insert a CD
2. Device notifier pops up
3. Can't eject the CD from there since only 'mount' icon is visible (another bug, perhaps), so click on the 'mount' icon to mount the device
4. The 'eject' icon appears. Clicking on it successfully ejects the CD without problems
5. Re-insert the CD, mount it and open in Dolphin
6. Try to eject by right-clicking the CD on the Places panel and select 'Eject'
7. The tray opens up and immediately goes back in before I can take out the CD
8. Keeping the Dolphin window still open, re-insert the CD and mount using Device Notifier
9. Again, tray opens up and immediately goes back in before I can take out the CD
10. Re-insert the CD, close Dolphin and now mount and eject from Device notifier
11. The CD tray is successfully ejected

The only change I see now is that the problem in point no. 4 of the original report (i.e. "clicking on eject icon has no effect") is gone.

Versions:
kde-workspace-4.8.4-1.fc17.x86_64
udisks-1.0.4-6.fc17.x86_64


Output of: solid-hardware list (with a CD mounted):
--------------------------------------------------------------------------------
udi = '/org/kde/solid/udev/sys/devices/LNXSYSTM:00/LNXCPU:00'
udi = '/org/kde/solid/udev/sys/devices/LNXSYSTM:00/LNXCPU:01'
udi = '/org/kde/solid/udev/sys/devices/LNXSYSTM:00/LNXCPU:02'
udi = '/org/kde/solid/udev/sys/devices/LNXSYSTM:00/LNXCPU:03'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/hwC1D0'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/hwC1D1'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/hwC1D2'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/hwC1D3'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/pcmC1D3p'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/pcmC1D7p'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/pcmC1D8p'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/pcmC1D9p'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/controlC1'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:19.0/net/em0'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D2'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/pcmC0D0c'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/pcmC0D0p'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/pcmC0D1p'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/pcmC0D2c'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/controlC0'
udi = '/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS0'
udi = '/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS1'
udi = '/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS2'
udi = '/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS3'
udi = '/org/kde/solid/udev/sys/devices/virtual/net/lo'
udi = '/org/kde/solid/udev/sys/devices/virtual/sound/timer'
udi = '/org/freedesktop/UDisks'
udi = '/org/freedesktop/UDisks/devices/sdb5'
udi = '/org/freedesktop/UDisks/devices/sda1'
udi = '/org/freedesktop/UDisks/devices/sda2'
udi = '/org/freedesktop/UDisks/devices/sda3'
udi = '/org/freedesktop/UDisks/devices/sda4'
udi = '/org/freedesktop/UDisks/devices/sda'
udi = '/org/freedesktop/UDisks/devices/sda5'
udi = '/org/freedesktop/UDisks/devices/sda6'
udi = '/org/freedesktop/UDisks/devices/sr0'
udi = '/org/freedesktop/UDisks/devices/sr0:media'
udi = '/org/freedesktop/UDisks/devices/sdb1'
udi = '/org/freedesktop/UDisks/devices/sdb2'
udi = '/org/freedesktop/UDisks/devices/sdb3'
udi = '/org/freedesktop/UDisks/devices/sdb'
udi = '/org/freedesktop/UDisks/devices/sdb4'
udi = '/org/freedesktop/UPower'
udi = '/org/kde/fstab'
Comment 18 Lukáš Tinkl 2012-07-13 11:36:10 UTC
Created attachment 72496 [details]
Patch against 4.8

Prevent double-eject, resulting in the tray being retracted
Comment 19 Lukáš Tinkl 2012-07-13 11:36:53 UTC
Could you please test the above patch?
Comment 20 Lukáš Tinkl 2012-07-13 12:25:42 UTC
Git commit 9ac57f1b582ca1fdf889016c7bc2a3628ef7d80e by Lukas Tinkl.
Committed on 13/07/2012 at 14:25.
Pushed by lukas into branch 'KDE/4.8'.

prevent calling eject twice, resulting in the tray being retracted on
some PCs

M  +3    -1    solid/solid/backends/udisks/udisksstorageaccess.cpp

http://commits.kde.org/kdelibs/9ac57f1b582ca1fdf889016c7bc2a3628ef7d80e
Comment 21 Lukáš Tinkl 2012-07-13 12:26:18 UTC
Git commit ffc6f1ed3ec2a220cd2e3c5a6d96690eeb853e2b by Lukas Tinkl.
Committed on 13/07/2012 at 14:25.
Pushed by lukas into branch 'KDE/4.9'.

prevent calling eject twice, resulting in the tray being retracted on
some PCs

M  +3    -1    solid/solid/backends/udisks/udisksstorageaccess.cpp

http://commits.kde.org/kdelibs/ffc6f1ed3ec2a220cd2e3c5a6d96690eeb853e2b
Comment 22 David Faure 2012-08-06 15:10:41 UTC
*** Bug 269146 has been marked as a duplicate of this bug. ***