SD card reader failure

Hi!

I was pretty excited to see the SD card reader was finally shipping! I finally got it today, slammed it in my FW and popped my camera card in to suck those goodies onto my disk.

Well, that was a disappointment. First off, just plugging the card in takes a long time to load the partition table. From the kernel messages:

Nov 22 12:52:38 angela kernel: usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
Nov 22 12:52:38 angela kernel: usb 2-1: New USB device found, idVendor=32ac, idProduct=0009, bcdDevice= 0.02
Nov 22 12:52:38 angela kernel: usb 2-1: New USB device strings: Mfr=3, Product=4, SerialNumber=2
Nov 22 12:52:38 angela kernel: usb 2-1: Product: SD Expansion Card
Nov 22 12:52:38 angela kernel: usb 2-1: Manufacturer: Framework
Nov 22 12:52:38 angela kernel: usb 2-1: SerialNumber: 000000000002
Nov 22 12:52:39 angela kernel: SCSI subsystem initialized
Nov 22 12:52:39 angela kernel: usb-storage 2-1:1.0: USB Mass Storage device detected
Nov 22 12:52:39 angela kernel: scsi host0: usb-storage 2-1:1.0
Nov 22 12:52:39 angela kernel: usbcore: registered new interface driver usb-storage
Nov 22 12:52:39 angela kernel: usbcore: registered new interface driver uas
Nov 22 12:52:40 angela kernel: scsi 0:0:0:0: Direct-Access     Generic  MassStorageClass 0002 PQ: 0 ANSI: 6
Nov 22 12:52:40 angela kernel: scsi 0:0:0:0: Attached scsi generic sg0 type 0
Nov 22 12:52:41 angela kernel: sd 0:0:0:0: [sda] Spinning up disk...
Nov 22 12:52:44 angela kernel: ..
Nov 22 12:52:46 angela kernel: .ready
Nov 22 12:52:46 angela kernel: sd 0:0:0:0: [sda] 124735488 512-byte logical blocks: (63.9 GB/59.5 GiB)
Nov 22 12:52:46 angela kernel: sd 0:0:0:0: [sda] Write Protect is off
Nov 22 12:52:46 angela kernel: sd 0:0:0:0: [sda] Mode Sense: 21 00 00 00
Nov 22 12:52:46 angela kernel: sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Nov 22 12:52:46 angela kernel:  sda: sda1
Nov 22 12:52:46 angela kernel: sd 0:0:0:0: [sda] Attached SCSI removable disk

That’s five seconds to load a few kilobytes!!

And the trouble doesn’t stop there. Trying to load thumbs from the card leads to I/O errors:

Nov 22 12:55:47 angela kernel: sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=21s
Nov 22 12:55:47 angela kernel: sd 0:0:0:0: [sda] tag#0 Sense Key : Aborted Command [current] 
Nov 22 12:55:47 angela kernel: sd 0:0:0:0: [sda] tag#0 Add. Sense: Incompatible medium installed
Nov 22 12:55:47 angela kernel: sd 0:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 00 00 80 00 00 00 01 00
Nov 22 12:55:47 angela kernel: I/O error, dev sda, sector 32768 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
Nov 22 12:55:47 angela kernel: Buffer I/O error on dev sda1, logical block 0, lost sync page write

boom. there were a couple of those… e.g.

Nov 22 12:57:25 angela kernel: Buffer I/O error on dev sda1, logical block 5141, lost async page write
Nov 22 12:57:25 angela kernel: Buffer I/O error on dev sda1, logical block 5142, lost async page write
Nov 22 12:57:25 angela kernel: Buffer I/O error on dev sda1, logical block 5143, lost async page write
Nov 22 12:57:28 angela kernel: sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=1s
Nov 22 12:57:28 angela kernel: sd 0:0:0:0: [sda] tag#0 Sense Key : Aborted Command [current] 
Nov 22 12:57:28 angela kernel: sd 0:0:0:0: [sda] tag#0 Add. Sense: Data phase CRC error detected
Nov 22 12:57:28 angela kernel: sd 0:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 00 00 94 29 00 00 02 00
Nov 22 12:57:28 angela kernel: I/O error, dev sda, sector 37929 op 0x1:(WRITE) flags 0x100000 phys_seg 2 prio class 0
Nov 22 12:57:28 angela kernel: Buffer I/O error on dev sda1, logical block 5161, lost async page write
Nov 22 12:57:28 angela kernel: Buffer I/O error on dev sda1, logical block 5162, lost async page write

I was kind of terrified: is my SD card dying? It loaded a couple of thumbnails, but was so slow that I aborted everything and just switched to old (and I mean ooold) USB-A/SD card reader, which works “fine” (~16MB/s). I was hoping the new card reader would benefit from the much faster USB-4 bus, but right now it seems to just not be working at all.

Here’s what the SD card looks like when plugged in the other adapter:

