Bug 269146 - F15 ejecting a cd/dvd disk with dolphin causes it to reinsert itself right after ejection (works ok when no dolphin instances are running)
Summary: F15 ejecting a cd/dvd disk with dolphin causes it to reinsert itself right af...
Status: RESOLVED DUPLICATE of bug 296657
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
: 276267 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-22 15:20 UTC by Reartes Guillermo
Modified: 2012-08-06 15:10 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reartes Guillermo 2011-03-22 15:20:03 UTC
Version:           unspecified (using KDE 4.6.1) 
OS:                Linux

BASICS:

With dolphin used/opened/in backgroud 
   --->> the dvd/cd is inmediatelly reinserted after ejection

Witout dolphin 
   --->> the dvd/cd eject normally.

----

Software Version:

udisks.x86_64    1.0.1-8.fc15
kernel           2.6.38-1.fc15.x86_64
kdebase          4.6.1-2.fc15.x86_64 

----


Reproducible: Always

Steps to Reproduce:
Details:

1 - Using command 'eject' from within konsole while dolphin is opened:
 * put a dvd/cd in the drive
 * mount it via dolphin (click over the cd/dvd drive unit)
 * open a konsole and issue command 'eject'
 >> the cd/dvd disk ejects (mounted via dolphin) and reinserts inmediatelly

2 - Issuing command 'eject' from within konsole without mounting it (either via dolphin or the device notification) dolphin instance running:
 >> command 'eject' works ok. 

3 - Issuing command 'eject' from within konsole without any dolphin instances running and without using media-applet (the cd/dev not mounted):
 >> command 'eject' works ok.

4 - Using dolphin:
 * insert a dvd/cd in the cd/dvd drive
 * wait for it to appear in dolphin
 * mount in via dolphin (click it)
 * eject it via dolphin (right click, eject)
 >> the cd/dvd ejects but reiserts inmediatelly
 * eject it again
 >> the cd/dvd ejects but reiserts inmediatelly

5 - Using dolphin:
 * insert a dvd/cd in the drive
 * wait for it to appear in dolphin
 * mount in via dolphin (click it)
 * release it via dolphin (right click, release)
 * from konsole issue: eject
 >> the cd/dvd ejects but reiserts inmediatelly
 * from konsole issue: eject
 >> the cd/dvd ejects but reiserts inmediatelly

6 - Ejecting it from device-notifier widget without any dolphin running instances (the one
wich mounts usb mass storage / cd/dvd):
 * ejecting from the widget with no dolphin instances running
 >> it works ok.

7 - Pressing 'eject' button when mounted via dolphin
 >> device does not eject. 
    * This seems ok, because the disk is used by dolphin
    * but why is it different from issuing command 'eject' a dolphin mounted cd/dvd does work?


Actual Results:  
the cd/dvd diks is reinserted right after ejection if dolphin is running

Expected Results:  
the cd/dvd should be remain ejected if ordered to.

Running F15 Alpha, KDE-LiveCD, installed and updated. (x86_64)

first it suspected udisks, so i opened bugzilla.redhat.com [Bug 684160 - ejected dvd disk reinserts itself after ejection (dolphin, 'eject' command)]
Comment 1 Kevin Ottens 2011-03-22 15:41:41 UTC
From the description it's likely dolphin specific I'm afraid.
Comment 2 Peter Penz 2011-03-22 16:21:07 UTC
@Kevin: Might it be related to KFilePlacesView? Hm, I will check whether it happens in the filedialog too; if it does not happen there then it would of course be Dolphin specific (... and I'm very curious about the root-cause then, currently I've no idea which part in Dolphin might trigger this behavior ;-)).
Comment 3 Reartes Guillermo 2011-03-24 22:07:54 UTC
This was tested on another machine with an ide cdrom and an ide hdd:

* unit unmounted > insert cd
* dolphin clicking in home
* dolphin right-click "F15-Alpha" > eject
>> the disk ejects & reinserts.

