BunchOfAtoms
Posts: 4
Joined: Wed Apr 07, 2021 10: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

Sat Apr 10, 2021 2:42 pm

ejolson wrote:
Thu Apr 08, 2021 3:12 pm
The main fault with the Pi seems to be it enables UAS mode when a device claims to support UAS mode rather than not doing so unless explicitly requested. I'm not sure who is to blame when such things don't turn out properly.

The other common problem people have is not supplying enough power to a power-hungry USB device for reliable operation. In this case, some cheapness may lie with the person who didn't get a properly powered USB hub to connect the device.

Have you tried setting quirks to disable UAS mode to see if that's the problem?
My USB enclosure is self-powered. I haven't tried to disable UAS (yet?) because my Pi already caused file system errors on my external HDDs and corrupted an SSD in another enclosure to the point it is (or at least looks) dead. Some people are reporting that disabling UAS mode just mitigate the issue, but doesn't fix it. I didn't buy the Pi4 to be a beta tester. I need my system to be reliable and I don't want to fry other disks. At the moment, what I ended up doing was turning the Pi off, throwing it in a drawer and connecting the USB enclosure to another PC on which USB 3.0 UAS mode is fast and works like a charm. I don't want to simplify too much, but it's hard not to blame the Pi when the internet is full of people complaining about problematic USB 3.0 connections on the Pi with 90% of the existing USB-SATA bridges that work just fine on other systems. Just Google it, it's overwhelming.

ejolson
Posts: 9527
Joined: Tue Mar 18, 2014 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

Sat Apr 10, 2021 3:32 pm

BunchOfAtoms wrote:
Sat Apr 10, 2021 2:42 pm
ejolson wrote:
Thu Apr 08, 2021 3:12 pm
The main fault with the Pi seems to be it enables UAS mode when a device claims to support UAS mode rather than not doing so unless explicitly requested. I'm not sure who is to blame when such things don't turn out properly.

The other common problem people have is not supplying enough power to a power-hungry USB device for reliable operation. In this case, some cheapness may lie with the person who didn't get a properly powered USB hub to connect the device.

Have you tried setting quirks to disable UAS mode to see if that's the problem?
My USB enclosure is self-powered. I haven't tried to disable UAS (yet?) because my Pi already caused file system errors on my external HDDs and corrupted an SSD in another enclosure to the point it is (or at least looks) dead. Some people are reporting that disabling UAS mode just mitigate the issue, but doesn't fix it. I didn't buy the Pi4 to be a beta tester. I need my system to be reliable and I don't want to fry other disks. At the moment, what I ended up doing was turning the Pi off, throwing it in a drawer and connecting the USB enclosure to another PC on which USB 3.0 UAS mode is fast and works like a charm. I don't want to simplify too much, but it's hard not to blame the Pi when the internet is full of people complaining about problematic USB 3.0 connections on the Pi with 90% of the existing USB-SATA bridges that work just fine on other systems. Just Google it, it's overwhelming.
What makes you think the PC is using UAS mode with the drive?

BunchOfAtoms
Posts: 4
Joined: Wed Apr 07, 2021 10: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

Sat Apr 10, 2021 5:12 pm

ejolson wrote:
Sat Apr 10, 2021 3:32 pm
What makes you think the PC is using UAS mode with the drive?
This:

Code: Select all

$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    |__ Port 5: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 4, If 0, Class=Hub, Driver=hub/4p, 5000M
            |__ Port 1: Dev 6, If 0, Class=Mass Storage, Driver=uas, 5000M
            |__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=uas, 5000M
            |__ Port 3: Dev 8, If 0, Class=Mass Storage, Driver=uas, 5000M
            |__ Port 4: Dev 7, If 0, Class=Mass Storage, Driver=uas, 5000M
...

dutchsnowden
Posts: 6
Joined: Sat Feb 27, 2021 5: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

Sun Apr 11, 2021 7:34 am

