Vincent's Blog

Current UBC undergraduate student, Debian/FOSS aficionado, and aspiring software developer.

Toshiba Satellite P850: RTS5229 SD card reader not working

It turns out that after thoroughly testing the new laptop I got a few months back for hardware compatibility issues with Linux, there was one thing I forgot to check: the built-in SD card reader slot. And of course, it happens to be the one thing that doesn’t work out of the box (aside from Nvidia’s Optimus, but I’ll save my rant on that topic for another day). However, it turns out that Realtek does distribute source code for their out-of-tree rts5229 kernel module, which is used by my laptop’s SD card reader, so luckily enough it didn’t take me long before I got my card reader working and could get back to work. Details and a dkms package for Debian/Ubuntu users below…

If you’re here, you probably want to know how to get your card reader working as it should be. First, check to make sure that we’re talking about the same (or similar enough) hardware:

$ lspci -vnn | grep -A5 RTS5229
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader [10ec:5229] (rev 01)
Subsystem: Toshiba America Info Systems Device [1179:fb30]
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at f6800000 (32-bit, non-prefetchable) [size=4K]
Capabilities:
Kernel driver in use: rts5229

(The “kernel driver in use” line won’t show up until you’ve actually installed the driver, of course.)

You can fetch source code for the rts5229 module directly from Realtek (look for “PCIE RTS5229 card reader driver for Linux”; it’s at version 1.07 at time of writing). Installation is simple; unzip it, untar it (don’t ask me why Realtek put a tarball inside of a zip file…), cd into the source directory, and then:

$ make
# make install
# depmod -a

After which you can either reboot, or manually load the rts5229 module. It’ll be automatically loaded on each subsequent reboot, regardless.

# modprobe rts5229

Of course, once you install a new kernel, you’ll have to repeat the above steps, which is where dkms comes in: it’ll automatically rebuild any out-of-tree modules registered with dkms each time you install/upgrade your kernel, so you don’t have to do it manually yourself (if you’re using dkms, you can skip all the steps I’ve outlined above). I’ve prepared a dkms .deb package for Debian/Ubuntu users: rts5229-dkms_1.0.7-1_all.deb. (source package can be found in one of my Github repos)

Update: It looks like Realtek has submitted their driver into the mainline kernel; patches have been floating in the LKML for a while, at least. When it does get into mainline (3.8?), it’ll be called “rtsx_pci” instead of “rts5229″.

Update #2: Confirmed working perfectly out of the box in Linux 3.8. I recommend anyone with a RTS5229 card reader upgrade to 3.8, although it should be possible to backport upstream’s patches for 3.6/3.7.

About these ads

7 Responses to Toshiba Satellite P850: RTS5229 SD card reader not working

  1. doblemarco November 2, 2012 at 7:17 pm

    Thanks!, It works for a HP Pavilion dv7-7030us

  2. Gary Greene December 30, 2012 at 9:53 am

    Anyone spent any time converting the DKMS deb into an RPM? I need this for openSUSE

  3. Bruno March 28, 2013 at 10:06 am

    Great thanks!
    HP ENVY dv6

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: