klo
Posts: 1
Joined: Sat Jan 25, 2020 8:41 am

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Sat Jan 25, 2020 10:54 am

Lipown wrote:
Fri Jan 10, 2020 3:54 pm
Guys, as I am now frustrated of this issue (https://www.raspberrypi.org/forums/view ... 8&t=261230), has anybody found the working UAS USB3/SATA convertor so you don't need this hack?
This works nicely for me:
https://www.amazon.com.au/UGREEN-Extern ... B06XWRRMYX

harrytv
Posts: 1
Joined: Sat Jan 25, 2020 11:25 am

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Sat Jan 25, 2020 11:42 am

I had a lot of issues with stuttering video playback using Libreelec 9.2.0. Media files (mkv, h264) were located on a very fast 1TB SSD connected via a USB3.0 adapter. I finally hit this post and it helped tremendously. Here is what I did for completeness.

* I logged in as user `root` using Putty SSH from a Windows machine, using default password.
* Disconnected USB drive and ran (since this is libreelec no need for `sudo`)

Code: Select all

dmesh -c
* Reconnected the USB drive and ran:

Code: Select all

dmesh 
[  342.605668] usb 2-1: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[  342.626900] usb 2-1: New USB device found, idVendor=152d, idProduct=1561, bcd                                                                             Device= 2.04
[  342.626921] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  342.626938] usb 2-1: Product: SABRENT
[  342.626953] usb 2-1: Manufacturer: SABRENT
[  342.626968] usb 2-1: SerialNumber: DB9876543214E
[  342.639515] scsi host0: uas
[  342.640972] scsi 0:0:0:0: Direct-Access     SABRENT                   0204 PQ                                                                             : 0 ANSI: 6
[  345.935277] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/93                                                                             2 GiB)
[  345.935286] sd 0:0:0:0: [sda] 4096-byte physical blocks
[  345.935531] sd 0:0:0:0: [sda] Write Protect is off
[  345.935538] sd 0:0:0:0: [sda] Mode Sense: 53 00 00 08
[  345.936048] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, does                                                                             n't support DPO or FUA
[  345.936856] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a mult                                                                             iple of physical block size (4096 bytes)
[  345.940078]  sda: sda1
* As can be seen this is a USB3.0 SATA 3 adapter from Sabrent. Running in `uas` mode.
* To verify how poorly this was running I tested the speed using:

Code: Select all

hdparm -t /dev/sda1
/dev/sda1:
 Timing buffered disk reads: 516 MB in 33.25 seconds =  15.52 MB/sec
* Which of course is extremely slow. I then checked the log again using `dmesg`:

Code: Select all

[ 1247.365069] usb 2-1: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[ 1247.387663] scsi host0: uas_eh_device_reset_handler success
[ 1279.648929] sd 0:0:0:0: [sda] tag#3 uas_eh_abort_handler 0 uas-tag 4 inflight: CMD IN
[ 1279.648937] sd 0:0:0:0: [sda] tag#3 CDB: opcode=0x28 28 00 03 fa 64 50 00 01 00 00
[ 1279.649085] sd 0:0:0:0: [sda] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD IN
[ 1279.649091] sd 0:0:0:0: [sda] tag#1 CDB: opcode=0x28 28 00 00 00 10 00 00 04 00 00
[ 1279.649553] sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
[ 1279.649559] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 0c 00 00 04 00 00
[ 1286.049165] sd 0:0:0:0: tag#4 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD
[ 1286.049173] sd 0:0:0:0: tag#4 CDB: opcode=0x0 00 00 00 00 00 00
[ 1286.065838] scsi host0: uas_eh_device_reset_handler start
* Same issues as discussed in this post.
* Fixing this on libreelec was a bit different though, hence why I wrote this post.
* Navigate to root after logging in, ensure you can edit the `/flash/cmdline.txt` by remounting, then edit file.

Code: Select all

cd ..
mount -o remount,rw /flash
nano /flash/cmdline.txt
* I simply adding the below to the beginning of the file and saved:

Code: Select all

usb-storage.quirks=152d:1561:u
* And then rebooted:

Code: Select all

reboot
* After rebooting I checked that the quirk was applied:

Code: Select all

dmesg | grep usb-storage
[    0.673330] usbcore: registered new interface driver usb-storage
[    1.024033] usb 2-1: UAS is blacklisted for this device, using usb-storage in                                                                             stead
[    1.024147] usb 2-1: UAS is blacklisted for this device, using usb-storage in                                                                             stead
[    1.024163] usb-storage 2-1:1.0: USB Mass Storage device detected
[    1.024576] usb-storage 2-1:1.0: Quirks match for vid 152d pid 1561: 800000
[    1.024726] scsi host0: usb-storage 2-1:1.0
* Which it was, and I then retested the performance:

Code: Select all

LibreELEC:~ # hdparm -t /dev/sda1

/dev/sda1:
 Timing buffered disk reads: 930 MB in  3.00 seconds = 309.71 MB/sec
* A 20x improvement and it runs so much better. So thank you for this sticky. :)

I do have a question though then, where can I post and issue so that this USB3.0 adapter is included in the quirks list by default?

I am running raspbian, the above works for libreelec, but do I then have to add this quirk workaround to all the OS'es I use via Raspbian?

Gadgetguy
Posts: 129
Joined: Fri Aug 15, 2014 2:55 am

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Mon Jan 27, 2020 7:46 am

I have a QNINE M.2 NGFF Portable SSD Enclosure USB3.0 Case, SATA

https://www.amazon.ca/QNINE-Portable-En ... B06VWC158P

used to enclose and connect a 32gb kingdian m.2 ssd. to the usb 3 port on my pi4.
The enclosure shows as JMicron Technology Corp. Vendor id 152d part id 1562

Only by using the quirks method was I able to boot from sd and run the system root os off of the ssd. As noted in the original post in this thread this disables uas smart features and runs the ssd as a mass storage device.
Running : sudo hdparm -I /dev/sda2 | grep -i TRIM
shows “ Data Set Management TRIM supported (limit 8 blocks) “
Running:
sudo fstrim -v /
shows : fstrim: /: the discard operation is not supported

So then reading and following the instructions in the following post in these forums:

RPi4 external USB3 SSD Enable and Check Trim at:

viewtopic.php?f=63&t=245348&p=1497265&h ... 7#p1497265

I enabled discard in the fstab file and created a rule file
named “01-unmap.rules“ in /etc/udev/rules.d/
Rebooting I again tried “sudo fstrim -v / “ which returned:
"FITRIM ioctl failed: Remote I? O error"


So now after that long tedious explanation of my problem my two questions are firstly does quirks always disable trim? As I understand not running trim does not cause any wear on the ssd but makes it less “ speedy “. Secondly is it a signifiant slowing down over time or is hardly perceptible?


ps. It is interesting that in James Chambers article “Raspberry Pi 4 USB Boot Config Guide for SSD / Flash Drives” at :
https://jamesachambers.com/raspberry-pi ... mment-3194

in the section “ Known Working Adapters” both of my ssd enclosures are listed as working, the aforementioned qnine encloseure and the orico transparent case. With both of these enclosures I had to use quirks. edit : I am wrong here the two enclosures mentioned are different tan mine

My kingdian m.2 sata ssd using the aforementioned qnine enclosure yielded a benchmark “ Score: 4564 “ (edit re-benchmarked now score is 6352) after using J. Chambers benchmarking suite which is certainly a lot higher than the benchmarks scored by my sd cards but still rather mediocre. In my real world use case web browsing watching videos ,libre office etc the difference between using an sd card and ssd was not really as dramatic as I had expected.
I got a benchmark of “4858” for my crucial bx500 in the orico transparent enclosure. I noted someone else using the self same crucial bx500 got a much higher benchmark of “8904” using ELUTENG SATA to USB adapter enclosure.
Last edited by Gadgetguy on Mon Feb 24, 2020 3:57 pm, edited 1 time in total.

rpi-alain
Posts: 4
Joined: Thu Mar 07, 2019 11:47 am

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Mon Jan 27, 2020 9:09 am

found there , the "gadgetguy" ' s post is interesting .

gadgetguy's post

here are my results with an ssd M.2 LDLC in an icy-box IB-183 M2. (LDLC also) .

Code: Select all

  idVendor           0x152d JMicron Technology Corp. / JMicron USA Technology Corp.
  idProduct          0x1576
  bcdDevice            2.04
  iManufacturer           1 JMicron
  iProduct                2 JMS579
and no, I'm not doing a commercial. It's just for you to know and find out.

Code: Select all

     Category                  Test                      Result     
HDParm                    Disk Read                 161.51 MB/s              
HDParm                    Cached Disk Read          171.00 MB/s              
DD                        Disk Write                182 MB/s                 
FIO                       4k random read            4687 IOPS (18750 KB/s)   
FIO                       4k random write           6139 IOPS (24556 KB/s)   
IOZone                    4k read                   28281 KB/s               
IOZone                    4k write                  18304 KB/s               
IOZone                    4k random read            15854 KB/s               
IOZone                    4k random write           24194 KB/s               

                          Score: 6184                                        
link :

Code: Select all

sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash
only for test on your raspi (rpi4 /usb 3.0 for me)

Code: Select all

lsusb 
Bus 002 Device 002: ID 152d:1576 JMicron Technology Corp. / JMicron USA Technology Corp. 
also , on my raspi , with uas unactivated :

Code: Select all

[email protected]:~ $  cat /var/log/kern.log | grep "Jan 25 02:" | grep -iE "usb 2-2|sda" | less

Jan 25 02:06:26 raspberrypi kernel: [    1.881858] usb 2-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Jan 25 02:06:26 raspberrypi kernel: [    1.913147] usb 2-2: New USB device found, idVendor=152d, idProduct=1576, bcdDevice= 2.04
Jan 25 02:06:26 raspberrypi kernel: [    1.914263] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 25 02:06:26 raspberrypi kernel: [    1.915375] usb 2-2: Product: JMS579
Jan 25 02:06:26 raspberrypi kernel: [    1.916454] usb 2-2: Manufacturer: JMicron
Jan 25 02:06:26 raspberrypi kernel: [    1.917508] usb 2-2: SerialNumber: 987654321029
Jan 25 02:06:26 raspberrypi kernel: [    1.921689] usb 2-2: UAS is blacklisted for this device, using usb-storage instead
Jan 25 02:06:26 raspberrypi kernel: [    1.922847] usb 2-2: UAS is blacklisted for this device, using usb-storage instead
Jan 25 02:06:26 raspberrypi kernel: [    2.954237] sd 0:0:0:0: [sda] 937703088 512-byte logical blocks: (480 GB/447 GiB)
Jan 25 02:06:26 raspberrypi kernel: [    2.956115] sd 0:0:0:0: [sda] Write Protect is off
Jan 25 02:06:26 raspberrypi kernel: [    2.957321] sd 0:0:0:0: [sda] Mode Sense: 47 00 00 08
Jan 25 02:06:26 raspberrypi kernel: [    2.957967] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jan 25 02:06:26 raspberrypi kernel: [    2.963033]  sda: sda1 sda2
Jan 25 02:06:26 raspberrypi kernel: [    2.967160] sd 0:0:0:0: [sda] Attached SCSI disk
Jan 25 02:06:26 raspberrypi kernel: [    3.091540] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
Jan 25 02:06:26 raspberrypi kernel: [    5.320973] EXT4-fs (sda2): re-mounted. Opts: (null)

