9

I own a laptop with a built-in card reader. For the past year or so, I've been coping with a curious problem that seems more software related than hardware.

I run a dual-boot of Windows 7 and Ubuntu 14.04, both 64-bit. Under Windows, the SD card works just fine. It runs somewhat slow, but it always manages to complete without errors.

Under Ubuntu, it suddenly stops, and I get these messages when I type dmesg in a terminal:

[12535.092927] mmcblk0: mmc0:b368 SD    1.88 GiB 
[12535.096167]  mmcblk0: p1
[12653.904243] mmc0: Timeout waiting for hardware interrupt.
[12653.904974] mmcblk0: error -110 transferring data, sector 158279, nr 1024, cmd response 0x900, card status 0xc00
[12663.930682] mmc0: Timeout waiting for hardware interrupt.
[12663.930823] end_request: I/O error, dev mmcblk0, sector 158279
[12663.930838] end_request: I/O error, dev mmcblk0, sector 158287
[12663.930845] end_request: I/O error, dev mmcblk0, sector 158295
[12663.930852] end_request: I/O error, dev mmcblk0, sector 158303
[12663.930858] end_request: I/O error, dev mmcblk0, sector 158311
[12663.930864] end_request: I/O error, dev mmcblk0, sector 158319
[12663.930871] end_request: I/O error, dev mmcblk0, sector 158327
[12663.930877] end_request: I/O error, dev mmcblk0, sector 158335
[12663.930883] end_request: I/O error, dev mmcblk0, sector 158343
[12663.930889] end_request: I/O error, dev mmcblk0, sector 158351
[12673.957122] mmc0: Timeout waiting for hardware interrupt.
[12674.002269] mmcblk0: error -110 transferring data, sector 159303, nr 1024, cmd response 0x900, card status 0xc00

This happens with any SD card of any storage size, and it will happen at any time while transferring, especially with large files or large amounts of files. I have right-clicked on the SD card icon on my Ubuntu panel and clicked Safely remove before ejecting the SD, and have even reformatted the SD so that it was free of errors, but it still gives me problems. My USB flash drives are formatted in the same format (FAT32) as the SD card, and they all work fine. Why can Windows read/write to my card well and not Ubuntu?


Output oflspci (card readers only):

02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57785 Gigabit Ethernet PCIe (rev 10)
02:00.1 SD Host controller: Broadcom Corporation BCM57765/57785 SDXC/MMC Card Reader (rev 10)
02:00.2 System peripheral: Broadcom Corporation BCM57765/57785 MS Card Reader (rev 10)
02:00.3 System peripheral: Broadcom Corporation BCM57765/57785 xD-Picture Card Reader (rev 10)
  • 3
    Could you add any information about the hardware? For example, finding the reader in lspci or lsusb and adding that information to your question might help find other people find other people with the same problem. – Oli Nov 23 '15 at 9:54
  • What format does the SD card have on it? – Charles Green Nov 26 '15 at 1:23
  • 1
    It's worth checking: I think Ubuntu has some problem with exFat which is a variant of the FAT and FAT32 systems. – Charles Green Nov 26 '15 at 1:32
  • It really depends upon how the device in question was formatted: Since you have reformatted the device in Ubuntu, I would have trouble believing it is exFAT – Charles Green Nov 26 '15 at 1:36
  • Missed the chat thing - I really dont have a lot to add, but thought maybe we were overlooking a little thing.... – Charles Green Nov 26 '15 at 1:54
6
+50

I don't have your hardware, but had similar issues with Broadcom and their drivers. Very frustrating. That aside, this may well be worth a shot:

  1. Create a file and write this string into it options sdhci debug_quirks=0x40:

    sudo sh -c 'echo options sdhci debug_quirks=0x40 >> /etc/modprobe.d/sdhci-pci.conf'
    
  2. Now reboot, or reload the module:

    sudo modprobe -r sdhci-pci sdhci
    sudo modprobe sdhci-pci
    

The bug tracker mentioned that it may not give you full speed, but it's worth a try.

(From https://bugzilla.kernel.org/show_bug.cgi?id=73241 and http://www.linuxtechtips.com/2013/08/sd-mmc-ms-pro-card-reader-not-working.html)

| improve this answer | |
  • It's working! Managed to salvage what was in it via cut-and-paste (albeit everything ran S L O W L Y), and I'm currently formatting the SD card. Fingers crossed! – user454723 Nov 30 '15 at 5:01
  • Cut-and-paste everything back to a freshly-wiped SD card, and even added nearly 1 GB of stuff that I've wanted to add. Transfers slow, but no I/O errors. A million thanks! – user454723 Nov 30 '15 at 5:08
  • Glad it worked! – G Trawo Nov 30 '15 at 16:23
  • I had to do $ sudo setpci -s 00:1c.2 0x50.B=0x41 after that – MInner Jul 9 '17 at 2:26
1

I have faced with this issue on linuxlite. The solution was to create a file /etc/modprobe.d/sdhci-pci.conf with the content:

options sdhci debug_quirks=0x40 debug_quirks2=0x4

The option 0x4 decreases speed from ultra high speed to high speed, but it is better that not operable card.

| improve this answer | |
0

Some quick googling for information on your card controller returns other posts from people pointing at the kernel as the culprit. I don't have a specific bug report on hand to reference so I can't say for sure if the fix exists upstream but there is an easy way to find out if it is available. Install and boot to a more recent kernel and see if the SD card problem has improved. No harm will come to your computer and you can always remove it if you don't need it.

Run apt-cache search linux-generic-ltsto see the other available kernel packages. The latest I see in the repository is linux-generic-lts-wily. You can sudo apt-get install linux-generic-lts-wily and then reboot into the new kernel and test the SD drive again.

| improve this answer | |
  • Will this change my Ubuntu version from 14.04 (Trusty) to 15.10 (Wily), or simply improve the kernel? – user454723 Nov 27 '15 at 22:41
  • It will only upgrade the kernel. Your Ubuntu release version will be unaffected. – Stephen Nichols Nov 27 '15 at 22:52
  • Nope, same problem. Had to force-eject, and every time I force-eject, the card will never register (Ubuntu will try to read it, but something in the background "hangs") until I reboot. – user454723 Nov 27 '15 at 22:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy