working on MSI GE60 I've got a Realtek Semiconductor Co., Ltd. RTS5227 working on windows but not in linux mint (based on ubuntu).
ATTENTION / IMPORTANT :
use this method can possibly induce the device to not recognize the card reader after a reboot. I've not understood yet what's going on but the device seems not able to enumerate on pci bus. I fixed that by cold boot on windows (with official driver).
I found some tutorials for rts5209 and tried to adapt them :
https://vidyut.net/realtek-sd-card-reader-working-ubuntu/
http://dainaccio.wordpress.com/2013/07/14/realtek-sd-reader-mounting-problems-under-linux-mintubuntu/#more-836
I took the sources for RTS5229 from realtek website (PCIE RTS5229 card reader driver for Linux) : no more than 2 links in my message, tutorials seems more important --> google
then I had do do a little more code modification than in the linked tutorials in rtcx.c in order to build without error : comment the declaration of proc_info in the rtsx_host_template initialization line 206.
(before)
.proc_info = proc_info,
(after)
//.proc_info = proc_info,
once I get through this I built the driver and try to go with it, but obviously the link between driver and hardware was not there.
So I took the name of my device and try to modify the code in order to have the right device name.
Go in the first lines (55) of rtsx.h and adapt the definition of the device name to your need :
(before)
#define CR_DRIVER_NAME "rts5229"
(after)
#define CR_DRIVER_NAME "rts5227"
After what I modified the target of the Makefile :
(before)
TARGET_MODULE := rts5229
(after)
TARGET_MODULE := rts5227
after what
make clean
make
sudo make install
sudo depmod
sudo modprobe rts5227
verify that your device is not using rtsx_pci module (lspci -v) if its the case you need to use the Dainaccio way to fix that (near the end of second tutorial).
when your module is correctly loaded a ls /dev should show you a new interface (for me /dev/sdb) :D
In fact that's not really clean.The thing is there should be a lot more understanding of the difference between the 2 card reader version and a lot more understanding of the driver to make that work fine.
The driver is basically functional, you can mount / unmount partition, write and read on the card, insertion and removal is detected. I have not tested the automount. But anyway a lspci -v with the driver working will show you that this solution is not clean : the peripheral class is not recognized so others values I think. By a brief look in the code I also saw many reference hard-coded to rts5229. they could be some work to be done...
anyway, have a nice day !
~~~~~
Best Answer
I have had the same or similar issue: that the SD-card was not detected.
Side note: The "Unassigned class [00ff]" seems to be part of the name of the device. This article has the same report from the
lspci
and the driver/device is reported as working.The card had been detected earlier (during the same session), but after being removed (once or twice) it was not detected anymore. After a reboot it was detected again, but after a few mounts and unmounts, it did not respond anymore.
After scanning the
/sys/
folder I found that severaluevent
files for mmc devices only had write-access, and that was only for the root user. (Scan command:find /sys -iname \*mmc\* | sed 's#$#/uevent#' | xargs ls -l
) The other had read-access for all. So I gave all the mmcuevent
files the same access:After this the SD card is detected all the time but it seems that I have to do
lspci
or a file browser to help the drivers enumerating/removing the partitions.I have not found any way for automatic enumeration yet.
EDIT: It now works for me. I have no idea what caused it to work now. Below I have written what I did.
NOTE 1: My normal working environment is Unity with lightdm (gdm is removed).
NOTE 2: I cannot remember if I did reboot my machine between my first version of this answer and the reboots described below. Not I guess. NOTE 3: This did not work before the reboots described below.
Possible indirect or direct causes that made it work. * Most certainly the adding of read access did influence this. * Maybe some other unknown changes * The reboot * And possibly running the Live installation. My guess is that the first and the third point are the important ones.