Code: Select all

[email protected]:~ $ dmesg | grep usb-storage

[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 cma=64M cma=256M  smsc95xx.macaddr=DC:A6:32:5E:85:71 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  usb-storage.quirks=152d:1576:u console=ttyS0,115200 console=tty1 root=PARTUUID=7f7a6d07-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.496951] usbcore: registered new interface driver usb-storage
[    1.921689] usb 2-2: UAS is blacklisted for this device, using usb-storage instead
[    1.922847] usb 2-2: UAS is blacklisted for this device, using usb-storage instead
[    1.923903] usb-storage 2-2:1.0: USB Mass Storage device detected
[    1.925308] usb-storage 2-2:1.0: Quirks match for vid 152d pid 1576: 800000
[    1.926494] scsi host0: usb-storage 2-2:1.0


rpi-alain
Posts: 4
Joined: Thu Mar 07, 2019 11:47 am

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Mon Jan 27, 2020 10:15 pm

hi guys

here are the characteristics of my "ssd sata M.2 icybox" box

https://www.ldlc.com/fiche/PB00232398.html

Code: Select all

[email protected]:~ $ lsusb
Bus 002 Device 002: ID 152d:1576 JMicron Technology Corp. / JMicron USA Technology Corp.
for example : https://ubuntuforums.org/showthread.php?t=2364823

Code: Select all

  idVendor           0x152d JMicron Technology Corp. / JMicron USA Technology Corp.
  idProduct          0x1576
  bcdDevice            2.04
  iManufacturer           1 JMicron
  iProduct                2 JMS579
test done this :

Code: Select all

     Category                  Test                      Result     
HDParm                    Disk Read                 161.51 MB/s              
HDParm                    Cached Disk Read          171.00 MB/s              
DD                        Disk Write                182 MB/s                 
FIO                       4k random read            4687 IOPS (18750 KB/s)   
FIO                       4k random write           6139 IOPS (24556 KB/s)   
IOZone                    4k read                   28281 KB/s               
IOZone                    4k write                  18304 KB/s               
IOZone                    4k random read            15854 KB/s               
IOZone                    4k random write           24194 KB/s               

                          Score: 6184  
now , i bought this :

https://www.amazon.fr/QNINE-Bo%C3%AEtie ... ers&sr=1-1

instead of this : https://www.amazon.ca/QNINE-Portable-En ... merReviews

which could create more problems than i already have .

waiting for my purchase (nearly the 1st february) .

i will telll you how it goes with the "uas" .

information found here : https://jamesachambers.com/raspberry-pi ... mment-3194

rpi-alain
Posts: 4
Joined: Thu Mar 07, 2019 11:47 am

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Fri Jan 31, 2020 2:50 pm

with the new "qnine" adapter it seems to be much better in reading . a little better in writing . not much . average score .

Code: Select all

     Category                  Test                      Result     
HDParm                    Disk Read                 298.02 MB/s              
HDParm                    Cached Disk Read          270.90 MB/s              
DD                        Disk Write                157 MB/s                 
FIO                       4k random read            14883 IOPS (59534 KB/s)  
FIO                       4k random write           8328 IOPS (33314 KB/s)   
IOZone                    4k read                   29590 KB/s               
IOZone                    4k write                  26698 KB/s               
IOZone                    4k random read            17074 KB/s               
IOZone                    4k random write           30608 KB/s               

                          Score: 7342 

Code: Select all

[email protected]:~ $ sudo smartctl -i /dev/sda
smartctl 6.6 2017-11-05 r4594 [armv7l-linux-4.19.93-v7l+] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     LDLC F6+M.2 480
Serial Number:    09042219D0059
Firmware Version: S0424A0
User Capacity:    480 103 981 056 bytes [480 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      M.2
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 T13/2015-D revision 3
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Jan 31 16:23:08 2020 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Code: Select all

[email protected]:~ $ lsusb
Bus 002 Device 002: ID 174c:55aa ASMedia Technology Inc. Name: ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge

Code: Select all

[email protected]:~ $ sudo dmesg | grep -iE "usb 2-2|sda"
[    1.181923] usb 2-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[    1.212847] usb 2-2: New USB device found, idVendor=174c, idProduct=55aa, bcdDevice= 1.00
[    1.213735] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    1.214624] usb 2-2: Product: ASMT1051
[    1.215484] usb 2-2: Manufacturer: asmedia
[    1.216320] usb 2-2: SerialNumber: 12345678F7F5
[    1.240624] sd 0:0:0:0: [sda] Spinning up disk...
[    2.323686] sd 0:0:0:0: [sda] 937703088 512-byte logical blocks: (480 GB/447 GiB)
[    2.325198] sd 0:0:0:0: [sda] Write Protect is off
[    2.326537] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[    2.326840] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.330162] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes
[    2.333809]  sda: sda1 sda2
[    2.337577] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.467593] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[    4.701889] EXT4-fs (sda2): re-mounted. Opts: (null)

sismindi
Posts: 4
Joined: Mon Feb 10, 2020 2:37 pm

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Tue Feb 11, 2020 6:10 am

Hi. how are you?
I did what the thread recommended. But I still have errors. It is not a problem of power supply because I have tested with 4 different 12v sources.

I have two hdd 3.5. One of 3 tb and another of 4 tb.

I use a "sinpolar" hub https://es.aliexpress.com/item/32906951 ... 63c0bXCEGM and these sata usb adapters https://es.aliexpress.com/item/33003991428.html ? spm = a2g0s.9042311.0.0.274263c05ChluF

This is my log history. Please help!!!

