Internal SD card reader not detected HP realtek RTS5227

Holy crap, I finally got it to work.

Okay, so here's what I did.

From the last line of lspci it was clear that I needed the RTS5227 driver. However, I really couldn't find this anywhere online.

Instead, I took the RTS5229 driver from the Realtek website and did the following.

I uploaded these files to use as the RTS5227 driver for anyone else in need.

Download

The download link has since expired so the source has been put into a GitHub repo with these changes as well as some additional ones to get it to work on 20.04 kernel 5.4.0.

Source

Here's what I did for those who don't trust the link or want to do it manually:

Go into rtsx.c and remove the following pieces of code from the file:

  • __devinit
  • __devexit
  • __devexit_p
  • comment out .proc_info = proc_info on line 266 by adding // in front of the line.

Then, in rtsx.h, change
#define CR_DRIVER_NAME "rts5229" to
#define CR_DRIVER_NAME "rts5227".

Then, in Makefile, change TARGET_MODULE := rts5229 to TARGET_MODULE := rts5227.

After all this, you should be able to normally install the driver like so:

  1. make
  2. sudo make install
  3. sudo depmod
  4. sudo modprobe rts5227

You should now see the SD slot in nautilus and in the launcher (on Ubuntu).

Hope it helped, and thank you to everyone for the support!!!