* unit unmounted > insert cd
* dolphin clicking in "F15-Alpha" > "F15 Alpha" is mounted & its contents shown.
* dolphin right-click in "F15-Alpha" > eject
>> the disk umounts & ejects & reinserts.
>> dolphin is still in "F15-Alpha" but nothing is shown (it is not mounted)

* unit unmounted > insert cd
* device-manager popup > open "F15 Alpha" with dolphin > in opens it ok
* close dolphin
* device-manager popup > eject
>> no eject. icon changed to a red boxy cross (error to unmount/busy???)
   it was only used by dolphin (now closed) & the media-notification applet)
>> after some seconds, it changed to normal icon. it now reports that it is
   not mounted.
>> it is not possible to eject it with the applet, tried again. (at least in 
   this machine).

* unit unmounted > insert cd
* unit unmounted > issue '$ eject' command from command line > the cd is 
  ejected ok. no reisertion.
Comment 4 Peter Penz 2011-03-26 15:46:18 UTC
@adding David and Kevin to CC:
The issue is not related to Dolphin, it also occurs when using the file-dialog. It seems also not related to the KFilePlacesView (disabled it during the tests). Do you have any idea/guesses what the root-cause might be?
Comment 5 spam 2011-03-29 17:11:12 UTC
I can confirm this bug on my System:

Arch Linux x64, KDE 4.6.1
Comment 6 Kevin Ottens 2011-03-30 20:02:04 UTC
Could be KFilePlacesView even though it's disabled (== likely just hidden). Could you verify if that happens also with the HAL backend? (to do that you need to set the env variable SOLID_HAL_LEGACY to 1, and have haldaemon running before launching the application, dolphin or whatever shows the KFilePlacesView).

Also it could help to redo all the testing with *only* dolphin started, if you have a full KDE session running, there's components in plasma-desktop or kded (like the automounter, etc.) which might interfere. If you really can't test without kded unload as many modules as possible.
Comment 7 Reartes Guillermo 2011-03-31 00:40:07 UTC
with enlightenment:

* inserting dvd and without mounting, right clicking 'eject' from home
  directory, WORKS.
* inserting dvd and mounting, right click 'eject' from the dvd, WORKS.
-----

tried again, in KDE, dvd, mounting it, right click again 'eject' and worked (why?)
i dont know why is working, will try tomorrow again, maybe there is some factor i dont kwnow.
Comment 8 Reartes Guillermo 2011-04-13 18:25:11 UTC
Updated to 4.6.2, and tested again.
---

TESTED CASE:
* no open dolphin instances
* launch udisks ---monitor-detail 
* instert dvd
* media widget > open with dolphin (since no "mount" is avaiable there)
* close dolphin as soon it mounts it
* media widget > eject
* stop udisks


RESULT: OK, the device ejects and remain ejected.

# udisks --monitor-detail 
Monitoring activity from the disks daemon. Press Ctrl+C to cancel.
changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-ASUS_DRW-20B1LT
    by-path:                   /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0
  detected at:                 Wed 13 Apr 2011 12:16:50 PM ART
  system internal:             0
  removable:                   1
  has media:                   0
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        0
  block size:                  0
  job underway:                no
  usage:                       
  type:                        
  version:                     
  uuid:                        
  label:                       
  drive:
    vendor:                    ASUS
    model:                     ASUS    DRW-20B1LT
    revision:                  1.01
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 1
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0/host3
    similar devices:
    media:                     
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available

changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-ASUS_DRW-20B1LT
    by-path:                   /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0
  detected at:                 Wed 13 Apr 2011 12:16:50 PM ART
  system internal:             0
  removable:                   1
  has media:                   1 (detected at Wed 13 Apr 2011 01:04:59 PM ART)
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        2661416960
  block size:                  2048
  job underway:                no
  usage:                       filesystem
  type:                        iso9660
  version:                     
  uuid:                        
  label:                       SOL_10_1008_SPARC
  optical disc:
    blank:                     0
    appendable:                0
    closed:                    1
    num tracks:                1
    num audio tracks:          0
    num sessions:              1
  drive:
    vendor:                    ASUS
    model:                     ASUS    DRW-20B1LT
    revision:                  1.01
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 1
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0/host3
    similar devices:
    media:                     optical_dvd_plus_r
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available

job-changed: /org/freedesktop/UDisks/devices/sr0
  job underway:                FilesystemMount, initiated by uid 500
changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-ASUS_DRW-20B1LT
    by-path:                   /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0
  detected at:                 Wed 13 Apr 2011 12:16:50 PM ART
  system internal:             0
  removable:                   1
  has media:                   1 (detected at Wed 13 Apr 2011 01:04:59 PM ART)
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  1
  mount paths:             /media/SOL_10_1008_SPARC
  mounted by uid:              500
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        2661416960
  block size:                  2048
  job underway:                no
  usage:                       filesystem
  type:                        iso9660
  version:                     
  uuid:                        
  label:                       SOL_10_1008_SPARC
  optical disc:
    blank:                     0
    appendable:                0
    closed:                    1
    num tracks:                1
    num audio tracks:          0
    num sessions:              1
  drive:
    vendor:                    ASUS
    model:                     ASUS    DRW-20B1LT
    revision:                  1.01
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 1
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0/host3
    similar devices:
    media:                     optical_dvd_plus_r
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available

job-changed: /org/freedesktop/UDisks/devices/sr0
  job underway:                no
job-changed: /org/freedesktop/UDisks/devices/sr0
  job underway:                FilesystemUnmount, initiated by uid 500
changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-ASUS_DRW-20B1LT
    by-path:                   /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0
  detected at:                 Wed 13 Apr 2011 12:16:50 PM ART
  system internal:             0
  removable:                   1
  has media:                   1 (detected at Wed 13 Apr 2011 01:04:59 PM ART)
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        2661416960
  block size:                  2048
  job underway:                DriveEject, initiated by uid 500
  usage:                       filesystem
  type:                        iso9660
  version:                     
  uuid:                        
  label:                       SOL_10_1008_SPARC
  optical disc:
    blank:                     0
    appendable:                0
    closed:                    1
    num tracks:                1
    num audio tracks:          0
    num sessions:              1
  drive:
    vendor:                    ASUS
    model:                     ASUS    DRW-20B1LT
    revision:                  1.01
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 1
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0/host3
    similar devices:
    media:                     optical_dvd_plus_r
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available

job-changed: /org/freedesktop/UDisks/devices/sr0
  job underway:                no
job-changed: /org/freedesktop/UDisks/devices/sr0
  job underway:                DriveEject, initiated by uid 500
job-changed: /org/freedesktop/UDisks/devices/sr0
  job underway:                no
changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-ASUS_DRW-20B1LT
    by-path:                   /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0
  detected at:                 Wed 13 Apr 2011 12:16:50 PM ART
  system internal:             0
  removable:                   1
  has media:                   0
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        0
  block size:                  0
  job underway:                no
  usage:                       
  type:                        
  version:                     
  uuid:                        
  label:                       
  drive:
    vendor:                    ASUS
    model:                     ASUS    DRW-20B1LT
    revision:                  1.01
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 1
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0/host3
    similar devices:
    media:                     
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available


-------------------

TESTED CASE:
* log out and log in
* no open dolphin instances
* launch udisks ---monitor-detail 
* instert dvd
* media widget > open with dolphin (since no "mount" is avaiable there)
* close dolphin as soon it mounts it
* media widget > eject
* stop udisks


RESULT: BAD, the device was not even mounted, cdrom led flashing 
and drive with 'unknown activity'. (it was not mounted)

