sd card "safely remove drive" kills reader device

Bug #504440 reported by computx
118
This bug affects 20 people
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Won't Fix
Low
Unassigned
Nominated for Precise by Po-Hsu Lin

Bug Description

Binary package hint: gvfs

Ubunto 9.10 on amd64
I mount an sd card in my internal media reader. All works normally until I do "safely remove drive" which unmounts the drive but also kills the media reader. The light gos out on media reader and no other sd cards will work until reboot. Drive worked fine until last couple of weeks.
lsusb reports the media reader is
Bus 002 Device 002: ID 058f:6362 Alcor Micro Corp. Hi-Speed 21-in-1 Flash Card Reader/Writer (Internal/External)
If I open a terminal and umount /media/disk the drive still is available for the next sd card.

ProblemType: Bug
Architecture: amd64
Date: Thu Jan 7 14:11:58 2010
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release Candidate amd64 (20091020.3)
NonfreeKernelModules: fglrx
Package: gvfs 1.4.1-0ubuntu1
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: gvfs
Symptom: storage
Uname: Linux 2.6.31-17-generic x86_64

Revision history for this message
computx (afleak) wrote :
Revision history for this message
Sushenjit Bandyopadhyay (s-bandyo1) wrote :

I found the same problem in my 32bit Ubuntu 9.10 as well.

Revision history for this message
Jouni Mettala (jouni-mettala) wrote :

Nautilus has also option to unmount memory card. Then you can change card. Safely remove drive option is useful to remove whole card reader You can then use it as external card reader.

After card reader has been safely removed it can be physically reconnected and it works again. Hope this helps.

Revision history for this message
oriolpont (oriolpont) wrote :

Jouni, the problem is with internal readers, which cannot be reconnected without disassembling the computer.

Also, the description says "Drive worked fine until last couple of weeks": do you mean that this has been a regression in a Karmic update? This is not my case: since the release of the "safely remove" option I am experiencing that it disconnects the internal reader. "Eject" option works well.
It is really disturbing, but only the first time, until the user learns that safely removing that drive will disable it until next reboot.

Actually, as mentioned in bug #404185 (eject working as safely remove) the key point is to identify internal devices and do not offer the option to "safely remove" them, but this is quite difficult as they are usually connected through USB (an internal USB port) just like external devices. Another possibility could be to enable a reconnect signal for repowering up the device without actually disconnecting the cable (though I am not sure if the USB controller allows this).
In that case, I think that possibly linux and devicekit packages are also affected by this bug.

Revision history for this message
computx (afleak) wrote :

FYI In the previous version 9.04. "Safely remove" worked correctly and didn't kill the internal reader. I discovered that unmount and eject do work correctly in 9.10 as others have mentioned but to those who are used to using usb in windows, safely remove seems like the obvious choice. I believe all safely remove needs to do is unmount the device regardless of its nature. So I don't understand why it tries to do more. It is not removing the driver module that I can tell but not sure what it is doing to disable the reader.

Revision history for this message
oriolpont (oriolpont) wrote :

I cannot see a regression here: In up-to-date Jaunty (supported updates, at least), the "safely remove" option that I see in desktop and nautilus sidebar is actually called "Unmount" and it does the same as Unmount does in Karmic: it unmounts the filesystem.

Unmounting the filesystem does not prevent raw blockdevice access (e.g., fdisk or dd), as opposed to Eject and Safely Remove, which actually turn off all access to the media. Therefore, these options are safer that unmounting (although calling these before a dd has ended will kill dd and could corrupt the data in any case).

In addition, "safely remove" shutdowns the device so that it has to be reconnected to use it again (as computx notes, it is not a question of modules or services that could be reloaded without physical reboot AFAIK). This avoids electric transients, which could eventually damage the microchips (even those designed for hotplug). Despite the fact that this is not a very common issue, it is a progress that Ubuntu is implementing this, that they do "more" than unmounting.

Revision history for this message
Alexander Fomichev (alfonder) wrote :

