The post describes how to enable Realtek RTS5129 Card Reader controller in Linux kernel.
Strangely I never came across this problem of SD-card not been
supported on Linux. At the beginning I thought it may be a hardware
problem but hey I just bought a new Laptop!. I needed to burn an image
on the SD-card as soon as I inserted a SD card adapter, the OS was not
able to detect it. I went ahead and checked
dmesg log but no luck.
OK! that’s fine, I checked
lspci output but still not trace of Card
Reader Controller. May be the controller is not attached to PCI bus. I
lsusb and voila! I got an entry. The output had a reference of
Card Reader Controller.
1: Bus 003 Device 003: ID 0bda:5728 Realtek Semiconductor Corp. 2: Bus 004 Device 002: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller 3: Bus 005 Device 007: ID 0cf3:3004 Atheros Communications, Inc. 4: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 5: Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 6: Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 7: Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 8: Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 9: Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
This proved that the Card Reader Controller was attached to USB bus and Linux kernel(My kernel was 3.16.1) had support for it but may be few user-space modules are missing. So I downloaded the source code for the latest kernel(Version 3.19.0) and searched for the string ’RTS’ in Linux kernel configuration.
MFD_RTSX_PCI and enabled
MFD_RTSX_USB from Device
Drivers -> Multifunctional device drivers -> Realtek USB Card Reader
I recompiled the kernel and inserted SD-card. Nothing showed up in
dmesg log. I loaded the module manually using the command
But still the SD-card was not detected. Something was still missing. I went ahead and searched the Linux kernel config for ’MMC’(MultiMediaCard) and two familiar modules showed up.
Again I safely ignored
MMC_REALTEK_PCI and enabled
from Device Drivers -> MMC/SD/SDIO card support -> Realtek USB SD/MMC
Card interface Driver as module.
I compiled the kernel again and inserted the SD-card. This time the SD-card got successfully detected.
Support for Realtek USB card reader is patched into the Linux kernel 3.15 since Mar 19, 2014.
PS: The module
rtsx_usb should load automatically. If the module
is not able to load, create a file rtsxusb.conf in the path
/etc/modules-load.d/ with following content.
1: # Load rtsx_usb.ko on boot This module is used to mount sdcard(mmc) 2: # for Realtek RTS5129 Card Reader Controller. You need to enable 3: # CONFIG_MDF_RTSX_USB and MMC_REALTEK_USB in kernel. 4: rtsx_usb