6

128GB Micro SD card with exFAT partition does not get detected on my Ubuntu 18.04.1. I have installed exfat-fuse and exfat-utils but nothing happened when I try to reinsert the card. I can't see the card either from mount and lsblk command. The card works fine on Windows 10.

UPDATE

Following this post I think I found the device by doing lspci but it is marked as Unassigned

3b:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)

It says that the driver is not available for used kernel which in my case from uname -r my kernel version is 4.15.0-45-generic

spondbob
  • 183
  • 1
    It all depends on how you switch between Windows and Ubuntu. If you hibernate Windows, you will have trouble. In a terminal window, journalctl --follow, then insert the MicroSD card. – waltinator Feb 07 '19 at 04:59
  • Hi @waltinator, I am running dual boot and I always shutdown the OS when switching between them. I don't think that is the issue as other SD card works fine with FAT partition. – spondbob Feb 07 '19 at 05:10
  • You need to understand that Windows 10 by default has a new feature called Fast Startup enabled. This semi-hibernates the drives and that's why it's generally recommended disabling it in a dual-boot. Try that and see if changes the behavior. –  Feb 07 '19 at 20:09
  • I already have it disabled. I even try to safely remove my SD card from Windows, pull it off, restart to Ubuntu, insert the card back, and still nothing happen. – spondbob Feb 07 '19 at 21:51
  • This might be a hardware problem or a software problem. You can analyze it, and if you are lucky, fix it according to this link answering another AskUbuntu question. – sudodus Feb 06 '20 at 10:14

2 Answers2

2

I have had the same or similar issue: that the SD-card was not detected.

Side note: The "Unassigned class [00ff]" seems to be part of the name of the device. This article has the same report from the lspci and the driver/device is reported as working.

The card had been detected earlier (during the same session), but after being removed (once or twice) it was not detected anymore. After a reboot it was detected again, but after a few mounts and unmounts, it did not respond anymore.

After scanning the /sys/ folder I found that several uevent files for mmc devices only had write-access, and that was only for the root user. (Scan command: find /sys -iname \*mmc\* | sed 's#$#/uevent#' | xargs ls -l) The other had read-access for all. So I gave all the mmc uevent files the same access:

find /sys -iname \*mmc\* | sed s#$#/uevent# | xargs sudo chmod a+r 

After this the SD card is detected all the time but it seems that I have to do lspci or a file browser to help the drivers enumerating/removing the partitions.

I have not found any way for automatic enumeration yet.

EDIT: It now works for me. I have no idea what caused it to work now. Below I have written what I did.
NOTE 1: My normal working environment is Unity with lightdm (gdm is removed).
NOTE 2: I cannot remember if I did reboot my machine between my first version of this answer and the reboots described below. Not I guess. NOTE 3: This did not work before the reboots described below.

  1. I rebooted into a Live Ubuntu 18.04 (USB stick). I entered the SD card and it worked.
  2. (I also rebooted into the BIOS to turn on the network which I believe was turned off before doing the reboot and therefore was not detected after reboot. I cannot remember that I touched any SD card or related settings.)
  3. I rebooted into Ubuntu with XWayland, lightdm and Gnome Shell. It worked right away.
  4. I rebooted into Ubuntu with Xorg, lightdm and Gnome Shell. Once again it worked right away.
  5. I rebooted into Ubuntu with Xorg, lightdm and Unity. It still worked right away.

Possible indirect or direct causes that made it work. * Most certainly the adding of read access did influence this. * Maybe some other unknown changes * The reboot * And possibly running the Live installation. My guess is that the first and the third point are the important ones.

perok
  • 21
0

This seems like it needs a bug report. It's an intermittent problem. It fails and recovers between boot cycles and it's random.

Also,

I had the same problem but I couldn't use your automated script to fix it. I think you may have a typo. I had to change file permissions manually.

find /sys -iname \*mmc\* | sed 's#$#/uevent#' | xargs ls -l

/\
||  that works fine
vs
||  this throws an error
\/

find /sys -iname \*mmc\* | sed s#$#/uevent# | xargs sudo chmod a+r 

missing '' single quotes on sed 's#$#/uevent#' ? I was too chicken to experiment. I'm not well versed in shell scripting or operating systems.

I had to change the file permissions manually and reboot. There was only one file, but I didn't save the path so I don't know which file I changed.

When I rebooted, there was still only one file:

--w------- 1 root root 4096 Feb 5 22:50 /sys/bus/mmc/uevent

and even though it's write only again, the memory card reader is still working.

Seems very fishy and I'm not convinced this is a robust fix and won't fail again. Should be entered as a bug report somewhere. If it is indeed an uninitialized variable somewhere that tweaking file permissions can repair, there's no guarantee it won't fail again later if that uninitialized variable gets altered, e.g. by a system update.

Additional info:

I'm using this box that comes with a 4 port USB 3.0 PCIe card with two internal ports that are routed to the box in the front panel:

https://www.centralcomputer.com/comkia-usb-3-0-internal-card-reader-usb-3-0-pci-e-1x-card-support-cf-md-sd-ms-xd-sdhc-sdxc-micro-sd.html

but this other box also from Comkia that I tried seems to work fine when connected to the dual USB 2.0 socket on the motherboard:

https://www.centralcomputer.com/p-IOC-CRMLCB01-comkia-all-in-1-internal-card-reader-w-bluetooth-support-sd-sdhc-ms-cf-md-mmc-xd-micro-sd.html

I confirmed that plugging a USB stick into the USB 3.0 PCIe card supplied with the first box reproduces the intermittent behavior, as expected since the front panel USB 3.0 port on that memory card reader that also doesn't function reliably is probably just hard-wired straight through.

I'm thinking it's a problem with the OS not properly detecting or reading the USB card reliably, and not related to the card reader box itself. I'm wondering if other USB PCIe cards face the same issue.

I can see the memory ports and the USB stick in the bios under boot options so I know it's working fine, but Ubuntu can't figure out that the thing is there reliably even though the bios sees it.

If it was related only to a funky file permission, it wouldn't work at all until the file permission was fixed, and the file permission would stay fixed through a reboot if that fixed the problem. I don't think you've adequately identified the root cause of the problem.

Possible solution:

I'm contemplating a work-around for the PCIe card by connecting a dual port USB 3.0 box that simply converts the mother board dual USB 3.0 port connector into a front panel pair, that is normally supposed to mount in a 3.5" drive bay but instead leaving it inside the case to act as an adapter between the card reader box and the USB 3.0 dual port connector on the motherboard.

https://www.amazon.com/Bytecc-Front-Bracket-Dual-Tray/dp/B00I609FS4?SubscriptionId=AKIAILSHYYTFIVPWUY6Q

It's a waste of the USB card, but it saves me a PCIe slot and fixes the problem without having loose boxes cluttering the space around the machine or having to reach around behind the computer for the rear external ports on the motherboard. It clutters th inside of the case with a floating plastic box instead. Ugly.

My other option is to use the other functional (USB 2.0) memory card reader box, forego the front panel USB 3.0 connector on the other (USB 3.0) box entirely, and settle for USB 2.0 speed on the memory card reader with bluetooth instead of a front panel USB 3.0 port.

Haven't decided yet but I'm thinking maybe I would rather have bluetooth. Haven't tested to see if it's actually functional. Becoming impatient.

Found this link. Apparently just marking the box with 'Linux' doesn't mean the USB card that is supplied with the reader is actually supported.

https://help.ubuntu.com/stable/ubuntu-help/hardware-cardreader.html