Let "safely remove" work as it does. But it is very necessary to add "reconnect device" command for internal card readers (or maybe for any removable storage). This would solve the problem perfectly.

Revision history for this message
Rajoy (siberia-accanto) wrote :

Affects me in the latest 10.04! Nothing done about the bug. Whatever decision, do anything on this, please!

Revision history for this message
Martin Pitt (pitti) wrote :

We changed the default action (in the nautilus bar) to do an eject, not a safe removal, for this very reason. You really do not want to remove the internal drive. :-)

I'm afraid there is nothing we can do about this right now, since this kind of hardware unhelpfully does not say that it is not really hotpluggable.

Changed in gvfs (Ubuntu):
status: New → Won't Fix
Revision history for this message
NoahY (noahy) wrote :

Is there at least somewhere we could turn for instructions on how to restart the device without rebooting? Or is that impossible?

Revision history for this message
h3 (h3) wrote :

I'm on Ubuntu 10.04 and I have the same problem .. Since I did a "Safely remove" on my internal card reader it stopped working .. even after rebooting.

Then I started using my external USB card reader since I needed to keep working, and after a while I always ended up clicking "Safely remove" .. a bad Windows habit that sticks..

So one by one I killed my all my ports, now my card reader wont work in ANY USB ports and rebooting does not resolve the issue at all.

This situation is ridiculous, really.

Revision history for this message
h3 (h3) wrote :

Just rebooted again just to be 100% sure. My internal card is still dead (no lights when i insert a SD card).

This god damn button should be called "Brick your drive", not "Safely remove drive".

Revision history for this message
h3 (h3) wrote :

Just found how to fix my problem .. a simple reboot wont do it. I must "Shut Down" my computer, wait a couple of seconds and start it.

Really convenient.

Revision history for this message
oriolpont (oriolpont) wrote :

h3, it seems that you have a different issue. If you read the bug description it says that "kills reader device" just means that it stops being powered and it is not repowered until next reboot. Apparently, what you experience is a permanent break, so it is something unrelated to this bug report.

Also, it is strange that you could permanently break these devices just by software. Could you try if your device works from a liveCD or another installation? Also, if your external reader is working in another computer? You might have an electric problem in your computer. If it is a configuration problem I suggest you to ask for support in the forums to solve your issue.

Revision history for this message
h3 (h3) wrote :

@oriolpont

See my last comment .. reboot did nothing, but shut down the PC and waiting a little before starting it did the trick.

Now what I don't get is that I did another "Safely remove" by accident, and it did not kill the internal card reader this time.

Go figure.

Revision history for this message
mannheim (kronheim) wrote :

Although "Won't Fix" may be right for the bug against gvfs, there is a bug here which really, really needs fixing. Steps to reproduce on my machine:

1. Boot to desktop and log in.
2. Insert a memory card and wait for the icon to appear on desktop.
3. Select "Safely Remove Drive" in the contextual menu.

After step 3, the built-in 7-in-1 memory-card reader on my Dell inspiron is unusable without a reboot. To the end-user, there is no difference between a "disk" and a "drive" and a whatever. So the user (me) will choose "Safely Remove Drive" just as often as "Eject". Indeed, the added word "Safely" makes it seem like the better option.

I think the bug is that the option "Safely Remove Drive" appears at all. For example, with my built-in CD drive, the option "Safely Remove Drive" does not appear: only "Eject". For other built-in drives with removable media, the menu should be the same (although the word "Eject" is a bit awkward.)

Revision history for this message
frotz (frotz) wrote :

The fact that it's still possible to disable an internal USB device such that a reboot or opening up the case is required screams very loudly that this issue is NOT settled in the slightest. This should NOT be labeled "WON'T FIX". I've seen references to forcing the operating system to rescan all USB devices to, in effect, unplug and replug idled devices. Does anyone remember what was involved in this? I could have sworn I replied to a thread discussing this, but all the fiddling with Google and the local search engine turns up nothing.

Revision history for this message
David Tombs (dgtombs) wrote :

