16

I recently installed Ubuntu 14.04 on my HP Envy m7-j020dx. The only problem I am currently having is that the internal SD card reader does not seem to be detected at all. I have tried to find a solution using Google, but there was little to find on how to solve this problem, and the solutions I've tried did not work. There is no external problem because everything works fine in Windows 8.

Fun fact: SD card is detected on the 14.04 Live CD, but not otherwise.

With and without the SD card in, df -h gives me the following result:

Filesystem             Size  Used Avail Use% Mounted on
/dev/sda5              154G   35G  112G  24% /
none                   4,0K     0  4,0K   0% /sys/fs/cgroup
udev                   3,9G  4,0K  3,9G   1% /dev
tmpfs                  792M  1,4M  791M   1% /run
none                   5,0M     0  5,0M   0% /run/lock
none                   3,9G   28M  3,9G   1% /run/shm
none                   100M   32K  100M   1% /run/user
/dev/sda2              256M  102M  155M  40% /boot/efi
/home/ramzes/.Private  154G   35G  112G  24% /home/ramzes

What didn't work:

  • Rebooting with the SD card in the reader
  • sudo modprobe rts5139
  • sudo modprobe rts5229 (FATAL: Module not found)
  • this
  • this which left me fixing my partition types for the next 4 hours
  • anything front page google discussing this topic

Some info

  • Kernel: Linux envy 3.13.0-30-generic #55-Ubuntu SMP Fri Jul 4 21:40:53 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
  • lspci -v output with card in: http://pastebin.com/VEHik10j - relevant bit (possibly):

    03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)
        Subsystem: Hewlett-Packard Company Device 1965
        Flags: fast devsel, IRQ 19
        Memory at b1000000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number 00-00-00-01-00-4c-e0-00
        Capabilities: [150] Latency Tolerance Reporting
        Capabilities: [158] L1 PM Substates
    
  • dmesg output: http://pastebin.com/daVuzg2g

Pablo Bianchi
  • 15,657
Adam
  • 487
  • 1
  • 3
  • 10
  • what is the output of ls /dev/sd*? – krowe Jul 06 '14 at 22:21
  • @krowe /dev/sda /dev/sda2 /dev/sda4 /dev/sda6 /dev/sdb /dev/sda1 /dev/sda3 /dev/sda5 /dev/sda7 /dev/sdc Output is the same with and without the card in. GParted shows this, and /dev/sda is the only device http://i.imgur.com/preT5gE.jpg – Adam Jul 06 '14 at 22:23
  • Have you tried the driver from the realtek website? http://www.realtek.com/Downloads/downloadsView.aspx?Langid=1&PNid=15&PFid=25&Level=4&Conn=3&DownTypeID=3&GetDown=false#2 – Charles Green Jul 06 '14 at 22:28
  • @CharlesGreen trying that now, will report back – Adam Jul 06 '14 at 22:34
  • You appear to have 2 drives which were detected but aren't mounted: /dev/sdb and /dev/sdc. I would assume that one of those is the DVD drive and the other is probably your SD card reader. sudo fdisk -l /dev/sdb will give you information about each drive. – krowe Jul 06 '14 at 22:36
  • @krowe no output at all for sudo fdisk -l /dev/sdb and sdc. For sda I get normal output. I'm also getting an error while installing the driver... – Adam Jul 06 '14 at 22:41
  • @Adam Even when a card is in it gives nothing? How about sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL? – krowe Jul 06 '14 at 22:48
  • @krowe Yeah, even with a card in. And that command gives http://imgur.com/A0DH3jD (this output doesn't change depending on whether the card is in or not) – Adam Jul 06 '14 at 22:59
  • @CharlesGreen I tried to install the drivers, but apparently on kernels 3.9+ there's an error when installing them, and the given workaround does not work for me. – Adam Jul 06 '14 at 23:30
  • Also, it's really hard to find a download for the RTS5227 driver which I need. Any help on that would be great. – Adam Jul 07 '14 at 00:01

2 Answers2

19

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!!!

Connor
  • 3
  • 3
Adam
  • 487
  • 1
  • 3
  • 10
  • Glad you got it to work! Please mark your answer as the correct answer. – Moose Jul 07 '14 at 03:38
  • @DevGeek It told me to wait 2 days before I can do this. – Adam Jul 07 '14 at 10:39
  • Ooops! My bad! I forgot about that limit :) – Moose Jul 07 '14 at 10:55
  • 1
    Same as Adam solution but use 'make' instead of 'sudo make'. That expression gave me an error. – Dave Oct 07 '14 at 22:42
  • I'v got this error while executing sudo make: http://pastebin.com/1GCtikZF – ramusus Nov 21 '14 at 22:10
  • @Adam Well turns out my problems were a hardware connection error plus the lack of drivers. Thanks for the help!...Since you did such great work in this instance, I was hoping you might have a solution for the error ridden drivers for RTL8723AE (wireless radio transmitter and receiver (wifi)) There seem to be a lot of solutions posted, but none that achieve full functionality of the chipset. The major issue is with Ubuntu and I would guess most other distros is that the performance is intermittent and never achieves full bandwidth. Please mail me @ gm2500main(at)gmail.com for more inf.$$4soln – user175999 Nov 30 '14 at 09:39
  • @Adam can you upload your RTS5227 driver again or Realteak's PCIE RTS5229 card reader driver for Linux ? Both links are dead. Will it work with 4.15.0-30-generic kernel (Ubuntu 18.04.1) ? TNX – Roey Aug 14 '18 at 12:56
  • I have the same problem with Ubuntu 20.04. With 19.10 this card reader (RTS5227) worked fine out of the box. Now I've upgraded to 20.04 and it doesn't want to work: [15892.547119] rtsx_pci 0000:02:00.0: enabling device (0000 -> 0002) [15892.550146] rtsx_pci: probe of 0000:02:00.0 failed with error -110 [16687.912206] rtsx_pci 0000:02:00.0: Refused to change power state, currently in D3 [16687.913365] rtsx_pci: probe of 0000:02:00.0 failed with error -110 Any idea as to why it stopped working? Using Linux kernel 5.4.0-54-generic – ec2011 Nov 29 '20 at 22:13
1

As I reported today on Ubuntu 14.04 Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader isn't working :

# modprobe -r rtsx_pci
# modprobe rtsx_pci

with a kernel starting from 3.9 will do. One need to investigate why it gets disable.