You are not logged in.
Hello, I've been trying to get my SD card reader working on Thinkpad 13 2nd gen, but to no avail. During normal operation it doesn't show up in lsusb, but if if I insert or remove an SD card from the reader it shows up for about 3 seconds:
~ $ lsusb
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 003: ID 04f2:b5bb Chicony Electronics Co., Ltd Integrated Camera
Bus 001 Device 008: ID 0bda:0177 Realtek Semiconductor Corp. USB2.0-CRW
Bus 001 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
~ $ lsusb
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 003: ID 04f2:b5bb Chicony Electronics Co., Ltd Integrated Camera
Bus 001 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubHere's what shows up in dmesg:
[ 25.694452] usb 1-2.3: new high-speed USB device number 5 using xhci_hcd
[ 25.813156] usb 1-2.3: New USB device found, idVendor=0bda, idProduct=0177, bcdDevice=77.11
[ 25.813167] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 25.813171] usb 1-2.3: Product: USB2.0-CRW
[ 25.813174] usb 1-2.3: Manufacturer: Generic
[ 25.813177] usb 1-2.3: SerialNumber: 20121112761000000
[ 25.876368] usbcore: registered new interface driver usb-storage
[ 25.883211] usbcore: registered new interface driver uas
[ 25.887892] ums-realtek 1-2.3:1.0: USB Mass Storage device detected
[ 25.890068] scsi host0: usb-storage 1-2.3:1.0
[ 25.890173] usbcore: registered new interface driver ums-realtek
[ 26.909839] scsi 0:0:0:0: Direct-Access Generic- SD/MMC/MS PRO 1.00 PQ: 0 ANSI: 4
[ 26.912075] sd 0:0:0:0: [sda] Media removed, stopped polling
[ 26.912800] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 28.304092] usb 1-2.3: USB disconnect, device number 5After some searching I have found a someone having a similar (the same?) issue: https://askubuntu.com/questions/1140710 … -elsewhere
Seems like it's a bug in ums_realtek module, however the solution from that thread doesn't work for me (judging by the last comment seems like it stopped working for the OP as well).
Offline
◉ modinfo ums_realtek
…
parm: auto_delink_en:auto delink mode (0=firmware, 1=software [default]) (int)
parm: ss_en:enable selective suspend (int)
parm: ss_delay:seconds to delay before entering selective suspend (int)https://wiki.archlinux.org/title/Kernel … odprobe.d/
if "ss_en=0" doesn't help, maby does "ss_delay=28800" (8h)?
Online
if "ss_en=0" doesn't help, maby does "ss_delay=28800" (8h)?
Doesn't seem to change anything, neither does setting ss_delay to 0.
In general it seems as if none of the options are doing anything. The only thing that I was able to do is I completely broke it once but was unable to reproduce it later.
Offline
Tried the LTS kernel?
Also make sure to disable https://wiki.archlinux.org/title/Power_ … utosuspend ("usbcore.autosuspend=-1", nb. that userspace tools liek TLP can and will alter that value and you've to configure it there as well)
Online
Tried the LTS kernel?
I've tried both linux-lts and linux kernels with the same result.
Also make sure to disable https://wiki.archlinux.org/title/Power_ … utosuspend ("usbcore.autosuspend=-1", nb. that userspace tools liek TLP can and will alter that value and you've to configure it there as well)
Tried changing it in both udev rules for that specific usb device and as a kernel parameter, but still nothing has changed.
Offline
I'd be less concerned about the reader powering down when no medium is present (your dmesg excerpt) but the behavior when you plug a card in.
Sanity check:
systool -vm ums_realtekand try to "ums_realtek.auto_delink_en=0" to handle this in the firmware, https://bugs.launchpad.net/ubuntu/+sour … omments/50
Online
I'd be less concerned about the reader powering down when no medium is present (your dmesg excerpt) but the behavior when you plug a card in.
That is what happens whenever I plug an SD card in, not when the adapter is empty.
try to "ums_realtek.auto_delink_en=0" to handle this in the firmware, https://bugs.launchpad.net/ubuntu/+sour … omments/50
I already do that, see systool output:
Module = "ums_realtek"
Attributes:
coresize = "24576"
initsize = "0"
initstate = "live"
refcnt = "0"
srcversion = "E6B18FBA34A59463071477E"
taint = ""
uevent = <store method only>
Parameters:
auto_delink_en = "0"
ss_delay = "28800"
ss_en = "0"
Sections:
.bss = "0xffffffffc1869640"
.data = "0xffffffffc1869000"
.exit.data = "0xffffffffc1869230"
.exit.text = "0xffffffffc1866325"
.gnu.linkonce.this_module= "0xffffffffc1869280"
.init.data = "0xffffffffc186d000"
.init.text = "0xffffffffc186c000"
.note.Linux = "0xffffffffc1867964"
.note.gnu.build-id = "0xffffffffc1867940"
.note.gnu.property = "0xffffffffc1867900"
.orc_unwind = "0xffffffffc18672c0"
.orc_unwind_ip = "0xffffffffc1867680"
.retpoline_sites = "0xffffffffc1867280"
.return_sites = "0xffffffffc1867288"
.rodata = "0xffffffffc1867000"
.rodata.str1.1 = "0xffffffffc186711f"
.rodata.str1.8 = "0xffffffffc18671e0"
.strtab = "0xffffffffc186e9d8"
.symtab = "0xffffffffc186e000"
.text = "0xffffffffc1865000"
__dyndbg = "0xffffffffc1869238"
__jump_table = "0xffffffffc1868000"
__mcount_loc = "0xffffffffc186716b"
__param = "0xffffffffc1867208"Tomorrow morning I'll test this behavior on my friend's laptop, because he has the same model. I'll post the results here.
Offline
That is what happens whenever I plug an SD card in, not when the adapter is empty.
During normal operation it doesn't show up in lsusb, but if if I insert or remove an SD card from the reader it shows up for about 3 seconds
The dmesg snippet you posted shows
[ 26.912075] sd 0:0:0:0: [sda] Media removed, stopped polling
[ 26.912800] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 28.304092] usb 1-2.3: USB disconnect, device number 5
The time when you insert a card might be more relevant, because the reader should stay then. It powering down when there's no medium is not a problem nor necessarily unexpected.
Online
The time when you insert a card might be more relevant, because the reader should stay then. It powering down when there's no medium is not a problem nor necessarily unexpected.
But this log shows when I insert an SD card, not when the reader is empty. I put this SD card in my friend's laptop (same Thinkpad model, very similar arch linux setup) and in his laptop it worked.
Here's my output:
$ sudo dmesg
[ 330.628776] usb 1-2.3: new high-speed USB device number 5 using xhci_hcd
[ 331.005165] usb 1-2.3: New USB device found, idVendor=0bda, idProduct=0177, bcdDevice=77.11
[ 331.005177] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 331.005181] usb 1-2.3: Product: USB2.0-CRW
[ 331.005185] usb 1-2.3: Manufacturer: Generic
[ 331.005188] usb 1-2.3: SerialNumber: 20121112761000000
[ 331.065074] usbcore: registered new interface driver usb-storage
[ 331.072839] usbcore: registered new interface driver uas
[ 331.077886] ums-realtek 1-2.3:1.0: USB Mass Storage device detected
[ 331.079043] scsi host0: usb-storage 1-2.3:1.0
[ 331.079144] usbcore: registered new interface driver ums-realtek
[ 332.083267] scsi 0:0:0:0: Direct-Access Generic- SD/MMC/MS PRO 1.00 PQ: 0 ANSI: 4
[ 332.085372] sd 0:0:0:0: [sda] Media removed, stopped polling
[ 332.085904] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 333.239699] usb 1-2.3: USB disconnect, device number 5
$ sudo systool -vm ums_realtek
Module = "ums_realtek"
Attributes:
coresize = "24576"
initsize = "0"
initstate = "live"
refcnt = "0"
srcversion = "E6B18FBA34A59463071477E"
taint = ""
uevent = <store method only>
Parameters:
auto_delink_en = "0"
ss_delay = "28800"
ss_en = "0"
Sections:
.bss = "0xffffffffc19d4640"
.data = "0xffffffffc19d4000"
.exit.data = "0xffffffffc19d4230"
.exit.text = "0xffffffffc19d1325"
.gnu.linkonce.this_module= "0xffffffffc19d4280"
.init.data = "0xffffffffc19d8000"
.init.text = "0xffffffffc19d7000"
.note.Linux = "0xffffffffc19d2964"
.note.gnu.build-id = "0xffffffffc19d2940"
.note.gnu.property = "0xffffffffc19d2900"
.orc_unwind = "0xffffffffc19d22c0"
.orc_unwind_ip = "0xffffffffc19d2680"
.retpoline_sites = "0xffffffffc19d2280"
.return_sites = "0xffffffffc19d2288"
.rodata = "0xffffffffc19d2000"
.rodata.str1.1 = "0xffffffffc19d211f"
.rodata.str1.8 = "0xffffffffc19d21e0"
.strtab = "0xffffffffc19d99d8"
.symtab = "0xffffffffc19d9000"
.text = "0xffffffffc19d0000"
__dyndbg = "0xffffffffc19d4238"
__jump_table = "0xffffffffc19d3000"
__mcount_loc = "0xffffffffc19d216b"
__param = "0xffffffffc19d2208"And here's what he got:
$ sudo dmesg
[ 1463.938847] usb 1-2.3: new high-speed USB device number 6 using xhci_hcd
[ 1464.056735] usb 1-2.3: New USB device found, idVendor=0bda, idProduct=0177, bcdDevice=77.11
[ 1464.056750] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1464.056756] usb 1-2.3: Product: USB2.0-CRW
[ 1464.056762] usb 1-2.3: Manufacturer: Generic
[ 1464.056766] usb 1-2.3: SerialNumber: 20121112761000000
[ 1464.063040] ums-realtek 1-2.3:1.0: USB Mass Storage device detected
[ 1464.065294] scsi host2: usb-storage 1-2.3:1.0
[ 1465.086997] scsi 2:0:0:0: Direct-Access Generic- SD/MMC/MS PRO 1.00 PQ: 0 ANSI: 4
[ 1465.718448] sd 2:0:0:0: [sdb] 60506112 512-byte logical blocks: (31.0 GB/28.9 GiB)
[ 1465.718911] sd 2:0:0:0: [sdb] Write Protect is on
[ 1465.718921] sd 2:0:0:0: [sdb] Mode Sense: 2f 00 80 00
[ 1465.719250] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 1465.722071] sdb: sdb1 sdb2
[ 1465.722416] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[ 1474.772862] sdb: detected capacity change from 60506112 to 0
[ 1475.586074] usb 1-2.3: USB disconnect, device number 6
$ sudo systool -vm ums_realtek
Module = "ums_realtek"
Attributes:
coresize = "24576"
initsize = "0"
initstate = "live"
refcnt = "0"
srcversion = "E6B18FBA34A59463071477E"
taint = ""
uevent = <store method only>
Parameters:
auto_delink_en = "1"
ss_delay = "50"
ss_en = "1"
Sections:
.bss = "0xffffffffc1cec840"
.call_sites = "0xffffffffc1cef2c0"
.data = "0xffffffffc1cec080"
.exit.data = "0xffffffffc1cec2b0"
.exit.text = "0xffffffffc1cea3d0"
.gnu.linkonce.this_module= "0xffffffffc1cec300"
.init.data = "0xffffffffc1cf5000"
.init.text = "0xffffffffc1cf3000"
.note.Linux = "0xffffffffc1cefaec"
.note.gnu.build-id = "0xffffffffc1cefac8"
.note.gnu.property = "0xffffffffc1cefa88"
.orc_header = "0xffffffffc1cefb1c"
.orc_unwind = "0xffffffffc1cef430"
.orc_unwind_ip = "0xffffffffc1cef7fc"
.retpoline_sites = "0xffffffffc1cef280"
.return_sites = "0xffffffffc1cef288"
.rodata = "0xffffffffc1cef000"
.rodata.str1.1 = "0xffffffffc1cef11f"
.rodata.str1.8 = "0xffffffffc1cef1e0"
.strtab = "0xffffffffc1cf5b90"
.symtab = "0xffffffffc1cf5008"
.text = "0xffffffffc1ce9000"
__dyndbg = "0xffffffffc1cec2b8"
__jump_table = "0xffffffffc1cf1000"
__mcount_loc = "0xffffffffc1cef16b"
__param = "0xffffffffc1cef208"
__patchable_function_entries= "0xffffffffc1cec000"On his laptop the SD card mounted and I was able to read it normally. What's weird his ums_realtek parameters are pretty much default, so it's either something else to configure or my reader is broken.
Offline
[ 332.085372] sd 0:0:0:0: [sda] Media removed, stopped polling
Very weird bug in the kernel or a hardware issue (some loose contact)
Can you test your reader and his on a live distro (eg. grml)?
Online
Can you test your reader and his on a live distro (eg. grml)?
Here's what I got on ubuntu 2022.04 live (grml wasn't working for me):
[ 291.403865] usb 1-2.3: new high-speed USB device number 9 using xhci_hcd
[ 291.516634] usb 1-2.3: New USB device found, idVendor=0bda, idProduct=0177, bcdDevice=77.11
[ 291.516639] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 291.516642] usb 1-2.3: Product: USB2.0-CRW
[ 291.516644] usb 1-2.3: Manufacturer: Generic
[ 291.516646] usb 1-2.3: SerialNumber: 20121112761000000
[ 291.523297] ums-realtek 1-2.3:1.0: USB Mass Storage device detected
[ 291.525992] scsi host2: usb-storage 1-2.3:1.0
[ 292.530240] scsi 2:0:0:0: Direct-Access Generic- SD/MMC/MS PRO 1.00 PQ: 0 ANSI: 4
[ 292.531066] sd 2:0:0:0: Attached scsi generic sg1 type 0At this point I believe there is something wrong with my installation and I should reinstall the whole OS or at least a significant part.
Offline
The ubuntu output is maybe cut short, but doesn't show a mass-storage device either?
(Nor it being removed)
Could you access the SD card on ubuntu?
Online
It definitely showed up in lsblk as a block device, however it didn't automatically mount and I didn't try to do that manually either. Will try to do that now.
EDIT: Just tested it, I mistook the USB drive for the SD card, my bad. The SD card doesn't show up as a block device.
Last edited by akinhet (2023-10-03 06:13:49)
Offline
Tested it on Archcraft and it shows similar behavior as my main OS. (can't show dmesg logs because it errors out but it similarly shows up in lsblk for about 10 seconds and then goes away)
Offline
EDIT: Just tested it, I mistook the USB drive for the SD card, my bad. The SD card doesn't show up as a block device.
It smells a lot like a hardware issue at this point - what happens if you insert the card and keep a finger on it, pushing it into position? (you can track "dmesg -W" hands free
)
Online
So this is turning into a wild ride! If I put it in, then take it out and then put it back in before the reader powers off it mounts! (although it does seem buggy, as not all partitions can be mounted)
This is dmesg output:
[ 998.941377] usb 1-2.3: new high-speed USB device number 17 using xhci_hcd
[ 999.059590] usb 1-2.3: New USB device found, idVendor=0bda, idProduct=0177, bcdDevice=77.11
[ 999.059603] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 999.059607] usb 1-2.3: Product: USB2.0-CRW
[ 999.059610] usb 1-2.3: Manufacturer: Generic
[ 999.059613] usb 1-2.3: SerialNumber: 20121112761000000
[ 999.065652] ums-realtek 1-2.3:1.0: USB Mass Storage device detected
[ 999.067328] scsi host0: usb-storage 1-2.3:1.0
[ 1000.083615] scsi 0:0:0:0: Direct-Access Generic- SD/MMC/MS PRO 1.00 PQ: 0 ANSI: 4
[ 1001.341662] sd 0:0:0:0: [sda] 60506112 512-byte logical blocks: (31.0 GB/28.9 GiB)
[ 1001.342442] sd 0:0:0:0: [sda] Write Protect is on
[ 1001.342449] sd 0:0:0:0: [sda] Mode Sense: 2f 00 80 00
[ 1001.343121] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 1001.716420] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=0s
[ 1001.716425] sd 0:0:0:0: [sda] tag#0 Sense Key : Hardware Error [current]
[ 1001.716427] sd 0:0:0:0: [sda] tag#0 Add. Sense: No additional sense information
[ 1001.716429] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1001.716430] I/O error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[ 1001.716435] Buffer I/O error on dev sda, logical block 0, async page read
[ 1003.037322] sda: sda1 sda2
[ 1003.037716] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 1004.661632] EXT4-fs (sda2): INFO: recovery required on readonly filesystem
[ 1004.661641] EXT4-fs (sda2): write access unavailable, cannot proceed (try mounting with noload)Offline
[ 1001.716420] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=0s
[ 1001.716425] sd 0:0:0:0: [sda] tag#0 Sense Key : Hardware Error [current]
[ 1001.716427] sd 0:0:0:0: [sda] tag#0 Add. Sense: No additional sense information
[ 1001.716429] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1001.716430] I/O error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[ 1001.716435] Buffer I/O error on dev sda, logical block 0, async page read
Online