As Martin Pitt wrote, the default option is now "Eject", which mostly fixes the usability issue. One actually has to right-click and choose a non-default option to encounter this bug. Note also that I regularly do use "Safely Remove Drive" when removing a USB HDD because that is the option which powers down the drive before removing it.

Martin is correct in Won't Fix. This bug has been worked around to the extent possible, and the Ubuntu developers have no way to fix it completely.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Is there no way to differentiate between a storage device that needs to be safely removed and a media in a reader?

Dave

Revision history for this message
Jonathan Marsden (jmarsden) wrote :

Two ideas:

(1) Is there any way to implement a "reconnect device" option, as suggested in comment #7 some months ago?

While less than ideal, this would be one way to help people who make this mistake to recover from it themselves.

(2) Alternatively, a language change to the context menu, so the item concerned does not say "Safely remove drive", but instead says something closer to "Power down external device" might help, since it then (a) sounds a bit scarier and (b) does not look so similar to the Windows message people are apparently confusing it with.

"Won't fix" seems inappropriate to me. If I can't be "fixed" at a deeply technical kernel level, fine, let's come up with a way to minimize the issue at a UI level instead. Not just ignore the problem.

Revision history for this message
David Tombs (dgtombs) wrote :

I like idea #2. Jonathan, how about opening up a new bug for the text change? Trying to transform this bug into a UI change might create too much confusion. :)

@Dave: Not sure exactly what you're asking. An external USB HDD and an internal USB-attached card reader appear exactly the same to the system if that answers your question.

Revision history for this message
Jonathan Marsden (jmarsden) wrote :

David Tombs wrote:

> how about opening up a new bug for the text change?
> Trying to transform this bug into a UI change might create too much confusion. :)

OK. There is also bug #404185 which seems highly relevant to all of this.

I'm a little concerned about having too many bugs all related to the same underlying issue, that of internal devices which appear to the OS as external, and so can be "safely removed" in Nautilus -- which is not in fact safe, and kills them!

From a user perspective, this is one issue. How we address it (kernel, UI, documentation, all three, ...) does not change that. Anyway, bug #706436 now exists, against nautilus, let's see what happens :)

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 504440] Re: sd card "safely remove drive" kills reader device

Dave Gilbert [2011-01-22 15:59 -0000]:
> Is there no way to differentiate between a storage device that needs to
> be safely removed and a media in a reader?

There is, it works fine for e. g. CD-ROMs, SD card readers, and so on.
The problem is that most USB sticks lie and claim that they would have
ejectable media.

Revision history for this message
David Tombs (dgtombs) wrote :

@Jonathan: I know what you mean about lots of bug reports, but having them separate is most pragmatic. Bug reports easily get muddled up with people going in different directions, so it works out best to have multiple clearly-defined reports.

Revision history for this message
mallangong (mail-mallangong) wrote :

Would be nice to see a fix to this, if I'm copying data from a few memory cards I have to reboot between each one because the whole card reader is disconnected rather than just the media in the drive. (Card reader using m-board USB, 11.10).

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu laptop testing tracker.

A list of all reports related to this bug can be found here:
http://laptop.qa.ubuntu.com/qatracker/reports/bugs/504440

tags: added: laptop-testing
Revision history for this message
oshunluvr (stuartksmith) wrote :

Wow, this bug has persisted from 9.10 to 13.04. Is this ever going to be addressed?

Revision history for this message
Martin Pitt (pitti) wrote :

This was actually fixed in 13.04.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

oshunluvr: If you're still seeing this bug, please open a new bug, and add a comment here with the bug number (and mention this bug in your new bug).

In your new bug please state the model/make of the card reader you're using (include the output of lsusb if USB attached).

Dave

Daniel Manrique (roadmr)
Changed in gvfs (Ubuntu):
importance: Undecided → Low
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Also affects Realtek [0bda:0129] Card reader.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

CID: 201201-10377, 201201-10378

On 12.10 and 13.04
The "safely remove" option was gone, thus the card reader itself won't be removed.

However, this bug still affecting 12.04.3 Precise (3.8 kernel), series nominated

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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