nautilus cannot eject ipod while eject(1) does

Bug #211693 reported by scananza
20
Affects Status Importance Assigned to Milestone
Nautilus
Fix Released
High
gnome-mount (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: nautilus

I'm using the very last beta release of Hardy (updated April 3, 2008).

When I plug in my IPOD classic, an icon correctly pops up in nautilus resources and device is mounted.

If I try to eject the device from nautilus or other apps like gtkpod it fails with a subtle "Unable to eject." error message.

If I use $ eject /dev/sda1 from the command line, it works correctly.

Mount/Umount from nautilus works as expected.

ProblemType: Bug
Architecture: amd64
Date: Fri Apr 4 08:46:13 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/nautilus
NonfreeKernelModules: nvidia
Package: nautilus 1:2.22.1-1ubuntu2
PackageArchitecture: amd64
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/home/username/phd/bin/
 LANG=it_IT@euro
SourcePackage: nautilus
Uname: Linux 2.6.24-14-generic x86_64

Tags: apport-bug

Related branches

Revision history for this message
scananza (scananza) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here: http://bugzilla.gnome.org/show_bug.cgi?id=526308. The same message is displayed on my hardy installation but the ipod is ejected correctly though

Changed in nautilus:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Matti Lindell (mlind) wrote :

There seems to be no way to safely remove an ipod using GUI in Hardy as umount leaves the device in "Do not disconnect" state. Using eject from console safely removes the hardware. This is regression from earlier releases and will probably lead to a corrupt song database.

Revision history for this message
Matti Lindell (mlind) wrote :

ejects okay:
$ sudo eject /dev/sdc
$ gnome-mount -e -b -d /dev/sdc2

eject fails:
$ gnome-mount -e -b -d /dev/sdc

gnome-mount seems to fail with an error if ejecting a device instead of a partition. The problem may arise as differently formatted devices have different number of partitions and trying to eject wrong partition yields the same error.

Shouldn't gnome-mount be able to eject a device instead of a partition as the eject -command does?

Revision history for this message
Matti Lindell (mlind) wrote :

Also, ejecting only one of the partitions could lead to http://bugzilla.gnome.org/show_bug.cgi?id=478177.

Revision history for this message
scananza (scananza) wrote :

For now, I umount (not eject the device) and then unplug the ipod, I guess this shouldn't corrupt anything (maybe I'm wrong?) and then the ipod ejects by itself. This bug should definitely be worked out for better usage of the gui, though.

Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue is due to gnome-mount and has been fixed upstream, I'll backport the change to hardy

Changed in gnome-mount:
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-mount - 0.8~svn20080225-0ubuntu3