eb 11 02:50:16 raspberrypi kernel: [ 875.067451] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:50:21 raspberrypi kernel: [ 880.107575] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:50:21 raspberrypi kernel: [ 880.207815] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:50:21 raspberrypi kernel: [ 880.240472] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:50:21 raspberrypi kernel: [ 880.240481] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 2e 1b 08 00 00 02 00 00 00
Feb 11 02:50:21 raspberrypi kernel: [ 880.240487] print_req_error: I/O error, dev sdb, sector 86907656
Feb 11 02:50:30 raspberrypi kernel: [ 888.667738] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:50:34 raspberrypi monit[1033]: '\raspberrypi' loadavg (5min) of 5.5 matches resource limit [loadavg (5min) > 4.0]
Feb 11 02:50:35 raspberrypi kernel: [ 893.707828] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:50:35 raspberrypi kernel: [ 893.808165] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:50:35 raspberrypi kernel: [ 893.840794] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:50:35 raspberrypi kernel: [ 893.840803] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 40 28 b0 00 00 01 00 00 00
Feb 11 02:50:35 raspberrypi kernel: [ 893.840810] print_req_error: I/O error, dev sdb, sector 88090800
Feb 11 02:50:43 raspberrypi kernel: [ 901.548009] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:50:46 raspberrypi systemd[1]: Starting Cleanup of Temporary Directories...
Feb 11 02:50:46 raspberrypi systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Feb 11 02:50:46 raspberrypi systemd[1]: Started Cleanup of Temporary Directories.
Feb 11 02:50:48 raspberrypi kernel: [ 906.588185] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:50:48 raspberrypi kernel: [ 906.688551] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:50:48 raspberrypi kernel: [ 906.721270] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:50:48 raspberrypi kernel: [ 906.721286] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 4a 63 b0 00 00 00 c0 00 00
Feb 11 02:50:48 raspberrypi kernel: [ 906.721296] print_req_error: I/O error, dev sdb, sector 88761264
Feb 11 02:50:55 raspberrypi kernel: [ 913.388312] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:51:00 raspberrypi kernel: [ 918.428386] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:51:00 raspberrypi kernel: [ 918.528667] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:51:00 raspberrypi kernel: [ 918.561350] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:51:00 raspberrypi kernel: [ 918.561359] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 50 1f 90 00 00 01 00 00 00
Feb 11 02:51:00 raspberrypi kernel: [ 918.561364] print_req_error: I/O error, dev sdb, sector 89137040
Feb 11 02:51:04 raspberrypi monit[1033]: '\raspberrypi' loadavg (5min) of 5.2 matches resource limit [loadavg (5min) > 4.0]
Feb 11 02:51:06 raspberrypi kernel: [ 925.228645] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:51:12 raspberrypi kernel: [ 930.268580] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:51:12 raspberrypi kernel: [ 930.368917] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:51:12 raspberrypi kernel: [ 930.401637] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:51:12 raspberrypi kernel: [ 930.401646] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 56 1f 70 00 00 01 00 00 00
Feb 11 02:51:12 raspberrypi kernel: [ 930.401652] print_req_error: I/O error, dev sdb, sector 89530224
Feb 11 02:51:20 raspberrypi kernel: [ 938.668848] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:51:25 raspberrypi kernel: [ 943.708919] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:51:25 raspberrypi kernel: [ 943.819239] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:51:25 raspberrypi kernel: [ 943.852344] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:51:25 raspberrypi kernel: [ 943.852360] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 70 c6 b8 00 00 01 00 00 00
Feb 11 02:51:25 raspberrypi kernel: [ 943.852370] print_req_error: I/O error, dev sdb, sector 91276984
Feb 11 02:51:28 raspberrypi kernel: [ 946.383856] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Feb 11 02:51:28 raspberrypi kernel: [ 946.383866] sd 1:0:0:0: [sdb] tag#0 Sense Key : 0xb [current]
Feb 11 02:51:28 raspberrypi kernel: [ 946.383872] sd 1:0:0:0: [sdb] tag#0 ASC=0x47 ASCQ=0x1
Feb 11 02:51:28 raspberrypi kernel: [ 946.383880] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 70 f0 b8 00 00 01 00 00 00
Feb 11 02:51:28 raspberrypi kernel: [ 946.383886] print_req_error: I/O error, dev sdb, sector 91287736
Feb 11 02:51:28 raspberrypi kernel: [ 946.649727] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:51:28 raspberrypi kernel: [ 946.684237] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:51:28 raspberrypi kernel: [ 946.684247] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 71 ae 78 00 00 01 00 00 00
Feb 11 02:51:28 raspberrypi kernel: [ 946.684253] print_req_error: I/O error, dev sdb, sector 91336312
Feb 11 02:51:34 raspberrypi monit[1033]: '\raspberrypi' loadavg (5min) of 5.1 matches resource limit [loadavg (5min) > 4.0]
Feb 11 02:51:34 raspberrypi kernel: [ 953.069243] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:51:39 raspberrypi kernel: [ 958.109202] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:51:39 raspberrypi kernel: [ 958.209530] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:51:39 raspberrypi kernel: [ 958.242159] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:51:39 raspberrypi kernel: [ 958.242168] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 79 56 d8 00 00 01 00 00 00
Feb 11 02:51:39 raspberrypi kernel: [ 958.242174] print_req_error: I/O error, dev sdb, sector 91838168
Feb 11 02:51:46 raspberrypi kernel: [ 964.989574] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:51:51 raspberrypi kernel: [ 970.029458] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:51:51 raspberrypi kernel: [ 970.129843] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:51:51 raspberrypi kernel: [ 970.162530] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:51:51 raspberrypi kernel: [ 970.162539] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 7d 92 60 00 00 01 00 00 00
Feb 11 02:51:51 raspberrypi kernel: [ 970.162545] print_req_error: I/O error, dev sdb, sector 92115552
Feb 11 02:52:01 raspberrypi kernel: [ 979.389723] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:52:04 raspberrypi monit[1033]: '\raspberrypi' loadavg (5min) of 5.2 matches resource limit [loadavg (5min) > 4.0]
Feb 11 02:52:06 raspberrypi kernel: [ 984.429781] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:52:06 raspberrypi kernel: [ 984.530276] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:52:06 raspberrypi kernel: [ 984.573027] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:52:06 raspberrypi kernel: [ 984.573043] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 94 e0 80 00 00 01 00 00 00
Feb 11 02:52:06 raspberrypi kernel: [ 984.573053] print_req_error: I/O error, dev sdb, sector 93642880
Feb 11 02:52:08 raspberrypi kernel: [ 986.360161] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:52:08 raspberrypi kernel: [ 986.392774] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:52:08 raspberrypi kernel: [ 986.392783] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 99 a0 60 00 00 01 00 00 00
Feb 11 02:52:08 raspberrypi kernel: [ 986.392789] print_req_error: I/O error, dev sdb, sector 93954144
Feb 11 02:52:15 raspberrypi kernel: [ 993.470032] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:52:20 raspberrypi kernel: [ 998.510090] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:52:20 raspberrypi kernel: [ 998.610419] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:52:20 raspberrypi kernel: [ 998.643080] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:52:20 raspberrypi kernel: [ 998.643088] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 a4 55 08 00 00 01 00 00 00
Feb 11 02:52:20 raspberrypi kernel: [ 998.643095] print_req_error: I/O error, dev sdb, sector 94655752
Feb 11 02:52:28 raspberrypi kernel: [ 1006.830359] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:52:33 raspberrypi kernel: [ 1011.880453] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:52:33 raspberrypi kernel: [ 1011.980939] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:52:33 raspberrypi kernel: [ 1012.013644] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:52:33 raspberrypi kernel: [ 1012.013661] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 ae 44 68 00 00 01 00 00 00
Feb 11 02:52:33 raspberrypi kernel: [ 1012.013673] print_req_error: I/O error, dev sdb, sector 95306856
Feb 11 02:52:34 raspberrypi monit[1033]: '\raspberrypi' loadavg (5min) of 5.3 matches resource limit [loadavg (5min) > 4.0]
Feb 11 02:52:39 raspberrypi kernel: [ 1018.190626] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:52:44 raspberrypi kernel: [ 1023.230621] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:52:45 raspberrypi kernel: [ 1023.331095] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:52:45 raspberrypi kernel: [ 1023.363611] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:52:45 raspberrypi kernel: [ 1023.363620] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 b0 77 88 00 00 01 00 00 00
Feb 11 02:52:45 raspberrypi kernel: [ 1023.363626] print_req_error: I/O error, dev sdb, sector 95451016
Feb 11 02:52:51 raspberrypi kernel: [ 1029.790834] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:52:56 raspberrypi kernel: [ 1034.830892] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:52:56 raspberrypi kernel: [ 1034.931438] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:52:56 raspberrypi kernel: [ 1034.964136] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:52:56 raspberrypi kernel: [ 1034.964153] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 b1 e6 48 00 00 01 00 00 00
Feb 11 02:52:56 raspberrypi kernel: [ 1034.964164] print_req_error: I/O error, dev sdb, sector 95544904
Feb 11 02:53:03 raspberrypi kernel: [ 1041.631093] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:53:05 raspberrypi monit[1033]: '\raspberrypi' loadavg (5min) of 5.2 matches resource limit [loadavg (5min) > 4.0]
Feb 11 02:53:08 raspberrypi kernel: [ 1046.671187] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:53:08 raspberrypi kernel: [ 1046.771447] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:53:08 raspberrypi kernel: [ 1046.814038] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:53:08 raspberrypi kernel: [ 1046.814046] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 b5 8e 88 00 00 01 00 00 00
Feb 11 02:53:08 raspberrypi kernel: [ 1046.814053] print_req_error: I/O error, dev sdb, sector 95784584
Feb 11 02:53:09 raspberrypi kernel: [ 1047.861484] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:53:09 raspberrypi kernel: [ 1047.894099] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:53:09 raspberrypi kernel: [ 1047.894108] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 b5 cf 88 00 00 01 00 00 00
Feb 11 02:53:09 raspberrypi kernel: [ 1047.894114] print_req_error: I/O error, dev sdb, sector 95801224
Feb 11 02:53:11 raspberrypi kernel: [ 1049.914287] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Feb 11 02:53:11 raspberrypi kernel: [ 1049.914297] sd 1:0:0:0: [sdb] tag#0 Sense Key : 0xb [current]
Feb 11 02:53:11 raspberrypi kernel: [ 1049.914303] sd 1:0:0:0: [sdb] tag#0 ASC=0x47 ASCQ=0x1
Feb 11 02:53:11 raspberrypi kernel: [ 1049.914311] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 bb a1 68 00 00 01 00 00 00
Feb 11 02:53:11 raspberrypi kernel: [ 1049.914318] print_req_error: I/O error, dev sdb, sector 96182632
Feb 11 02:53:17 raspberrypi kernel: [ 1055.391350] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:53:22 raspberrypi kernel: [ 1060.431407] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:53:22 raspberrypi kernel: [ 1060.531748] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:53:22 raspberrypi kernel: [ 1060.564522] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:53:22 raspberrypi kernel: [ 1060.564532] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 bd cc 48 00 00 01 00 00 00
Feb 11 02:53:22 raspberrypi kernel: [ 1060.564538] print_req_error: I/O error, dev sdb, sector 96324680
Feb 11 02:53:25 raspberrypi kernel: [ 1063.291826] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:53:25 raspberrypi kernel: [ 1063.324711] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:53:25 raspberrypi kernel: [ 1063.324719] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 c3 c2 48 00 00 01 00 00 00
Feb 11 02:53:25 raspberrypi kernel: [ 1063.324725] print_req_error: I/O error, dev sdb, sector 96715336
Feb 11 02:53:32 raspberrypi kernel: [ 1070.511689] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:53:35 raspberrypi monit[1033]: '\raspberrypi' loadavg (5min) of 5.2 matches resource limit [loadavg (5min) > 4.0]
Feb 11 02:53:37 raspberrypi kernel: [ 1075.551728] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:53:37 raspberrypi kernel: [ 1075.662058] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:53:37 raspberrypi kernel: [ 1075.694706] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:53:37 raspberrypi kernel: [ 1075.694715] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 cc 5e 68 00 00 01 00 00 00
Feb 11 02:53:37 raspberrypi kernel: [ 1075.694720] print_req_error: I/O error, dev sdb, sector 97279592
Feb 11 02:53:39 raspberrypi kernel: [ 1077.742132] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:53:39 raspberrypi kernel: [ 1077.774749] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:53:39 raspberrypi kernel: [ 1077.774759] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 d1 2f c8 00 00 01 00 00 00
Feb 11 02:53:39 raspberrypi kernel: [ 1077.774764] print_req_error: I/O error, dev sdb, sector 97595336
Feb 11 02:53:45 raspberrypi kernel: [ 1083.792088] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:53:50 raspberrypi kernel: [ 1088.832076] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:53:50 raspberrypi kernel: [ 1088.932338] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:53:50 raspberrypi kernel: [ 1088.965046] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:53:50 raspberrypi kernel: [ 1088.965055] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 d3 0f e8 00 00 01 00 00 00
Feb 11 02:53:50 raspberrypi kernel: [ 1088.965061] print_req_error: I/O error, dev sdb, sector 97718248
Feb 11 02:53:57 raspberrypi kernel: [ 1095.792330] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:54:02 raspberrypi kernel: [ 1100.832461] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:54:02 raspberrypi kernel: [ 1100.932803] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:54:02 raspberrypi kernel: [ 1100.965651] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:54:02 raspberrypi kernel: [ 1100.965668] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 d8 46 c8 00 00 01 00 00 00
Feb 11 02:54:02 raspberrypi kernel: [ 1100.965678] print_req_error: I/O error, dev sdb, sector 98059976
Feb 11 02:54:05 raspberrypi monit[1033]: '\raspberrypi' loadavg (5min) of 5.1 matches resource limit [loadavg (5min) > 4.0]
Feb 11 02:54:09 raspberrypi kernel: [ 1108.032495] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:54:14 raspberrypi kernel: [ 1113.072590] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:54:14 raspberrypi kernel: [ 1113.182896] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:54:14 raspberrypi kernel: [ 1113.215519] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:54:14 raspberrypi kernel: [ 1113.215528] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 db a7 50 00 00 01 00 00 00
Feb 11 02:54:14 raspberrypi kernel: [ 1113.215535] print_req_error: I/O error, dev sdb, sector 98281296
Feb 11 02:54:21 raspberrypi kernel: [ 1119.632854] usb 2-1.2: Disable of device-initiated U1 failed.
Feb 11 02:54:26 raspberrypi kernel: [ 1124.672827] usb 2-1.2: Disable of device-initiated U2 failed.
Feb 11 02:54:26 raspberrypi kernel: [ 1124.773241] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 11 02:54:26 raspberrypi kernel: [ 1124.806019] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Feb 11 02:54:26 raspberrypi kernel: [ 1124.806035] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 05 dd 82 50 00 00 01 00 00 00
Feb 11 02:54:26 raspberrypi kernel: [ 1124.806045] print_req_error: I/O error, dev sdb, sector 98402896
Feb 11 02:54:33 raspberrypi kernel: [ 1131.312986] usb 2-1.2: Disable of device-initiated U1 failed.