If I add this with correct PID and VID in cmdline.txt, my pi won't boot anymore. I mounted it in different system to erase it so I can boot again.

:shock:

ejolson
Posts: 9527
Joined: Tue Mar 18, 2014 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

Sun Apr 11, 2021 5:00 pm

BunchOfAtoms wrote:
Sat Apr 10, 2021 5:12 pm
ejolson wrote:
Sat Apr 10, 2021 3:32 pm
What makes you think the PC is using UAS mode with the drive?
This:

Code: Select all

$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    |__ Port 5: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 4, If 0, Class=Hub, Driver=hub/4p, 5000M
            |__ Port 1: Dev 6, If 0, Class=Mass Storage, Driver=uas, 5000M
            |__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=uas, 5000M
            |__ Port 3: Dev 8, If 0, Class=Mass Storage, Driver=uas, 5000M
            |__ Port 4: Dev 7, If 0, Class=Mass Storage, Driver=uas, 5000M
...
That's a good point. It looks like your PC is running a proper Linux operating system. Because of this it does seem surprising the drive doesn't work on the Pi.

Have you done

# apt update; apt full-upgrade

recently? There were some kernels half a year ago which had a bug in the way bounce buffers were allocated for DMA to the USB hardware.

Do you think power consumption could be the problem?

BunchOfAtoms
Posts: 4
Joined: Wed Apr 07, 2021 10: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

Mon Apr 12, 2021 10:43 am

ejolson wrote:
Sun Apr 11, 2021 5:00 pm
Have you done

# apt update; apt full-upgrade

recently? There were some kernels half a year ago which had a bug in the way bounce buffers were allocated for DMA to the USB hardware.

Do you think power consumption could be the problem?
Well, I'm running Manjaro Linux, but it's up-to-date and running the latest available kernel:

Code: Select all

$ uname -a
Linux raspberry 5.10.25-3-MANJARO-ARM #1 SMP PREEMPT Sat Mar 27 11:17:24 CDT 2021 aarch64 GNU/Linux
But, once again, there are dozens of reports of otherwise perfectly working USB-SATA cables/enclosures causing problems on the Pi 4. Considering so many people have the very same issue, I wouldn't say my problems depend on my particular configuration. Sure, it could be, but I'm inclined to think it's Pi's fault or, at least, I can't rule that out. I don't really know where the actual problem lies, maybe a bad firmware implementation on Pi's VL805 USB controller. RPT's engineers should investigate, I can't.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2690
Joined: Thu Jul 11, 2013 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 Apr 13, 2021 10:22 am

BunchOfAtoms wrote:
Wed Apr 07, 2021 11:34 pm
Sideeffect wrote:
Wed Dec 09, 2020 3:49 pm
I am having problem with 4 bay enclosure VIA USB 3.1 GEN 2 adapter. I added quirks

Code: Select all

usb-storage.quirks=2109:0715:u
What kind of problems did you have before adding the quirks setting? I think I have the same enclosure and I'm having these issues on heavy loads:

Code: Select all

[22823.205836] usb 2-2.1: cmd cmplt err -71
[22825.506051] sd 3:0:0:0: [sdd] tag#6 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN 
[22825.506084] sd 3:0:0:0: [sdd] tag#6 CDB: opcode=0xa1 a1 08 2e d1 01 00 4f c2 00 b0 00 00
[22855.009378] sd 3:0:0:0: [sdd] tag#8 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD OUT 
[22855.009414] sd 3:0:0:0: [sdd] tag#8 CDB: opcode=0x8a 8a 00 00 00 00 02 46 07 1f e8 00 00 00 10 00 00
[22855.025082] scsi host3: uas_eh_device_reset_handler start
[22855.026842] usb 2-2.1: Disable of device-initiated U1 failed.
[22855.027494] usb 2-2.1: Disable of device-initiated U2 failed.
[22855.090055] usb 2-2.2: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[22855.437766] usb 2-2.1: reset SuperSpeed Gen 1 USB device number 6 using xhci_hcd
[22855.466673] scsi host3: uas_eh_device_reset_handler success
Can you confirm that adding the quirks setting solved the problem long-term?