# df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 84G   51G   33G  62% /
[...]
/dev/sr0              2.5G  2.5G     0 100% /media/SOL_10_1008_SPARC

# fuser /media/SOL_10_1008_SPARC
# lsof  /media/SOL_10_1008_SPARC

It was mounted, but is shown as not mounted and cannot be ejected by the
widget. After some time, it stopped being 'read' by '?'. I remained mounted
until manual umount & ejection.

Note: the used dvd was selected ramdomly for today's test. 

# udisks --monitor-detail
Monitoring activity from the disks daemon. Press Ctrl+C to cancel.
changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-ASUS_DRW-20B1LT
    by-path:                   /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0
  detected at:                 Wed 13 Apr 2011 12:16:50 PM ART
  system internal:             0
  removable:                   1
  has media:                   0
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        0
  block size:                  0
  job underway:                no
  usage:                       
  type:                        
  version:                     
  uuid:                        
  label:                       
  drive:
    vendor:                    ASUS
    model:                     ASUS    DRW-20B1LT
    revision:                  1.01
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 1
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0/host3
    similar devices:
    media:                     
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available

changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-ASUS_DRW-20B1LT
    by-path:                   /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0
  detected at:                 Wed 13 Apr 2011 12:16:50 PM ART
  system internal:             0
  removable:                   1
  has media:                   1 (detected at Wed 13 Apr 2011 01:08:07 PM ART)
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        2661416960
  block size:                  2048
  job underway:                no
  usage:                       filesystem
  type:                        iso9660
  version:                     
  uuid:                        
  label:                       SOL_10_1008_SPARC
  optical disc:
    blank:                     0
    appendable:                0
    closed:                    1
    num tracks:                1
    num audio tracks:          0
    num sessions:              1
  drive:
    vendor:                    ASUS
    model:                     ASUS    DRW-20B1LT
    revision:                  1.01
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 1
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0/host3
    similar devices:
    media:                     optical_dvd_plus_r
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available

job-changed: /org/freedesktop/UDisks/devices/sr0
  job underway:                FilesystemMount, initiated by uid 500
changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-ASUS_DRW-20B1LT
    by-path:                   /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0
  detected at:                 Wed 13 Apr 2011 12:16:50 PM ART
  system internal:             0
  removable:                   1
  has media:                   1 (detected at Wed 13 Apr 2011 01:08:07 PM ART)
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  1
  mount paths:             /media/SOL_10_1008_SPARC
  mounted by uid:              500
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        2661416960
  block size:                  2048
  job underway:                no
  usage:                       filesystem
  type:                        iso9660
  version:                     
  uuid:                        
  label:                       SOL_10_1008_SPARC
  optical disc:
    blank:                     0
    appendable:                0
    closed:                    1
    num tracks:                1
    num audio tracks:          0
    num sessions:              1
  drive:
    vendor:                    ASUS
    model:                     ASUS    DRW-20B1LT
    revision:                  1.01
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 1
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0/host3
    similar devices:
    media:                     optical_dvd_plus_r
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available

job-changed: /org/freedesktop/UDisks/devices/sr0
  job underway:                no
changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-ASUS_DRW-20B1LT
    by-path:                   /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0
  detected at:                 Wed 13 Apr 2011 12:16:50 PM ART
  system internal:             0
  removable:                   1
  has media:                   1 (detected at Wed 13 Apr 2011 01:08:07 PM ART)
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        2661416960
  block size:                  2048
  job underway:                no
  usage:                       filesystem
  type:                        iso9660
  version:                     
  uuid:                        
  label:                       SOL_10_1008_SPARC
  optical disc:
    blank:                     0
    appendable:                0
    closed:                    1
    num tracks:                1
    num audio tracks:          0
    num sessions:              1
  drive:
    vendor:                    ASUS
    model:                     ASUS    DRW-20B1LT
    revision:                  1.01
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 1
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0/host3
    similar devices:
    media:                     optical_dvd_plus_r
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available

changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-ASUS_DRW-20B1LT
    by-path:                   /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0
  detected at:                 Wed 13 Apr 2011 12:16:50 PM ART
  system internal:             0
  removable:                   1
  has media:                   1 (detected at Wed 13 Apr 2011 01:08:07 PM ART)
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        2661416960
  block size:                  2048
  job underway:                no
  usage:                       
  type:                        
  version:                     
  uuid:                        
  label:                       
  drive:
    vendor:                    ASUS
    model:                     ASUS    DRW-20B1LT
    revision:                  1.01
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 0
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0/host3
    similar devices:
    media:                     
      compat:                 
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available

changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-ASUS_DRW-20B1LT
    by-path:                   /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0
  detected at:                 Wed 13 Apr 2011 12:16:50 PM ART
  system internal:             0
  removable:                   1
  has media:                   0
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        0
  block size:                  0
  job underway:                no
  usage:                       
  type:                        
  version:                     
  uuid:                        
  label:                       
  drive:
    vendor:                    ASUS
    model:                     ASUS    DRW-20B1LT
    revision:                  1.01
    serial:                    
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 1
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a09_2e0/host3
    similar devices:
    media:                     
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available
-------------------------

With dolphin, the issue is still present.
This is a litle confusing, because there are many abnomalies with the
mounting / umounting / ejection of cd/dvd media both from dolphin and
from the widget, i dont really know much how they are related (shared code),
(is anorher bugrepor needed?)
Comment 9 spam 2011-05-07 16:46:00 UTC
This:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/356631/comments/32
fixed it for me. So it might not be KDE but udev/kernel instead.
Comment 10 Reartes Guillermo 2011-05-07 17:30:15 UTC
Tried, but it still auto re-insterts if efected from dolphin, the dvd unit eject button works ok.

---

BEFORE/DEFAULT:
# probe filesystem metadata of optical drives which have a media inserted
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"

NEW:
# from https://bugs.launchpad.net/ubuntu/+source/linux/+bug/356631/comments/32
KERNEL=="sr*", ENV{ID_CDROM_MEDIA_STATE}=="blank", GOTO="persistent_storage_end"
# probe filesystem metadata of optical drives which have a media inserted
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"

Then i rebooted the box.
Comment 11 spam 2011-05-08 14:08:06 UTC
Yeah, sorry about the false positive. It worked only 3 to 5 times on my system, now its back to the buggy behaviour. I have no idea what caused this.
Comment 12 spam 2011-05-12 16:35:52 UTC
Please check the value of /proc/sys/dev/cdrom/autoclose. If its set to 1 try to set it to 0 with sysctl:
sysctl -w dev.cdrom.autoclose=0

and/or put
dev.cdrom.autoclose=0
in /etc/sysctl.conf to make it persistent. I got cautions after causing one false positive here already, but I think that did it for me.

Also: Disable hal if you don't need it. It might interfere.
Comment 13 Alexander 2011-05-31 07:33:55 UTC
I can confirm on Arch Linux x64, KDE 4.6.80
Comment 14 Reartes Guillermo 2011-06-03 18:53:47 UTC
# sysctl -w dev.cdrom.autoclose=0

(and then adding it to /etc/sysctl.conf)

It does seem to do the trick. The vaule was 1, not sure why is it the default.
Tried with some dvds and they ejected ok. I will wait a couple of days to test it.
Comment 15 Lamarque V. Souza 2011-07-10 21:29:40 UTC
*** Bug 276267 has been marked as a duplicate of this bug. ***
Comment 16 Lamarque V. Souza 2011-07-10 21:32:31 UTC
This also happens with my e-sata drive, so it is probably a bug in Solid. I am using 4.6.5 and udisks 1.0.3.
Comment 17 Alexander 2011-07-15 18:56:53 UTC
In RC2 I can't eject CD at all. Sometimes I even forced to use
$ sudo umount /dev/sr0
and then to press buton on my cdrom device, because eject command tells me next thing "eject: unable to find or open device for: `cdrom'". Also, when it happens, cdrom device icon in dolphin changes to the removable device icon and doesn't have such options like mount/umount/eject any more.