gilesnr
Posts: 2
Joined: Sun Jan 12, 2020 12:55 pm

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Mon Feb 24, 2020 12:03 am

Hello,
I have a Qnine USB 3.1 Type-C to NVMe M.2 enclosure for a Western Digital WD Blue SN550 500GB and have it installed on my Raspberry Pi 4, connected to one of the USB 3.0 ports.

However, I get 30MB/s for Hdparm as it's via the USB 2.0 bus:

Code: Select all

lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 152d:0562 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code: Select all

lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
Anyone else have this set up and working correctly perhaps with a different enclosure?

Is the problem kernel or firmware?

Thanks!
Giles

SunnyJim
Posts: 1
Joined: Mon Feb 24, 2020 7:19 am

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Mon Feb 24, 2020 7:44 am

The quirk works for me, it seems. I am using a Pi 4 with OpenMediaVault on Raspian Buster. I have a Sabrent idVendor=152d, idProduct=1561 USB cable with a 500GB Samsung 860 EVO SSD. I am using NTFS and a Samba share to stream music.

The symptom was occasionally playback would drop out and the activity lamp on the cable would blink rapidly for ~ 30 seconds then playback would resume. I am relieved to have a fix.

Can someone offer information about disabling UAS and SSDs, longevity and "trim"? Should this be a concern? I assumed the SSD firmware would ensure correct write performance.

