My Hynix external 2TB SSD arrived yesterday, and all was looking well after I plugged it in…
lsusb -t
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 10000M
|__ Port 002: Dev 002, If 0, Class=Hub, Driver=hub/3p, 10000M
|__ Port 001: Dev 003, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
|__ Port 002: Dev 004, If 0, Class=Mass Storage, Driver=uas, 10000M
I formatted it EXT4, created a mountpoint for it, and set an automount in /etc/fstab
UUID=aea6c0db-984e-4205-9b1b-b5c873b988e3 /data/steamlibrary ext4 defaults,noatime,noauto,x-systemd.automount,x-systemd.mount-timeout=10 0 0
Created a new Steam Library on the disk and moved all my games over to it… no errors or issues at all… I did test that a couple games could successfully launch and was only inside long enough to verify I could see my saves.
Updated my BackInTime backup tool to backup the steamapps\compatdata folder (save files, etc.) on the drive, and went to bed.
In the morning I launched a game to play for bit… and it froze/crashed in under 5 min. retried a couple more times with the same result; other than freezing even quicker.
Checked the journal and found a lot of kernel I/O error and sd entries related to “read” before the game crashed… the core/important ones I believe are…
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#16 CDB: Read(10) 28 00 bb a4 ee 98 00 00 20 00
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: scsi host0: uas_eh_device_reset_handler start
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: usb 2-2.2: reset SuperSpeed Plus Gen 2x1 USB device number 4 using xhci_hcd
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: scsi host0: uas_eh_device_reset_handler success
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: scsi_io_completion_action: 8 callbacks suppressed
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#14 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=40s
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#14 CDB: Read(10) 28 00 bd bf 17 d0 00 04 00 00
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: blk_print_req_error: 8 callbacks suppressed
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: I/O error, dev sda, sector 3183417296 op 0x0:(READ) flags 0x80700 phys_seg 128 prio class 2
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#13 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=40s
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#13 CDB: Read(10) 28 00 bd bf 15 28 00 02 a8 00
but here is a more exhaustive journal extract
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#29 uas_eh_abort_handler 0 uas-tag 14 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#29 CDB: Write(10) 2a 00 00 00 0e 10 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#28 uas_eh_abort_handler 0 uas-tag 13 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#28 CDB: Write(10) 2a 00 00 00 09 e8 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#27 uas_eh_abort_handler 0 uas-tag 12 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#27 CDB: Write(10) 2a 00 00 00 09 b0 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#26 uas_eh_abort_handler 0 uas-tag 11 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#26 CDB: Write(10) 2a 00 00 00 09 50 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#25 uas_eh_abort_handler 0 uas-tag 9 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#25 CDB: Write(10) 2a 00 c1 c0 08 80 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#24 uas_eh_abort_handler 0 uas-tag 10 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#24 CDB: Write(10) 2a 00 00 00 09 10 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#10 uas_eh_abort_handler 0 uas-tag 24 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#10 CDB: Write(10) 2a 00 3c c0 08 40 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#9 uas_eh_abort_handler 0 uas-tag 23 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#9 CDB: Write(10) 2a 00 3c c0 08 18 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#8 uas_eh_abort_handler 0 uas-tag 22 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#8 CDB: Write(10) 2a 00 35 00 08 38 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#7 uas_eh_abort_handler 0 uas-tag 21 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#7 CDB: Write(10) 2a 00 29 80 08 30 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#6 uas_eh_abort_handler 0 uas-tag 20 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#6 CDB: Write(10) 2a 00 21 80 08 68 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#5 uas_eh_abort_handler 0 uas-tag 19 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#5 CDB: Write(10) 2a 00 00 01 36 c8 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#4 uas_eh_abort_handler 0 uas-tag 18 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#4 CDB: Write(10) 2a 00 00 01 36 60 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#3 uas_eh_abort_handler 0 uas-tag 17 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#3 CDB: Write(10) 2a 00 00 01 35 90 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#2 uas_eh_abort_handler 0 uas-tag 16 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#2 CDB: Write(10) 2a 00 00 01 33 f0 00 00 08 00
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#1 uas_eh_abort_handler 0 uas-tag 15 inflight: CMD OUT
Feb 19 08:55:49 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#1 CDB: Write(10) 2a 00 00 00 0f 68 00 00 08 00
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#16 uas_eh_abort_handler 0 uas-tag 25 inflight: CMD IN
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#16 CDB: Read(10) 28 00 bb a4 ee 98 00 00 20 00
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: scsi host0: uas_eh_device_reset_handler start
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: usb 2-2.2: reset SuperSpeed Plus Gen 2x1 USB device number 4 using xhci_hcd
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: scsi host0: uas_eh_device_reset_handler success
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: scsi_io_completion_action: 8 callbacks suppressed
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#14 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=40s
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#14 CDB: Read(10) 28 00 bd bf 17 d0 00 04 00 00
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: blk_print_req_error: 8 callbacks suppressed
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: I/O error, dev sda, sector 3183417296 op 0x0:(READ) flags 0x80700 phys_seg 128 prio class 2
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#13 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=40s
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#13 CDB: Read(10) 28 00 bd bf 15 28 00 02 a8 00
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: I/O error, dev sda, sector 3183416616 op 0x0:(READ) flags 0x80700 phys_seg 85 prio class 2
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#12 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=40s
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#12 CDB: Read(10) 28 00 bd bf 15 00 00 00 18 00
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: I/O error, dev sda, sector 3183416576 op 0x0:(READ) flags 0x80700 phys_seg 3 prio class 2
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#23 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=40s
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#23 CDB: Read(10) 28 00 c1 3f 2c d8 00 00 48 00
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: I/O error, dev sda, sector 3242142936 op 0x0:(READ) flags 0x80700 phys_seg 9 prio class 2
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#20 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=40s
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#20 CDB: Read(10) 28 00 c1 3f 2d 20 00 00 60 00
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: I/O error, dev sda, sector 3242143008 op 0x0:(READ) flags 0x80700 phys_seg 12 prio class 2
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=37s
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 bb a2 bb b0 00 00 08 00
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: I/O error, dev sda, sector 3148004272 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#16 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=30s
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: sd 0:0:0:0: [sda] tag#16 CDB: Read(10) 28 00 bb a4 ee 98 00 00 20 00
Feb 19 08:55:51 AMD-Ryzen9-7940HS kernel: I/O error, dev sda, sector 3148148376 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 2
Feb 19 08:55:52 AMD-Ryzen9-7940HS systemd-coredump[1077932]: [🡕] Process 1069367 (Unity Main Thre) of user 1000 dumped core.
Stack trace of thread 1069493:
#0 0x00007ff2ac8dbc5a n/a (n/a + 0x0)
ELF object binary architecture: AMD x86-64
Feb 19 08:55:52 AMD-Ryzen9-7940HS systemd[1]: systemd-coredump@9-49153-1077926_135221464-0.service: Deactivated successfully.
Feb 19 08:55:52 AMD-Ryzen9-7940HS systemd[1]: systemd-coredump@9-49153-1077926_135221464-0.service: Consumed 8.516s CPU time, 3.1G memory peak.
Feb 19 08:55:53 AMD-Ryzen9-7940HS steam[4067374]: Game Recording - game stopped [gameid=1371980]
Feb 19 08:55:53 AMD-Ryzen9-7940HS steam[4067374]: Removing process 1069588 for gameID 1371980
Then I noticed the first read error was not when I launched a game, but earlier (while I was sleeping) when my BackInTime backup was trying to backup the steamapps\compatdata folder.
So there were failures trying to read from the device… but apparently none when I was writing 1T of data to it… really odd.
I started searching the web for some of the error messages and stumbled upon [SOLVED] external usb drive fails during writing / Newbie Corner / Arch Linux Forums
I almost dismissed this post because my issue was read and theirs was write… but I gleamed what I could from it which gave me my first hint to uas not always being the best driver from some usb attached storage devices.
The more I searched, the more convinced I was this was my issue as well… and mixing a bit of the information from the above link and How to force USB 3 device to use mass-storage driver using quirks? - MOX HW problems - Turris forum and Cloud Native Topics | How to bind to the right USB storage driver … I proceeded to:
- shutdown Steam2.
- unmounted the drive
- confirmed it’s vendor/device ID’s
hwinfo --scsi
50: SCSI 00.0: 10600 Disk
[Created at block.255]
Unique ID: yNup.zJ+25RsMm5D
Parent ID: Kf+8.w4XuK8Xu536
SysFS ID: /class/block/sda
SysFS BusID: 0:0:0:0
SysFS Device Link: /devices/pci0000:00/0000:00:08.1/0000:c5:00.3/usb2/2-2/2-2.2/2-2.2:1.0/host0/target0:0:0/0:0:0:0
Hardware Class: disk
Model: "Hynix PSSD X31"
Vendor: usb 0x152e "Hynix"
Device: usb 0x7001 "PSSD X31"
Revision: "0"
Serial ID: "SSDX31###############"
Driver: "uas", "sd"
Driver Modules: "uas"
Device File: /dev/sda
Device Files: /dev/sda, /dev/disk/by-path/pci-0000:c5:00.3-usb-0:2.2:1.0-scsi-0:0:0:0, /dev/disk/by-id/usb-Hynix_PSSD_X31_SSDX31CHM24102400063-0:0, /dev/disk/by-path/pci-0000:c5:00.3-usbv3-0:2.2:1.0-scsi-0:0:0:0, /dev/disk/by-diskseq/3
Device Number: block 8:0-8:15
Module Alias: "usb:v152Ep7001d0100dc00dsc00dp00ic08isc06ip62in00"
Driver Info #0:
Driver Status: uas is active
Driver Activation Cmd: "modprobe uas"
Drive status: no medium
Config Status: cfg=new, avail=yes, need=no, active=unknown
Attached to: #5 (USB Controller)
Note: I guess something in the drive enclosure is “LG” to get this vendor id… Hopefully this is an authoritative site … http://www.linux-usb.org/usb.ids
lsusb
Bus 002 Device 005: ID 152e:7001 LG (HLDS) PSSD X31
- disconnected the drive
- typed the following in a terminal to “quickly” (without reboot) add a “quirk” for my drive
$ su
# echo "152e:7001:u" > /sys/module/usb_storage/parameters/quirks
# exit
$ cat /sys/module/usb_storage/parameters/quirks
152e:7001:u
- reconnected the drive
- checked
lsusb -tand confirmed the driver change tousb-storage(fromuas)
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 10000M
|__ Port 002: Dev 002, If 0, Class=Hub, Driver=hub/3p, 10000M
|__ Port 001: Dev 003, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
|__ Port 002: Dev 005, If 0, Class=Mass Storage, Driver=usb-storage, 10000M
- remounted the drive
- restarted Steam
- launched the same game and played for 20+ minutes without issue.
So I hope the last step now is to make this quirk persistent… following Kernel module - ArchWiki, is it better/safer to:
- create a
/etc/modprobe.d/no_uas_hynix_ssd.conf
which I think would look like this…
#options module_name param1=value1 param2=value2a,value2b …
options usb_storage quirks=152e:7001:u
- update
/etc/default/grub(requiringsudo update-grubandsudo mkinitcpio -P)
GRUB_CMDLINE_LINUX_DEFAULT="udev.log_priority=3 sysrq_always_enabled=1 usb-storage.quirks=152e:7001:u"
I’m leaning towards option 1 as it feels simpler and provides an opportunity to learn more about systemd… but I’m open to opinions as either way is doable.
Also, it would be encouraging to know if I actually stumbled into the right “solution” and whether my approach is complete or needs further steps or refinement.
Thank You!