GNOME Bugzilla – Bug 641873
To remove a USB stick have to use "safely remove drive " twice
Last modified: 2011-10-20 19:25:43 UTC
When a USB flash drive (SanDisk Cruzer Mini, Kingston Data Traveler, etc.) is plugged in and mounted, in order to remove the drive "safely," one right-clicks on the desktop icon and selects "Safely Remove Drive." On some hardware sets this action is required twice as the first such action makes the icon go away and then come back without disconnecting the drive. This is confirmed multiple times and has been reported to the Ubuntu (at least) bug tracking system at https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/624755. This is a REALLY annoying bug and can cause data loss if the user is unaware of the issue and removes the drive before the second action.
On what hardware does this happen?
For me: On nvidia chipsets, this problem occurs. (In my case, nvidia's MCP61 chipset with the ohci_hcd and ehci_hcd drivers) On Intel chipsets, this problem does not occur. (Test case is Intel Corporation 82801JI (ICH10 Family) controllers with the ehci_hcd an duhci_hcd drivers) There are other hardware sets specifically called out in the Ubuntu launchpad bug I cited.
I get this consistently with a Kingston USB drive. One feature I have not seen mentioned is that the initial mount is at hi speed (USB 2.0 speed), whereas the second (after the first "Safely Remove Drive") is at full speed (USB 1.1 speed). This shows up on my USB drive because it had different LED lights for the different speed connections (blue for USB 2.0 hi speed; red for USB 1.1 full speed).
Created attachment 188069 [details] My dmesg-Logfile
I've found something interesting in my dmesg-Logfile after the respawn of my usb-device. First time: [ 968.188033] usb 1-8: new high speed USB device using ehci_hcd and address 6 Then I click "Safely remove drive", after a few seconds, the device respawns. And then: [ 1005.992037] usb 2-8: new full speed USB device using ohci_hcd and address 4 Why he uses ohci now? Could this be a driver related problem?
I've started getting the same problem on Gentoo. After doing "Safely Remove Drive" of a high speed USB flash drive on ehci_ocd controller, it comes back a few seconds later as a full speed drive on ohci_ocd controller. My machine has nVidia MCP55 chipset. I'm using udisks 1.0.2 and udev 168 on Gentoo.
I can reproduce the problem with the udisks command line tool. In the following example, I'll assume the USB has a single partition /dev/sdb1. First, unmount the filesystem: udisks --unmount /dev/sdb1 Then detach the drive: udisks --detach /dev/sdb As with the "Safely Remove Drive" feature, the device gets disconnected from the ehci_ocd controller (nVidia MCP55 in my case) and a few seconds later reappears on the ohci_ocd controller.
It definitely seems specific to nVidia chipsets. On my machine with nVidia MCP55 chipset, I just plugged in a NEC USB 2.0 PCI card (with ehci and ohci) and plugged the USB drive into that. When I "safely removed" the drive from the ehci controller it behaved correctly (i.e. it didn't reappear on the ohci controller). Plugging the USB drive into an nVidia USB port on the same machine causes the problem.
I'm sure this bug isn't caused by gnome or nautilus! It belongs to udev. So this is the wrong place to discuss about this bug. Can someone with a better english then mine report this bug to udev? :)
Yeah, this is not a Nautilus issue, but a kernel/udev problem with Nvidia chipsets.