torak666
Posts: 57
Joined: Tue Feb 06, 2018 4:58 pm

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Mon Feb 24, 2020 7:00 pm

SunnyJim wrote:
Mon Feb 24, 2020 7:44 am
The quirk works for me, it seems. I am using a Pi 4 with OpenMediaVault on Raspian Buster. I have a Sabrent idVendor=152d, idProduct=1561 USB cable with a 500GB Samsung 860 EVO SSD. I am using NTFS and a Samba share to stream music.

The symptom was occasionally playback would drop out and the activity lamp on the cable would blink rapidly for ~ 30 seconds then playback would resume. I am relieved to have a fix.

Can someone offer information about disabling UAS and SSDs, longevity and "trim"? Should this be a concern? I assumed the SSD firmware would ensure correct write performance.
Hi , i have a chinese no name sata adaptater USB 3.0 and i have lower thant 6Mbt/s (throught Filezilla and Samba same speed) with my 500GB Samsung 860 EVO SSD it is due to my suckings adaptater? What is your speed with your Sabrent and Samsung SSD?

Gadgetguy
Posts: 129
Joined: Fri Aug 15, 2014 2:55 am

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Mon Feb 24, 2020 8:19 pm

SunnyJim wrote:
Mon Feb 24, 2020 7:44 am
The quirk works for me, it seems. I am using a Pi 4 with OpenMediaVault on Raspian Buster. I have a Sabrent idVendor=152d, idProduct=1561 USB cable with a 500GB Samsung 860 EVO SSD. I am using NTFS and a Samba share to stream music.