Nov 22 13:00:28 angela kernel: usb 3-4: New USB device found, idVendor=0bda, idProduct=0119, bcdDevice=19.81
Nov 22 13:00:28 angela kernel: usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 22 13:00:28 angela kernel: usb 3-4: Product: USB2.0-CRW
Nov 22 13:00:28 angela kernel: usb 3-4: Manufacturer: Generic
Nov 22 13:00:28 angela kernel: usb 3-4: SerialNumber: 20090815198100000
Nov 22 13:00:28 angela kernel: usb-storage 3-4:1.0: USB Mass Storage device detected
Nov 22 13:00:28 angela kernel: scsi host1: usb-storage 3-4:1.0
Nov 22 13:00:53 angela kernel: usb 3-4: new high-speed USB device number 101 using xhci_hcd
Nov 22 13:00:53 angela kernel: usb 3-4: New USB device found, idVendor=0bda, idProduct=0119, bcdDevice=19.81
Nov 22 13:00:53 angela kernel: usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 22 13:00:53 angela kernel: usb 3-4: Product: USB2.0-CRW
Nov 22 13:00:53 angela kernel: usb 3-4: Manufacturer: Generic
Nov 22 13:00:53 angela kernel: usb 3-4: SerialNumber: 20090815198100000
Nov 22 13:00:53 angela kernel: usb-storage 3-4:1.0: USB Mass Storage device detected
Nov 22 13:00:53 angela kernel: scsi host0: usb-storage 3-4:1.0
Nov 22 13:00:54 angela kernel: scsi 0:0:0:0: Direct-Access     Generic- SD/MMC           1.00 PQ: 0 ANSI: 0 CCS
Nov 22 13:00:54 angela kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
Nov 22 13:00:55 angela kernel: sd 0:0:0:0: [sda] 124735488 512-byte logical blocks: (63.9 GB/59.5 GiB)
Nov 22 13:00:55 angela kernel: sd 0:0:0:0: [sda] Write Protect is off
Nov 22 13:00:55 angela kernel: sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
Nov 22 13:00:55 angela kernel: sd 0:0:0:0: [sda] No Caching mode page found
Nov 22 13:00:55 angela kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
Nov 22 13:00:55 angela kernel:  sda: sda1
Nov 22 13:00:55 angela kernel: sd 0:0:0:0: [sda] Attached SCSI removable disk

The device is detected instantaneously (well, it takes 2 seconds for the whole process, compared to 8 seconds for the FW card reader). On the old SD card reader, i can read off the card with a reliable 16.8MB/s:

anarcat@angela:~$ sudo pv -barte /dev/sda > /dev/null 
 132MiO 0:00:08 [16,9MiO/s] [16,6MiO/s] ETA 1:01:09

Note that the first number is instant rate and the second is the average over the whole transfer.

Writing zeros to the card is, of course, slower, but seems to settle around something similar:

anarcat@angela:~[64]$ sudo sh -c "pv -barte /dev/zero > /mnt/test"
2,31GiO 0:00:14 [15,6MiO/s] [ 169MiO/s]

Note that those writes are buffered by the kernel and don’t count the flush time required at umount time, which is why you get that 10x write speed for the average rate: lots of stuff went out to the kernel cache.

Could this be a driver issue?

  • OS: Debian GNU/Linux “stable” (bookworm)
  • Kernel: 6.10 kernel (Linux angela 6.10.11+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.11-1~bpo12+1 (2024-10-03) x86_64 GNU/Linux)
  • Framework 12th gen

Hmm… It looks like I might have experience some connectivity problem: maybe the card wasn’t jacked in all the way correctly?

Because now I tried again, and the performance is stellar. Connect in ~2s:

Nov 22 13:35:14 angela kernel: usb 2-1: new SuperSpeed USB device number 3 using xhci_hcd
Nov 22 13:35:14 angela kernel: usb 2-1: New USB device found, idVendor=32ac, idProduct=0009, bcdDevice= 0.02
Nov 22 13:35:14 angela kernel: usb 2-1: New USB device strings: Mfr=3, Product=4, SerialNumber=2
Nov 22 13:35:14 angela kernel: usb 2-1: Product: SD Expansion Card
Nov 22 13:35:14 angela kernel: usb 2-1: Manufacturer: Framework
Nov 22 13:35:14 angela kernel: usb 2-1: SerialNumber: 000000000002
Nov 22 13:35:14 angela kernel: usb-storage 2-1:1.0: USB Mass Storage device detected
Nov 22 13:35:14 angela kernel: scsi host1: usb-storage 2-1:1.0
Nov 22 13:35:15 angela kernel: usb 3-4: USB disconnect, device number 101
Nov 22 13:35:15 angela kernel: scsi 1:0:0:0: Direct-Access     Generic  MassStorageClass 0002 PQ: 0 ANSI: 6
Nov 22 13:35:15 angela kernel: sd 1:0:0:0: Attached scsi generic sg0 type 0
Nov 22 13:35:15 angela kernel: sd 1:0:0:0: [sda] 124735488 512-byte logical blocks: (63.9 GB/59.5 GiB)
Nov 22 13:35:15 angela kernel: sd 1:0:0:0: [sda] Write Protect is off
Nov 22 13:35:15 angela kernel: sd 1:0:0:0: [sda] Mode Sense: 21 00 00 00
Nov 22 13:35:15 angela kernel: sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Nov 22 13:35:16 angela kernel:  sda: sda1
Nov 22 13:35:16 angela kernel: sd 1:0:0:0: [sda] Attached SCSI removable disk

Transfer rate is basically gigabit:

anarcat@angela:~$ sudo pv -barte /dev/sda > /dev/null 
5,75GiO 0:01:04 [92,5MiO/s] [92,1MiO/s] ETA 0:09:57

Writing is slower, closer to the other reader, probably the SD card limits there:

anarcat@angela:~$ sudo sh -c "pv -barte /dev/zero > /mnt/test"
21,3GiO 0:04:52 [83,7MiO/s] [74,6MiO/s]

If you encounter any more issues, I would recommend reaching out to Framework Support as if there really is a hardware issue, they may be able to provide you a free replacement.