0

I'm trying to get my internal SD card reader to work on a Lenovo Thinkpad T15p. It's this model, therefor uses the Realtek RTS525A PCI Express Card Reader. It seems like this particular card reader has been giving the community headaches ever since.

I have confirmed this chipset via lspci, the correct kernel modules are loaded and SD cards are correctly identified and mounted. So far so good.

The issue is that ALL SD cards are mounted readonly (ro), regardless of what I try. What I have tried so far:

  • Letting the OS do it's thing and automount the SD card. Can read but not write (nautilus).
  • As root manually mount it with RW access:
    mount -o rw /dev/mmcblk0 /tmp/sd
    
    Get's answered by a friendly but firm (translated from German, could be slightly different in English):
    mount: /tmp/sd: WARNING: the device is write-protected, mounted read-only.
    
  • As root overwrite the readonly-bit:
    hdparm -r0 /dev/mmcblk0p1
    
    Simply doesn't seem to do anything:
    /dev/mmcblk0p1:
    setting readonly to 0 (off)
    readonly      =  1 (on)
    
  • chmod'ing the whole directory where the SD card is mounted to
    chmod a+rw sd
    
    Works neither as/for root nor as/for user. Simply get's answered by a (freely translated):
    chmod: When setting permissions for 'sd': The file system is read-only.
    
  • Just for completeness: The physical write-protection is of course not set.

What is going on here? This happens with all SD cards I can test with. Even a brand new one. I can also confirm that those same SD cards are absolutely writeable in my cheapo ISY USB multi card reader, so it's not an issue of the cards itself.

My whole first G**gle page is already full with purple links, I'm running out of ideas. I'm running Ubuntu 20.04 with 5.15 kernel and have tested on SD cards with Ext4 and FAT32 file systems.

  • This link may be helpful for Windows file systems (FAT32, exFAT and NTFS). It is possible that Windows is leaving the drives 'dirty', which makes Linux stay away from allowing writing. -- Ext4 file systems may need mounting with elevated permissions e.g. sudo mount /dev/sdx /mnt. – sudodus Oct 02 '23 at 20:21
  • @sudodus Neither me nor my SD cards touched Windows in decades. Also tried mounting as root and also as root with -o gid=myuser,pid=myuser. It simply yields the same results as described in my original question. – password is password Oct 02 '23 at 21:03
  • Sorry, it seems I misunderstood your problem. Maybe it is a problem caused by lack of a suitable linux driver for the card reader, as you hinted in the original question. – sudodus Oct 02 '23 at 21:13
  • @sudodus No need to apologize, I'm thankful for any thought. It does indeed seem like it's a hardware-level issue. But for example what would be the point in writing / distributing a driver that can read but not write cards? And also, if it is a hardware-level issue, is everyone out there (it seems to be a very popular internal card reader) just using USB card readers and accepting this? – password is password Oct 02 '23 at 21:19
  • 1
    Lack of good hardware drivers is a classic problem for Linux. Some manufacturers provide Linux drivers, but some don't bother (focus only on Windows and MacOS). Sometimes a volunteer can figure out how to make a working Linux driver, but there are problems with several hardware items. – sudodus Oct 02 '23 at 21:31
  • @sudodus Agreed. Pretty bold move then to call it "Ubuntu 20.04 certified" I guess. I wish I was good enough to tamper with the drivers. Is there a way to look up what any given kernel module logs? Or turn the log level on a module on to see output in dmesg? – password is password Oct 02 '23 at 21:57
  • I don't know. I suggest that you ask a new question about that, either here or probably better at Unix & Linux where someone who really knows might find your question. – sudodus Oct 02 '23 at 22:22

0 Answers0