The symptom was occasionally playback would drop out and the activity lamp on the cable would blink rapidly for ~ 30 seconds then playback would resume. I am relieved to have a fix.

Can someone offer information about disabling UAS and SSDs, longevity and "trim"? Should this be a concern? I assumed the SSD firmware would ensure correct write performance.

You may find it of interest to see if there is a definitive response to my similar question at:

Re: RPi4 external USB3 SSD Enable and Check Trim

viewtopic.php?f=63&t=245348#p1617027

torak666
Posts: 57
Joined: Tue Feb 06, 2018 4:58 pm

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Fri Feb 28, 2020 6:13 pm

Hi,
i received my new sabrent and apply the quirks command it is very nice i have this speed (my chinese sata usb3.0 don't product uas speed like that):

Code: Select all

 Timing cached reads:   1536 MB in  2.00 seconds = 767.93 MB/sec
 Timing buffered disk reads: 934 MB in  3.00 seconds = 311.32 MB/sec
So thanks for the tutorial.
And here the write speed on internal pi4:

Code: Select all

LibreELEC:/var/media/sda5-usb-SABRENT_SABRENT_ # dd if=/dev/zero of=/media/sda5-
usb-SABRENT_SABRENT_/tempfile bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.0GB) copied, 6.774491 seconds, 151.2MB/s
My problem is on Windows with Samba i have only a write speed of 6Mo/s. The write is from Windows with the SDD share on Samba to the raspberry pi 4 with Kodi 18.5.
Im using only ethernet through raspberry and the computer, my external SSD is on ext4 (samsung 860 evo 2"5, 500Go)
BLKID:

Code: Select all

/dev/sda5: UUID="3318f929-42ec-4335-925c-6eda4bb69970" TYPE="ext4" PARTUUID="0c0                              b5dcc-05"
What should i do to increase the speed connexion between Windows 10 and raspberry pi on Samba?

Thanks Regards,

ChrisRPI01
Posts: 3
Joined: Sun Mar 01, 2020 7:31 pm

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Sun Mar 01, 2020 7:58 pm

jdb wrote:
Tue Jul 16, 2019 2:33 pm
UAS is wonderful, until you come across UAS devices that don't fully implement the UAS specification. Typically, these devices will just stop responding when issued UAS commands that they don't like, or may in rare cases throw write data away which can cause filesystem corruption.

The Linux kernel has a built-in blacklist for devices known to be unreliable when using UAS. This is not an exhaustive list - if a manufacturer releases a new version of a controller with a different product ID, the blacklist will no longer match.
Hello jdb,

for my understanding, how is it that the same adapter runs under one platform (x86) and not under the other (arm/rpi)?

As an example:
ORICO 2.5" USB 3.0 SATA III 6 Gb/s
https://www.amazon.de/ORICO-Festplatten ... =1-2-fkmr0

via

JMicron JMS567
https://www.jmicron.com/file/download/1 ... letter.pdf

With Ubuntu 19.10 on x86 (Intel) basis there is no problem.

Linux ubuntu 5.3.0-18-generic #19-Ubuntu SMP Tue Oct 8 20:14:06 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
USB controller: Intel Corporation 8 Series USB

[Sun Mar 1 17:44:32 2020] usb 3-2: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[Sun Mar 1 17:44:32 2020] usb 3-2: New USB device found, idVendor=152d, idProduct=0578, bcdDevice= 2.04
[Sun Mar 1 17:44:32 2020] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Sun Mar 1 17:44:32 2020] usb 3-2: Product: External USB 3.0
[Sun Mar 1 17:44:32 2020] usb 3-2: Manufacturer: JMicron
[Sun Mar 1 17:44:32 2020] usb 3-2: SerialNumber: 201703310007F
[Sun Mar 1 17:44:32 2020] scsi host5: uas
[Sun Mar 1 17:44:32 2020] scsi 5:0:0:0: Direct-Access External USB3.0 0204 PQ: 0 ANSI: 6
[Sun Mar 1 17:44:32 2020] sd 5:0:0:0: Attached scsi generic sg2 type 0
[Sun Mar 1 17:44:32 2020] sd 5:0:0:0: [sdc] 234441648 512-byte logical blocks: (120 GB/112 GiB)
[Sun Mar 1 17:44:32 2020] sd 5:0:0:0: [sdc] 4096-byte physical blocks
[Sun Mar 1 17:44:32 2020] sd 5:0:0:0: [sdc] Write Protect is off
[Sun Mar 1 17:44:32 2020] sd 5:0:0:0: [sdc] Mode Sense: 53 00 00 08
[Sun Mar 1 17:44:32 2020] sd 5:0:0:0: [sdc] Disabling FUA
[Sun Mar 1 17:44:32 2020] sd 5:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[Sun Mar 1 17:44:32 2020] sd 5:0:0:0: [sdc] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[Sun Mar 1 17:44:32 2020] sdc: sdc1 sdc2
[Sun Mar 1 17:44:32 2020] sd 5:0:0:0: [sdc] Attached SCSI disk

