25

I have noticed troubles with my microSD card in my Android phone and when I tried to insert it into my Linux laptop, I get the following error in dmesg:

[  247.588279] mmc0: error -123 whilst initialising SD card
[  247.591314] sdhci-pci 0000:0d:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
[  247.648629] sdhci-pci 0000:0d:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
[  248.903044] mmc0: card never left busy state
[  248.903051] mmc0: error -110 whilst initialising SD card
[  248.907007] sdhci-pci 0000:0d:00.1: Will use DMA mode even though HW doesn't fully claim to support it.

Does this mean my microSD card is broken? How could it suddenly happen in my phone? Is there no way to recover eve partially the data on it?

drs
  • 2,953
denisq
  • 350
  • 1
  • 3
  • 8

5 Answers5

8

Your SD card has died. This happens over time, anything like a drop or a lot of use can cause a SD card to die. I have had the same thing happen to me on a 16GB micro SD card used with my Raspberry Pi 2. It just stopped working one day.

The only way you could possibly get the data off the SD card at this point is to take it to a professional in the Data Recovery Field.

Kalle Richter
  • 2,472
  • 6
  • 44
  • 64
Lektonic
  • 862
6

Do you use an SD adapter with a mechanical write lock switch?

Indeed, an old SD card of mine (no adapter needed) has the same problem on my Lenovo ThinkPad E540. The solution in my case is toggling the write lock switch a couple times. Since this is purely mechanical, I suspect a buggy/mangled card port -- mine looks and... "sounds" pretty flimsy!

sphakka
  • 197
5

I see exactly the same error in my Lenovo Laptop while trying to mount a SD card, and I must say that SD cards support on the Linux desktop is unfortunately suboptimal. The same card works perfectly fine in my Android phone and in my camera!

As a workaround, to make it work in the desktop, the only solution I have found is leaving it connected, and waiting for a few minutes until the error stops and the device appears.

2

Try connecting the SD card using a USB memory card reader.

This worked in my case, a Lenovo laptop running Ubuntu 16.04, and the SD card is definitely recognized in other operating systems.

Instead of getting the error messages when running dmesg

[  882.603991] mmc0: card never left busy state
[  882.604001] mmc0: error -110 whilst initialising SD card

I get the success messages

[ 1724.883050] sd 6:0:0:2: [sdd] 250607616 512-byte logical blocks: (128 GB/119 GiB)
[ 1724.888318]  sdd: sdd1

I'm not sure if reading speed is as fast as connecting the SD directly to the laptop but I'm glad the SD is at least recognized.

2

I've run into this with almost-new SD cards on modern Linux machines, where the same cards work fine in Raspberry Pis (running Linux!) with no hitches. My suggestion is first to:

  • remove, wait a few seconds, and re-insert the card
  • running sudo partprobe occasionally works (you might need to install a package first depending on your system)
  • as Teresa says, wait a few minutes and the kernel will be able to detect the card

Oh, and backup your card because it could well be about to die, regardless of age.

Jonny
  • 131