Anyway, it seems clear that USB 3.0 support on Pi4 is somehow flawed. Putting the blame on bridge manufacturers looks like a cheap move to me.
This is a data protocol error due to corrupted packets, not necessarily due to UAS protocol breakage. I have a VIA chipset with the same VID:PID and it appears to work fine with UAS on Pi 4.

Please post a full dmesg, lsusb -v and lsusb -t.
Rockets are loud.
https://astro-pi.org

JanuszW
Posts: 1
Joined: Sat Apr 24, 2021 3:10 pm

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

Sat Apr 24, 2021 3:52 pm

For my RPi (4B / 8GB, standardly connected to the X825 with Adata SSD SU800 512GB) I bought a drive with this housing:
https://pl.aliexpress.com/item/1005001747449260.html
https://pl.aliexpress.com/item/1005001747397137.html
When I connect the purchased drive (in the housing) to the computer, e.g. with Win10 - everything looks pretty good.
Operations: reading, writing, formatting etc. work smoothly. Measurement of transfers - they look meaningful.
When I try to boot RPi from this disk (Rasbian 32b, formatted and burned with Imager 1.6.1), the system does not recognize (cannot see the MBR) of the SSD.
Boot failed

It does not matter whether the drive is connected directly or via a USB3 hub. When I put a USB separator between the RPi and the disk - the system also does not boot.
And now a fun fact :D :
when I insert between RPi and the same disk (in the same housing) the USB3 port load meter (volt, ampere, power, etc. picture attached) the system immediately starts up without any problems. :shock:
It's OK?!

I asked the producer. Although I received the reply quickly, it did not solve the problem.
I checked with another RPi4B / 8G. With original power supply. Same effect.
Second RPi - second failed

It does not matter if it is a USB2 or USB3 socket. :geek: Unfortunately, although the ORICO disk "flies" in other systems, RPi does not like it. At least for me. Of course, I will use it, although the plans were different.
After various experiments with booting with the Orico drive turned on via the USB port load meter, I discovered :idea: that the system boots in this configuration, because the drive is detected as ... an SD card! :mrgreen:
SSD disk confirmed as... SDcard ?!

But:
---
pi@*****:~ $ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=uas, 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 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 4: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
pi@*****:~ $ sudo hdparm -tT /dev/sda1

/dev/sda1:
Timing cached reads: 1442 MB in 2.00 seconds = 721.27 MB/sec
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Timing buffered disk reads: 256 MB in 0.99 seconds = 259.82 MB/sec
pi@*****:~ $ sudo hdparm /dev/sda1

/dev/sda1:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
multcount = 0 (off)
readonly = 0 (off)
readahead = 131064 (on)
geometry = 31130/255/63, sectors = 524288, start = 8192
----
Have you come across something like this? Any ideas? I will be grateful for any suggestions or solutions.

karnasw
Posts: 43
Joined: Wed Sep 18, 2019 8:13 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 May 12, 2021 7:33 am

Pentode wrote:
Sun Jan 24, 2021 7:08 pm
Hi all!
The main problem is not in the controller, but in its firmware. Whether it supports these functions or not.
Everything written below was tested on the JMS578 controller.
I designed and made a raspberry pi hat on a 578 controller for m2 ssd, key B.
1. Firmware 00.02.00.04- Hassos 5.9, Raspbian buster - don't work.
2. Firmware 173.01.00.02 Raspbian buster- work, Hassos 5.9 - don't work.
3. Firmware AdataHM800.bin 119.04.00.02 Hassos 5.9, Raspbian buster work fine without edit cmdline.txt.

If in case 1 edit cmdline.txt, Raspbian buster work fine, but i don't test speed.
Edit: I tried many firmwares on the internet for JMS578, none of them work with Pi Buster. Firmware AdataHM800.bin disabling UASP, this is why it "works".

