I'm running LUbuntu 18.04 on a Lenovo T450s. The SD card is usually recognized just fine when it is inserted into the slot, but sometimes, inexplicably, I will insert a card and nothing will happen. I don't see any messages in dmesg, no error message, no indication of any kind that I did anything. If I reboot it seems to clear the problem up, especially if the card is already in the slot - although this is inconvenient because then I have to get everything back to where it was when I was ready to read files off the card.

I'm not 100% sure, but I have read that the SD card reader on this system is PCI based. Is there some command I can run to diagnose and possibly fix this issue when it occurs without the need for a reboot?

  • lspci will list pci device while lsusb will list usb device. run them and check fi you find sth, that looks like a card reader. I would assume it is usb. – mbeyss Aug 20 '18 at 8:54
  • @mbeyss Yup, i'ts PCI... "02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)" – Michael Aug 20 '18 at 19:47

Per the suggestion of @mbeyss I found the card reader under PCI (lspci) and it is reported as:

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

In this answer I found some modprobe commands which purport to reload the drivers. But when I try to "modprobe -r" the rtsx_pci module, I get the error:

modprobe: FATAL: Module rtsx_pci is in use.

Funny, I thought modprobe was supposed to figure out dependencies for me automatically. I found this thread; lsmod reports these modules:

rtsx_pci_ms            20480  0
memstick               16384  1 rtsx_pci_ms
rtsx_pci_sdmmc         24576  0
rtsx_pci               65536  2 rtsx_pci_sdmmc,rtsx_pci_ms

So I ran the following commands:

sudo modprobe -r rtsx_pci_sdmmc rtsx_pci_ms memstick rtsx_pci
sudo modprobe rtsx_pci

Now, if I run this without an SD card in the slot, when I subsequently insert a card it is not recognized, no messages show up in dmesg, etc. Why the card is not subsequently recognized is an open question. But if the card is in the slot when I run this, the card is immediately recognized and I get the popup asking me what I want to do with the card.

  • I have seen similar behavior in (USB) card readers, that is if connected with a card inside, everything would work fine, but if the card is inserted afterwards it would not work. You are basically reloading all drivers which is kind of like reconnecting the device. – mbeyss Aug 21 '18 at 8:54

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.