[email protected]:~/Desktop$ sudo hdparm -tT --direct /dev/sdc

/dev/sdc:
Timing O_DIRECT cached reads: 750 MB in 2.00 seconds = 374.82 MB/sec
Timing O_DIRECT disk reads: 1186 MB in 3.00 seconds = 394.97 MB/sec

Thanks a lot and regards

kamn
Posts: 1
Joined: Sat Mar 07, 2020 3:38 pm

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Sun Mar 08, 2020 2:06 pm

After a year with raspi 3B that worked without glitch with SSD drive bought myself raspi 4 4GB model in hope of better usb speeds.
But I am faced with frequent drive disconnects and low speeds that lead in the to unusable system - even ls command doesn't work.
Applied .quirks but it didn't help (checked and they were applied).
Raspi4 is powered with 3A and I have external USB powered hub...
Tried putting ssd in seagate and orico enclosures but it didn't help.

Almost same config with raspi 3 (raspi3 was powered by 2.5A) worked for months without glitch.

Update:
Back to rpi3 with same setup except weaker power adapter (2.5A). Working without problem for few days now.
Last edited by kamn on Fri Mar 13, 2020 6:38 pm, edited 1 time in total.

Rascas
Posts: 624
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Sun Mar 08, 2020 6:32 pm

Just my two cents: It was probably already mentioned in this topic, at least I already read the same problem that I have in this forum. If you are using an external USB 3.0 enclosure with a disk, and also using the internal Pi 4 wifi you might get problems. Most of the USB 3.0 enclosures have a weak USB cable not properly shielded and cause interference with the wifi. For me the solution is to not use wifi or disable it completely.
Notice that this problem is not RPi 4 specific, as the same happens in my Intel NUC where I have a wireless keyboard/mouse and I have to connect the disk on back side and the wireless pen on the front side.
The earlier RPi versions do not have this problem because they don't have a USB 3.0 hub.

gal10177
Posts: 2
Joined: Mon Dec 30, 2019 12:29 pm

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Thu Mar 12, 2020 7:18 am

hi,
I have similar problem. Im connecting USB 3 high bandwidth camera and getting very slow transfer rate. what should I write to the file you have mentioned instead of usb-storage.quirks?

wuffer79
Posts: 1
Joined: Thu Mar 12, 2020 2:33 pm

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Thu Mar 12, 2020 2:36 pm

Which adapter would you recommend for using internally in a nas case and with a 3.5" 4tb hard drive?

likewhoa
Posts: 1
Joined: Tue Mar 03, 2020 1:06 am

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Thu Mar 12, 2020 9:51 pm

My take here is that my problem wasn't with usb quirks or drive in general but issue was voltage related and fixed by powering the NVMe drive with a USB3 hub.

With usb quirks

Code: Select all

# hdparm -tT --direct /dev/sda

/dev/sda:
 Timing cached reads:   2312 MB in  2.00 seconds = 1156.62 MB/sec
 Timing buffered disk reads: 884 MB in  3.00 seconds = 294.53 MB/sec
without usb quirks

Code: Select all

# hdparm -tT --direct /dev/sda

/dev/sda:
 Timing cached reads:   2308 MB in  2.00 seconds = 1155.12 MB/sec
 Timing buffered disk reads: 1036 MB in  3.00 seconds = 345.24 MB/sec

Code: Select all

# lspci
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device 2711 (rev 10)
01:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)

Code: Select all

# lsusb
Bus 002 Device 005: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 002 Device 004: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 002 Device 003: ID 0bda:9210 Realtek Semiconductor Corp. 
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 001 Device 005: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 001 Device 003: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code: Select all

# uname -r
4.19.97-1-MANJARO-ARM
NVMe M.2 Drive https://www.amazon.com/gp/product/B07M7Q21N7
Drive Enclosure https://www.amazon.com/gp/product/B07N48N5GR
USB3 hub https://www.amazon.com/gp/product/B005NGQWL2

Performance stable so far, this one running a full Bitcoin node, nodejs, mysql and docker, so if you're still having issues try to use a USB3 hub to rule out power.

mickwombat
Posts: 3
Joined: Mon Sep 23, 2019 8:32 pm

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Wed Mar 18, 2020 10:02 am

I have the Samsung Evo nVME thing and tried the quirks method and still get very poor performance. Tried a couple different adapters also.

When I try to write a large file to the disk then at some point it will slow to a crawl and then I/O errors and it becomes unavailable.

I reformatted in a macbook and tried the same. No issues after multiple writes.

This certainly seems to be related to the pi.

Thoughts?

DylanMK_005
Posts: 3
Joined: Sun Mar 22, 2020 1:37 am

Re: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

Sun Mar 22, 2020 6:23 am

I have a Sabrent USB 3.0 4 bay 2.5 hard drive/ssd docking station that is plugged into my usb 3.0 port. I have 2 SSD's in there with raid 1 that is formatted for ext4 and have seen no improvements in speeds when applying the quirk. I was wondering if I had to take each SSD out and do it for each one or if I could just leave both SSD's in. I attached a image of my shell when I applied the quirk. Thanks
quirkFix.png
Screenshot of my cmd after I applied the changes.
quirkFix.png (24.4 KiB) Viewed 303 times

Return to “Troubleshooting”