-------------------------------------------------------------------------------
Today I copied my Pi OS from SD to SSD. I have enclosure with firmware 173.01.00.02 on it (today written too), and Raspbian starts but very slow. (so UASP is still broken). Is there any firmware for JMS578 that works fine on Pi4B?

r2d2agr
Posts: 6
Joined: Tue Nov 24, 2020 3:17 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 Jul 02, 2021 7:03 am

i have this issue with my RPi4 8gb, but only in one USB3.0 port, the other USB3.0port works well, i tried the sollution of add the VID:PID on the cmdline.txt and it doesn't work for me.
i have a RPi4 2gb and everything works well with the same ssd/hdd and adapters, also the same SO, i just exchange the disks between the Pi's and in 2gb works and the 8gb work only the half!

i have two adapters (Jmicron and ASMedia) same issue with the two!

if you put an ssd on the bad 3.0port just halfway u can use it like a usb2.0!

ejolson
Posts: 9527
Joined: Tue Mar 18, 2014 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 Jul 02, 2021 2:26 pm

r2d2agr wrote:
Fri Jul 02, 2021 7:03 am
i have this issue with my RPi4 8gb, but only in one USB3.0 port, the other USB3.0port works well, i tried the sollution of add the VID:PID on the cmdline.txt and it doesn't work for me.
i have a RPi4 2gb and everything works well with the same ssd/hdd and adapters, also the same SO, i just exchange the disks between the Pi's and in 2gb works and the 8gb work only the half!

i have two adapters (Jmicron and ASMedia) same issue with the two!

if you put an ssd on the bad 3.0port just halfway u can use it like a usb2.0!
Those sound like defective hardware that needs to be returned. Maybe it's a loose connection on the second USB3 port.

r2d2agr
Posts: 6
Joined: Tue Nov 24, 2020 3:17 pm

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

Sat Jul 03, 2021 8:31 am

ejolson wrote:
r2d2agr wrote:
Fri Jul 02, 2021 7:03 am
i have this issue with my RPi4 8gb, but only in one USB3.0 port, the other USB3.0port works well, i tried the sollution of add the VID:PID on the cmdline.txt and it doesn't work for me.
i have a RPi4 2gb and everything works well with the same ssd/hdd and adapters, also the same SO, i just exchange the disks between the Pi's and in 2gb works and the 8gb work only the half!

i have two adapters (Jmicron and ASMedia) same issue with the two!

if you put an ssd on the bad 3.0port just halfway u can use it like a usb2.0!
Those sound like defective hardware that needs to be returned. Maybe it's a loose connection on the second USB3 port.
Maybe, but de symtoms are the same, just in one port, error with UAS, with any adapter, SSD and HDD.
in that case how can i return a Rpi4 to china? XD i saw this problem too late, because i was using the port as a USB2.0 without knowing!

ejolson
Posts: 9527
Joined: Tue Mar 18, 2014 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

Sat Jul 03, 2021 2:49 pm

r2d2agr wrote:
Sat Jul 03, 2021 8:31 am
ejolson wrote:
r2d2agr wrote:
Fri Jul 02, 2021 7:03 am
i have this issue with my RPi4 8gb, but only in one USB3.0 port, the other USB3.0port works well, i tried the sollution of add the VID:PID on the cmdline.txt and it doesn't work for me.
i have a RPi4 2gb and everything works well with the same ssd/hdd and adapters, also the same SO, i just exchange the disks between the Pi's and in 2gb works and the 8gb work only the half!

i have two adapters (Jmicron and ASMedia) same issue with the two!