---------------
gnome-mount (0.8~svn20080225-0ubuntu3) hardy; urgency=low

  * debian/patches/90_from_svn_allow_ejecting_drives.patch:
    - change from SVN, allow to eject drives, make ejecting and ipod in nautilus
      work as expected (lp: #211693)

 -- Sebastien Bacher <email address hidden> Thu, 17 Apr 2008 09:46:50 +0200

Changed in gnome-mount:
status: Fix Committed → Fix Released
Revision history for this message
scananza (scananza) wrote :

Just upgraded to the fix-release, rebooted but the problem persists: gnome-mount -e /dev/sdc or gnome-mount -e /dev/sdc1 (IPOD is third drive) simply do nothing, while eject doesn't work anymore:

krusty@solid-snake:~$ eject -v /dev/sdc1
eject: device name is `/dev/sdc1'
eject: expanded name is `/dev/sdc1'
eject: `/dev/sdc1' is mounted at `/media/IPOD'
eject: unmounting device `/dev/sdc1' from `/media/IPOD'
eject: `/dev/sdc1' is a multipartition device
eject: unable to open `/dev/sdc1'

as you can read, the drive is unmounted but the eject fails.

Trying to eject from nautilus gives me the usual "unable to eject" error message too.

Revision history for this message
Matti Lindell (mlind) wrote :

I can confirm that this is not fixed by latest upload (0.8~svn20080225-0ubuntu3).

$ gnome-mount -v -e -b -d /dev/sdc
gnome-mount 0.8
** (gnome-mount:19725): DEBUG: Ejecting /org/freedesktop/Hal/devices/storage_serial_Apple_iPod_000A270019C58592_0_0
** (gnome-mount:19725): DEBUG: Setting up 750ms timer for Flushing Cache dialog
** (gnome-mount:19725): DEBUG: in unmount_done : user_data = 0x0
** Message: Eject failed for /org/freedesktop/Hal/devices/storage_serial_Apple_iPod_000A270019C58592_0_0: org.freedesktop.DBus.Error.UnknownMethod : Method "Eject" with signature "as" on interface "org.freedesktop.Hal.Device.Volume" doesn't exist

Changed in gnome-mount:
status: Fix Released → Triaged
Revision history for this message
Matti Lindell (mlind) wrote :

Sebastien, could you review the backported patch. There seems to be some sort of logic error compared to patch that was applied upstream:
http://svn.gnome.org/viewvc/gnome-mount/trunk/src/gnome-mount.c?r1=167&r2=166&pathrev=167&limit_changes=100&view=patch

Upstream:
if (found) {
    goto try_drive;
} else {
    if (opt_eject) {

Ours:
if (found || opt_eject) {
    goto try_drive;
} else {
    if (opt_eject) {

I think the latter has a condition where 'else clause' is unreachable when ejecting a device.

Revision history for this message
Matti Lindell (mlind) wrote :

Sorry, I didn't notice debian/patches/06_allow_eject_drive.patch is adding the additional 'if (found || opt_eject)'. Patch probably needs a revisit or the current eject logic is busted.

Revision history for this message
Matti Lindell (mlind) wrote :

Please revisit this in 8.04.1 or as a SRU. I was able to eject both an ipod and an empty cd drive with the attached patch.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-mount - 0.8~svn20080225-0ubuntu4

---------------
gnome-mount (0.8~svn20080225-0ubuntu4) hardy; urgency=low

  * debian/patches/06_allow_eject_drive.patch:
    - don't use this change for now, it breaks the svn backport and it's better
      to be able to eject ipods rather than empty cd drives (lp: #211693)

 -- Sebastien Bacher <email address hidden> Mon, 21 Apr 2008 18:33:16 +0200

Changed in gnome-mount:
status: Triaged → Fix Released
Changed in nautilus:
status: Unknown → Fix Released
Revision history for this message
Sam Liddicott (sam-liddicott) wrote : bug NOT fixed in 0.8~svn20080225-0ubuntu4

bug NOT fixed in 0.8~svn20080225-0ubuntu4

With 0.8~svn20080225-0ubuntu4 when I eject USB removable media as non-root I get:

$ eject /dev/sdg1
eject: unable to open `/dev/sdg1'

# re-insert

$ eject /media/musicplayer
eject: unable to open `/dev/sdg1'

the device still is removed from the mount list in both cases, but I'm not sure if pending blocks were flushed to the device, and I should not be getting the error.

I do NOT get the error if I eject as root

Revision history for this message
krahim (karim-rahim) wrote :

I recently upgraded to hardy and can no longer mount the ipod.

I also had a problem also with burning dvd+rw's where the dvd was mounted as cdrom1 instead of cdrom, I don't know if this is related.

karim@ubuntu01:~$ dmemsg | tail
bash: dmemsg: command not found
karim@ubuntu01:~$ dmesg | tail
[17312467.708000] sda: Mode Sense: 68 00 00 08
[17312467.708000] sda: assuming drive cache: write through
[17312467.712000] SCSI device sda: 991232 2048-byte hdwr sectors (2030 MB)
[17312467.712000] sda: Write Protect is off
[17312467.712000] sda: Mode Sense: 68 00 00 08
[17312467.712000] sda: assuming drive cache: write through
[17312467.712000] sda: sda1 sda2
[17312467.716000] sd 2:0:0:0: Attached scsi removable disk sda
[17312467.716000] sd 2:0:0:0: Attached scsi generic sg0 type 0
[17312469.024000] FAT: Unrecognized mount option "flush" or missing value

Revision history for this message
krahim (karim-rahim) wrote :

Perhaps I posted to quickly there. I rebooted and the ipod mounted.
In the last few versions of ubuntu I don't recall having troubles mounting the ipod.

Karim

Changed in nautilus:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.