Removable devices plasma widget didn't work in RC1, but I was able to eject my CD through dolphin, In RC2 I can't. 2011 year, but users still suffering from such things in KDE. I do not want to offend anyone, but such banal things should be good tested before every release, if some major changes was made.

So, it seems that 4.7 will be a great release for many users, who will not be able to winkle out their compact disks :)
Comment 18 Alexander 2011-07-15 19:01:03 UTC
Also, when I insert the CD back (after all described operations) — dolphin is unable to mount it, but display correct, like a CD with correct label that I've had set in k3b before writing.
Comment 19 spam 2011-07-15 19:17:35 UTC
(In reply to comment #17)
> Removable devices plasma widget didn't work in RC1, but I was able to eject my
> CD through dolphin, In RC2 I can't. 2011 year, but users still suffering from
> such things in KDE. I do not want to offend anyone, but such banal things
> should be good tested before every release, if some major changes was made.

I feel the same way, bugs like this slowly force me away from kde to other desktops. From my outside perspective it looks like tons of work is put into systems like nepomuk or other services that may be usable in 2-3 major releases, but the most fundamental and important things for a good user experience remain unchecked.

On-Topic:
I'll install Xfce on my system today and check if the bug occurs there as well. Could be a good test to see if its really just dolphin or some kde background service.
Comment 20 Reartes Guillermo 2011-07-15 19:21:04 UTC
The solution proposed by spam@codecreator.net:

Setting the sysctl setting 'dev.cdrom.autoclose'to '0' WORKS
No problem with ejecting cd/dvd since quite some time.

I added 'dev.cdrom.autoclose=0' in '/etc/sysctl.conf'

The default value is 1 (not just for this machine, also for my laptop both
using Fedora 15). I reported it to Fedora, maybe the default should be changed.

----

@Alexander

By RC1/RC2 do you mean F15 RC1/2 or KDE 4.7 RC1/RC2? 
Have you tried F15 release + updates?

@Lamarque V. Souza
Your esata 'drive' is a cd/dvd unit or a hardisk or other?
Comment 21 Alexander 2011-07-15 19:32:02 UTC
> By RC1/RC2 do you mean F15 RC1/2 or KDE 4.7 RC1/RC2? 
> Have you tried F15 release + updates?
I meant KDE 4.7 RC1/RC2, which is available in the Arch Linux kde-unstable repo. 

My drive is sata drive too, if this does matter.
Comment 22 Reartes Guillermo 2011-07-15 19:54:02 UTC
The bugreport was against the fact that the cd/dvd was ejected and immediately  reinserted. But it was possible to unmount it correctly. The issue was caused by the mentioned sysctl. It seems solved.

@Alexander

What are the default values of all cdrom related sysctl settings?
# sysctl -a| grep dev.cdrom
Comment 23 Alexander 2011-07-15 20:12:17 UTC
$ sysctl -a | grep dev.cdrom
dev.cdrom.info = drive name:            sr0
dev.cdrom.info = drive speed:           48
dev.cdrom.info = drive # of slots:      1
dev.cdrom.info = Can close tray:        1
dev.cdrom.info = Can open tray:         1
dev.cdrom.info = Can lock tray:         1
dev.cdrom.info = Can change speed:      1
dev.cdrom.info = Can select disk:       0
dev.cdrom.info = Can read multisession: 1
dev.cdrom.info = Can read MCN:          1
dev.cdrom.info = Reports media changed: 1
dev.cdrom.info = Can play audio:        1
dev.cdrom.info = Can write CD-R:        1
dev.cdrom.info = Can write CD-RW:       1
dev.cdrom.info = Can read DVD:          1
dev.cdrom.info = Can write DVD-R:       1
dev.cdrom.info = Can write DVD-RAM:     1
dev.cdrom.info = Can read MRW:          0
dev.cdrom.info = Can write MRW:         0
dev.cdrom.info = Can write RAM:         1
dev.cdrom.autoclose = 1
dev.cdrom.autoeject = 0
dev.cdrom.debug = 0
dev.cdrom.lock = 1
dev.cdrom.check_media = 0

If it depends of the autoclose option, why then it worked properly before? Unlikely that system settings was changed before RC1 release and it is not the best solution to change it. In addition in RC1 sometimes I had the same problem (eject: unable to find or open device for: `cdrom') but in almost all cases I still was able to eject it. So it looks like a gradual regression between releases. Just wondering, but perhaps it somehow related to rejection of HAL... can not remember, but seems that problem appears once I removed it.
Comment 24 Reartes Guillermo 2011-07-15 20:54:39 UTC
> If it depends of the autoclose option, why then it worked properly before?

I don't know, but i think that sysctl defaults are set by de distribution (if i am not mistaken, they are the kernel's defaults than can be later tuned).
I only need to change it with F15, witch coincided with udisks, deprecation by HAL,etc. Maybe HAL could live with it or it was previously 0... i don't know. Or maybe it should be 1 and there is another bug...
Comment 25 Alexander 2011-07-16 14:59:46 UTC
Adding the "dev.cdrom.autoclose=0" option fix the autoclose issue, but now, when I click to eject device in dolphin it says that "The device is currently busy: A job is pending on /dev/sr0". And only if I'll click the eject option again dolphin will eject it.
Comment 26 Reartes Guillermo 2011-07-16 15:22:10 UTC
There is another bug (a bit old) that i found the workaround too quick and did not report it until yesterday, it is related to unmounting any filesystem see 

Bug 277863 - Dolphin cannot umount filesystem (workaround=click HOME and Right-Click filesystem, then umount it that way)

I think it is not related to this, which seems fixed.
Comment 27 Alexander 2011-07-16 15:50:30 UTC
Just now I tried to mount a CD through k3b with dev.cdrom.autoclose = 1 and it works fine, fine mounts and ejects. Also all fine if I'll mount a CD through KDE's devices notifier (it's still unable to eject the compact, but k3b could do it if CD was mounted through the devices notifier applet). But, if I'll mount the CD through k3b or kde's plasmoid and then will open dolphin and try to eject the CD through it or through k3b — the CD ejects and then reinserts back.

To summarize, in all apps mounting/umounting/loading/ejecting works fine, even with autoclose = 1, so there is nothing to do with kernel setting and sysctl. Dolphin is definitely broken and it broke the whole system once I launch it. Change the autoclose option to 0 is just a workaround but not the bug fix.
Comment 28 spam 2011-07-16 16:12:14 UTC
I just checked the behaviour against Xfce (which uses Thunar as filebrowser and gvfs). I set autoclose=1 to disable the workaround and it still worked flawlessly!
In other words, autoclose=1 is just a kde-specific workaround and kde/dolphin deserves to full blame on this.

So can someone please set this bug to "confirmed"?
Comment 29 Reartes Guillermo 2011-07-16 16:28:13 UTC
Well, in my case only dolphin is affected, but i cannot know if it a bug in dolphin, udisks or kernel cdrom driver.

I have found another bugreport at https://bugzilla.redhat.com
Bug 453095 - Cd tray is closed automatically after ejecting 

For some people changing the sysctl settings worked (if it is workaround or fix i really don't know).
Comment 30 Francesco 2011-07-16 21:41:25 UTC
When a CD/DVD is inserted in the device /dev/sr0 and I do an 
udisks --eject /dev/sr0
the drive eject without the reinsertion.

but if I insert a DVD/CD, mount it and then umount the behaviour of udisks change!
after a "udisks --eject /dev/sr0" the drive eject and reinsert itself like dolphin

Try
Comment 31 Francesco 2011-07-16 21:52:08 UTC
This work also if I I use 
eject /dev/sr0 (instead of udisks --eject /dev/sr0)

and also if I press the phisical button on the DVD drive!

In conclusion, the reinsertion takes place only when the CD/DVD is mounted at least once
Comment 32 Reartes Guillermo 2011-07-16 22:07:15 UTC
With sysctl 'dev.cdrom.autoclose=0'

Insert a dvd-r, mount it manually:

# mount /dev/sr0 /mnt
# umount /mnt

# udisks --eject /dev/sr0

It ejects normally, no reinsertion.

Monitoring udisks while performing the previous test shows:

# udisks --monitor
Monitoring activity from the disks daemon. Press Ctrl+C to cancel.
changed:     /org/freedesktop/UDisks/devices/sr0
changed:     /org/freedesktop/UDisks/devices/sr0
job-changed: /org/freedesktop/UDisks/devices/sr0
job-changed: /org/freedesktop/UDisks/devices/sr0
changed:     /org/freedesktop/UDisks/devices/sr0

----------------------------

With sysctl 'dev.cdrom.autoclose=1'

Insert a dvd-r, mount it manually:

# mount /dev/sr0 /mnt
# umount /mnt

# udisks --eject /dev/sr0

It ejects normally, no reinsertion. Yes, it also ejects
normally.


Monitoring udisks while performing the previous test shows:

# udisks --monitor
Monitoring activity from the disks daemon. Press Ctrl+C to cancel.
changed:     /org/freedesktop/UDisks/devices/sr0
changed:     /org/freedesktop/UDisks/devices/sr0
changed:     /org/freedesktop/UDisks/devices/sr0
changed:     /org/freedesktop/UDisks/devices/sr0
job-changed: /org/freedesktop/UDisks/devices/sr0
job-changed: /org/freedesktop/UDisks/devices/sr0
changed:     /org/freedesktop/UDisks/devices/sr0

----------------------------

With sysctl 'dev.cdrom.autoclose=1'

Insert a dvd-r, mount it by dolphin.
Eject it with dolphin, it reinserts.


The problem happens with dolphin/or the applet mounting it.
Comment 33 hilmera 2011-08-13 20:05:34 UTC
*** This bug has been confirmed by popular vote. ***
Comment 34 Andrés Becerra 2012-04-19 22:40:33 UTC
Status in kde-4.8.2 with sysctl 'dev.cdrom.autoclose=0':

- plasma device notifier (dolphin not running):    
  I mount the cdrom, clicking on the "connect" button (works ok)
  Now the "connect" button is transformed to "eject
  I click to eject the cdrom (fails, unmounts the cdrom but can not eject it)

- dolphin opened:
  insert cdrom, dolphin detects it
  I mount the cdrom with dolphin
  I right-click to eject the cdrom (fails, unmounts the cdrom but can not eject it), if I right-click  again, the cdrom is ejected.
Comment 35 Reartes Guillermo 2012-07-21 14:34:22 UTC
On F17:

If i do not set '#sysctl dev.cdrom.autoclose=0' then dolphin (2.0 on KDE 4.8.4) still reinserts the cd/dvd after efecting it.
Comment 36 Alexander 2012-07-21 14:57:36 UTC
(In reply to comment #35)
+1, happens only with dolphin and kde devices manager and looks even more weird because everything is fine if I'll release the device before ejecting. Also k3b ejects CD normally even if it's mounted.
Comment 37 David Faure 2012-07-22 15:01:55 UTC
Isn't this the same as bug 296657 ? It just got fixed.
Comment 38 Reartes Guillermo 2012-07-22 15:31:24 UTC
Yes, it looks to be the same as 1. from <kde bug 296657>
Comment 39 David Faure 2012-08-06 15:10:41 UTC

*** This bug has been marked as a duplicate of bug 296657 ***