if you put an ssd on the bad 3.0port just halfway u can use it like a usb2.0!
Those sound like defective hardware that needs to be returned. Maybe it's a loose connection on the second USB3 port.
Maybe, but de symtoms are the same, just in one port, error with UAS, with any adapter, SSD and HDD.
in that case how can i return a Rpi4 to china? XD i saw this problem too late, because i was using the port as a USB2.0 without knowing!
It's irritating when a fault is discovered after the return-by date. At the beginning of the epidemic I received a 1GB Rock64 single-board computer and a 4GB model in place of the two 4GB systems that I ordered. The package stayed unopened in my office for a year before I discovered the mistake.

If the Pi is too late to return, I'd try reflowing the solder on the connections to the USB socket to see if that helps.

r2d2agr
Posts: 6
Joined: Tue Nov 24, 2020 3:17 pm

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

Sat Jul 03, 2021 4:27 pm

ejolson wrote:
Sat Jul 03, 2021 2:49 pm
r2d2agr wrote:
Sat Jul 03, 2021 8:31 am
ejolson wrote:
Those sound like defective hardware that needs to be returned. Maybe it's a loose connection on the second USB3 port.
Maybe, but de symtoms are the same, just in one port, error with UAS, with any adapter, SSD and HDD.
in that case how can i return a Rpi4 to china? XD i saw this problem too late, because i was using the port as a USB2.0 without knowing!
It's irritating when a fault is discovered after the return-by date. At the beginning of the epidemic I received a 1GB Rock64 single-board computer and a 4GB model in place of the two 4GB systems that I ordered. The package stayed unopened in my office for a year before I discovered the mistake.

If the Pi is too late to return, I'd try reflowing the solder on the connections to the USB socket to see if that helps.
Yes is a shit!
I will try to do the re solder, but as said the errors are the same, the kernel log have exact the message of this topic, but only in one port!
I'm so lucky

ejolson
Posts: 9527
Joined: Tue Mar 18, 2014 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

Sat Jul 03, 2021 4:50 pm

r2d2agr wrote:
Sat Jul 03, 2021 4:27 pm
ejolson wrote:
Sat Jul 03, 2021 2:49 pm
r2d2agr wrote:
Sat Jul 03, 2021 8:31 am


Maybe, but de symtoms are the same, just in one port, error with UAS, with any adapter, SSD and HDD.
in that case how can i return a Rpi4 to china? XD i saw this problem too late, because i was using the port as a USB2.0 without knowing!
It's irritating when a fault is discovered after the return-by date. At the beginning of the epidemic I received a 1GB Rock64 single-board computer and a 4GB model in place of the two 4GB systems that I ordered. The package stayed unopened in my office for a year before I discovered the mistake.

If the Pi is too late to return, I'd try reflowing the solder on the connections to the USB socket to see if that helps.
Yes is a shit!
I will try to do the re solder, but as said the errors are the same, the kernel log have exact the message of this topic, but only in one port!
I'm so lucky
Is it possible the port you think is good is actually the bad one? If it is falling back to USB2 mode the errors will go away.

r2d2agr
Posts: 6
Joined: Tue Nov 24, 2020 3:17 pm

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

Sat Jul 03, 2021 6:01 pm

ejolson wrote:
Sat Jul 03, 2021 4:50 pm
Is it possible the port you think is good is actually the bad one? If it is falling back to USB2 mode the errors will go away.
How can I do that?
How can I definitively prove that the problem is bad hardware or firmware issues? I need to validate this to take some decisions!
Try to repair it or sell it as RPi with issues to buy a new one!

nikal
Posts: 34
Joined: Sat Mar 29, 2014 2:51 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 Jul 08, 2021 4:02 pm

Decided to post here since another post I did got no replies.

Well, I own a pi4/8GB enclosed in a Argon one M.2. The M.2 SATA bridge of Argon case has a ASM225CM onboard which initially I thought it was a 1153 (older versions of M.2 PCB for this case were based on 1153) with the well reported issue with TRIM. I didn't check the chip version (lazy) and proceed with FW update in order to fix TRIM and apparently lost the functionality due to mismatch between FW (for 1153) and onboard chip (225CM). After numerous "experiments" I managed to get back some functionality by desodering SPI flash, programming it with the closest FW I found for the 225CM which was 235CM (there is nowhere in the internet a FW for ASM225CM) and after that I just put SPI FLASH on the PCB pads and fired up the PCB board by plugging in the USB. I suppose the MCU has some kind of internal EEPROM where the FW is copied from the SPI FLASH. Anyway....Now I have a 2235 (ASM235CM) by FW running on a ASM225CM MCU. Windows 10 recognises the SATA Bridge as AS2235.

