Realtek rts5229 not detected

Hi all and welcome back!,

Today i am behind my wifes laptop and want to use the sd card to put some photo's on. The sd card is not detected and i tried others. I think the driver is not installed so i tried this method but it is still not working.

git clone https://github.com/Zibri/Realtek-rts5229-linux-driver.git
sudo mkdir /usr/src/rts5229-1.07
sudo cp Realtek-rts5229-linux-driver/* /usr/src/rts5229-1.07
cd /usr/src/rts5229-1.07
sudo su

dkms install -m rts5229 -v 1.07
exit
sudo mkinitcpio -p linux
sudo dkms autoinstall
reboot

from the lspci command i get this output

xxxx@pop-os-21-04:~$ lspci
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Thames [Radeon HD 7500M/7600M Series]
08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 05)
09:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)

https://bugzilla.kernel.org/show_bug.cgi?id=204003

I've done more investigating of this regression and I've narrowed it down to rtsx_pci_init_ocp() in drivers/misc/cardreader/rtsx_pcr.c. It is called by rtsx_pci_init_hw() (from the same source file. If a comment out that call, build and install the resultant kernel, the rts5229 reader and the card inserted in are detected and work fine. The machine is an Intel NUC Tall Arches Canyon NUC6CAYH Celeron J3455. I can't take this diagnosis any further because, as far as I can see, the only change the patch identified as the culprit (see comment 10 above) makes to rtsx_pci_init_ocp(), shouldn't be executed for the rts5229. So far, I've built and installed 5.7.12 and 5.4.54 the latter of which I am currently running on the machine. I think I tried an unpatched 5.7 series kernel earlier in my investagations and the card reader did not work. To be sure, I'll build an older 5.4 kernel that more closely matches the one currently included in Ubuntu 20.04, and check whether that works when rtsx_pci_init_ocp() is not called.

1 Like

Thanks @Aravisian i came accross the same page this morning.

The weird thing is it does detect the micro sd cards (32GB), but not the SDXC card (128GB). The 128GB card did work fine on her laptop when she used Windows 10. I also checked if it worked on my laptop and it does.

Possible fix ? if so can this be installed somehow ?

https://patchwork.kernel.org/project/linux-mmc/patch/20190827081043.15443-1-ulf.hansson@linaro.org/

1 Like

Really, the Zibri driver you installed should have done the same.

1 Like

That one did not work sadly. None of the info i found did fix the problem with sdxc

I noticed that...

Got it to work. This time i did something else, i did use the repo but i blacklisted the files somewhere else as where the repo suggested.

  1. gedit /etc/modprobe.d/blacklist.conf
  2. Add these 2 lines

blacklist rtsx_pci
install rtsx_pci /bin/false

  1. git clone https://github.com/Zibri/Realtek-rts5229-linux-driver.git
  2. sudo mkdir /usr/src/rts5229-1.07
  3. sudo cp Realtek-rts5229-linux-driver/* /usr/src/rts5229-1.07
  4. cd /usr/src/rts5229-1.07
  5. sudo -i
  6. dkms install -m rts5229 -v 1.07
  7. sudo update-initramfs -u
  8. sudo dkms autoinstall
  9. reboot

1 Like

OMG, this is exactly the type of thing that makes my head pop with stuff like this. I am so grateful that I don't have to deal with all this garbage. I am glad you got it working Michel. But yeah, all that GIT code, and blacklisting, its like trying to learn programming for me, I just can't handle it.

Good job regardless!

1 Like

Thats why i love linux so much. When you google for the issues you get some pages with info. I found the github page first and followed their instructions to move the blacklisted file (Copy blacklist-rts5229.conf to /etc/modprobe.d/ (Optional)). When i updated initramfs i got alot of error messages. So i removed the file with the rm command.

So i googled how i could blacklist those files and someone posted those 2 lines to put it in the /etc/modprobe.d/blacklist.conf. So i tried that one and updated initramfs again without errors. Rebooted, checked again and the sd card is working :innocent:.

Some commands from the github page did not work. Like sudo su (sudo -i) and sudo mkinitcpio -p linux (sudo update-initramfs -u)

So it was a bit puzzeling for me :grin:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.