Now the problem is the following. I connected the M.2 SATA drive in the Argon M.2 SATA bridge and did some speed tests and diagnostics using CrystalDiskInfo and CrystalDiskMark on Windows 10. There, speeds are around 450MB/s R/W and the CrystalDiskInfo says that this disk support TRIM and apparently is on UASP mode. Now moving the SATA M.2 bridge back to the Argon case and booting the Raspberry OS (64Bit) I noticed that the device is recognized as usb-storage and speeds are no more than 210MB/s read and around 180MB/s write. Before the faulty FW update, speeds were at 310MB/s levels R/W. Now I'm wondering, if the problem is with the "wrong" FW running on MCU, shouldn't be the case with Windows 10 too? Could anyone help me on this ? I'm open for ideas and experimentation.

Thanks in advance for your time.
Nikolas

jools72
Posts: 116
Joined: Sun Sep 29, 2019 12:40 pm

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

Sat Aug 07, 2021 6:32 am

I have a pi 4 with two external powered hubs from Orico. Since I got slow r/w speeds even though plugged into the blue usb 3.0 ports, I decided to apply the quirks. I have it like this:

Code: Select all

b-storage.quirks=152d:9561:u console=serial0,115200...
The problem is that this disables uas on both usb ports:

Code: Select all

pi@jovian:~ $ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
    |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 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
pi@jovian:~ $
Is there some way to enable uas on the other port still?

takeshi7
Posts: 1
Joined: Wed Sep 01, 2021 6:11 am

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

Wed Sep 01, 2021 6:19 am

The "solution" in this thread to disable UASP and use USB storage doesn't fix the underlying issue. All of these USB adapters support UASP on desktop Linux and Windows without any issues. There's something specific to the Raspberry Pi 4 hardware/software/firmware that is preventing these drives from working properly. I hope the Raspberry Pi team is able to figure out where the problem lies, because I really want to use an SSD in my pi, but I need UASP for TRIM support.

ejolson
Posts: 9527
Joined: Tue Mar 18, 2014 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

Wed Sep 01, 2021 1:31 pm

takeshi7 wrote:
Wed Sep 01, 2021 6:19 am
The "solution" in this thread to disable UASP and use USB storage doesn't fix the underlying issue. All of these USB adapters support UASP on desktop Linux and Windows without any issues. There's something specific to the Raspberry Pi 4 hardware/software/firmware that is preventing these drives from working properly. I hope the Raspberry Pi team is able to figure out where the problem lies, because I really want to use an SSD in my pi, but I need UASP for TRIM support.
I always thought the UASP difficulties were related to Linux or not. I find it interesting your SATA bridge works fine with desktop Linux but not the Raspberry Pi.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2690
Joined: Thu Jul 11, 2013 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

Fri Sep 03, 2021 8:57 am

takeshi7 wrote:
Wed Sep 01, 2021 6:19 am
The "solution" in this thread to disable UASP and use USB storage doesn't fix the underlying issue. All of these USB adapters support UASP on desktop Linux and Windows without any issues. There's something specific to the Raspberry Pi 4 hardware/software/firmware that is preventing these drives from working properly. I hope the Raspberry Pi team is able to figure out where the problem lies, because I really want to use an SSD in my pi, but I need UASP for TRIM support.
A lot of the interoperability issues we see are due to manufacturers testing on intel/x86 controllers and assuming that other platforms will "just work". There are adapters that work fine with UAS on a Pi 4, I suggest you search for one of those.
Rockets are loud.
https://astro-pi.org

ejolson
Posts: 9527
Joined: Tue Mar 18, 2014 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 Sep 03, 2021 2:42 pm

jdb wrote:
Fri Sep 03, 2021 8:57 am
takeshi7 wrote:
Wed Sep 01, 2021 6:19 am
The "solution" in this thread to disable UASP and use USB storage doesn't fix the underlying issue. All of these USB adapters support UASP on desktop Linux and Windows without any issues. There's something specific to the Raspberry Pi 4 hardware/software/firmware that is preventing these drives from working properly. I hope the Raspberry Pi team is able to figure out where the problem lies, because I really want to use an SSD in my pi, but I need UASP for TRIM support.
A lot of the interoperability issues we see are due to manufacturers testing on intel/x86 controllers and assuming that other platforms will "just work". There are adapters that work fine with UAS on a Pi 4, I suggest you search for one of those.
Since manufacturers of USB to SATA cables may make revisions without changing the model number or physical appearance of the product, it is difficult to know whether newly acquired hardware from a given brand will work.

I think an official sensibly priced USB to SATA cable with optional power supply that doesn't back feed would solve a large number of difficulties people have with their Raspberry Pi computers.

Even if it were coloured white with pink trim, I'd get one and suspect others would happily do the same.

pidd
Posts: 3492
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

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

Sun Sep 05, 2021 5:44 pm

ejolson wrote:
Fri Sep 03, 2021 2:42 pm
I think an official sensibly priced USB to SATA cable with optional power supply that doesn't back feed would solve a large number of difficulties people have with their Raspberry Pi computers.

Even if it were coloured white with pink trim, I'd get one and suspect others would happily do the same.

Totally agree, even main Pi dealers have had problems with the variety of adapters, an official adapter would make a lot of sense. The widespread frustration with adapters that don't work is not doing the Pi's image any good.

Alternatively a Raspberry Pi official certification/approval scheme could achieve the same thing and may be of benefit to other accessories and peripherals as well. the amount of 5V products advertised as Raspberry Pi compatible is beyond a joke.

melqui
Posts: 69
Joined: Fri Jun 19, 2020 8:07 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 Sep 13, 2021 12:28 pm

Here, with:

Updated Raspbian OS 64bits beta

ORICO 2520C3 (JMicron JMS576)
XRAYDISK 128GB SSD

Everything is fast and stable with UAS enabled!
Attachments
Captura de tela 2021-09-13 093431.png
Captura de tela 2021-09-13 093431.png (125.18 KiB) Viewed 5464 times

slifeleaf
Posts: 1
Joined: Tue Sep 21, 2021 2:21 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 Sep 21, 2021 4:06 pm

Even with quirks applied I've got no speed increase. Do you know what else I can investigate?
Btw my usb-sata3 adapter works fine/has acceptable IO speed when connected to a laptop (in a way that I even able to run OS on that external SSD, install and play games without any noticeable slowdowns)

Code: Select all

/mnt/C82263AA22639BE6$ dd if=/dev/zero of=./.bench bs=20M count=5 && dd if=./.bench of=/dev/zero bs=20M count=5
5+0 records in
5+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 11.9891 s, 8.7 MB/s
5+0 records in
5+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 0.806976 s, 130 MB/s

Code: Select all

dmesg | grep usb-storage
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:2C:A9:65 vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000  usb-storage.quirks=174c:55aa:u console=tty1 root=PARTUUID=907af7d0-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet net.ifnames=0
[    0.664902] usbcore: registered new interface driver usb-storage
[    0.878564] usb-storage 2-1:1.0: USB Mass Storage device detected
[    0.879726] usb-storage 2-1:1.0: Quirks match for vid 174c pid 55aa: c00000
[    0.880078] scsi host0: usb-storage 2-1:1.0
Last edited by slifeleaf on Tue Sep 21, 2021 5:04 pm, edited 2 times in total.

Return to “Troubleshooting”