USB 3.0 pendrive

I am getting maximum of 32MB/s write speed on a USB 3.0 pendrive on Rock Pi 4 B. This pendrive gets on PC more write speed, up to 80MB/s. What should I do to make it work faster attached to Rock Pi 4 B?

Tried both “device” and “host” modes, no luck.

It seems the USB device is detected as USB 2.0 mode. You can try the lower USB3 port. Also, paste some dmesg log also helps.

Yes, I was using lower (closer to the board) port. And the same is when I boot up the Pi with pendrive inserted.

Dmesg:

[ 2.379127] ehci-platform fe380000.usb: EHCI Host Controller
[ 2.379893] ehci-platform fe380000.usb: new USB bus registered, assigned bus number 1
[ 2.380725] ehci-platform fe380000.usb: irq 28, io mem 0xfe380000
[ 2.390467] ehci-platform fe380000.usb: USB 2.0 started, EHCI 1.00
[ 2.391243] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.391851] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.392492] usb usb1: Product: EHCI Host Controller
[ 2.392926] usb usb1: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 ehci_hcd
[ 2.393577] usb usb1: SerialNumber: fe380000.usb

[ 4.402594] usb 5-1: new high-speed USB device number 2 using xhci-hcd
[ 5.238664] usb 6-1: new SuperSpeed USB device number 2 using xhci-hcd
[ 5.264409] usb 6-1: New USB device found, idVendor=13fe, idProduct=5500
[ 5.265047] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5.265742] usb 6-1: Product: GOODRAM 64GB
[ 5.266122] usb 6-1: Manufacturer: Wilk

[ 7.833515] usb-storage 6-1:1.0: USB Mass Storage device detected
[ 7.834094] scsi host0: usb-storage 6-1:1.0
[ 7.834412] usbcore: registered new interface driver usb-storage
[ 7.867510] usbcore: registered new interface driver uas

[ 10.115823] sd 0:0:0:0: [sda] 123469824 512-byte logical blocks: (63.2 GB/58.9 GiB)
[ 10.117097] sd 0:0:0:0: [sda] Write Protect is off
[ 10.117126] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
[ 10.118343] sd 0:0:0:0: [sda] No Caching mode page found
[ 10.119003] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 10.128169] sda: sda1
[ 10.134080] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 16.879044] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

Grep dmesg by “sd” and “usb”:

[ 1.526908] usbcore: registered new interface driver usbfs
[ 1.527434] usbcore: registered new interface driver hub
[ 1.527976] usbcore: registered new device driver usb
[ 1.655347] phy phy-ff770000.syscon:usb2-phy@e450.0: Looking up phy-supply from device tree
[ 1.655451] vcc5v0_host: could not add device link phy-ff770000.syscon:usb2-phy@e450.0 err -2
[ 1.655756] phy phy-ff770000.syscon:usb2-phy@e450.1: Looking up phy-supply from device tree
[ 1.655768] phy phy-ff770000.syscon:usb2-phy@e450.1: Looking up phy-supply property in node /syscon@ff770000/usb2-phy@e450/otg-port failed
[ 1.655987] phy phy-ff770000.syscon:usb2-phy@e450.1: Looking up vbus-supply from device tree
[ 1.655998] phy phy-ff770000.syscon:usb2-phy@e450.1: Looking up vbus-supply property in node /syscon@ff770000/usb2-phy@e450/otg-port failed
[ 1.656010] phy phy-ff770000.syscon:usb2-phy@e450.1: Failed to get VBUS supply regulator
[ 1.657445] phy phy-ff770000.syscon:usb2-phy@e460.2: Looking up phy-supply from device tree
[ 1.657496] vcc5v0_host: could not add device link phy-ff770000.syscon:usb2-phy@e460.2 err -2
[ 1.657767] phy phy-ff770000.syscon:usb2-phy@e460.3: Looking up phy-supply from device tree
[ 1.657778] phy phy-ff770000.syscon:usb2-phy@e460.3: Looking up phy-supply property in node /syscon@ff770000/usb2-phy@e460/otg-port failed
[ 1.657991] phy phy-ff770000.syscon:usb2-phy@e460.3: Looking up vbus-supply from device tree
[ 1.658002] phy phy-ff770000.syscon:usb2-phy@e460.3: Looking up vbus-supply property in node /syscon@ff770000/usb2-phy@e460/otg-port failed
[ 1.658014] phy phy-ff770000.syscon:usb2-phy@e460.3: Failed to get VBUS supply regulator
[ 1.660823] phy phy-ff7c0000.phy.6: Looking up phy-supply property in node /phy@ff7c0000/usb3-port failed
[ 1.661350] phy phy-ff800000.phy.8: Looking up phy-supply property in node /phy@ff800000/usb3-port failed
[ 2.357120] usbcore: registered new interface driver cdc_ether
[ 2.357685] usbcore: registered new interface driver rndis_host
[ 2.364994] rockchip-dwc3 usb0: fail to get drvdata hcd
[ 2.371636] rockchip-dwc3 usb1: fail to get drvdata hcd
[ 2.379127] ehci-platform fe380000.usb: EHCI Host Controller
[ 2.379893] ehci-platform fe380000.usb: new USB bus registered, assigned bus number 1
[ 2.380725] ehci-platform fe380000.usb: irq 28, io mem 0xfe380000
[ 2.390467] ehci-platform fe380000.usb: USB 2.0 started, EHCI 1.00
[ 2.391243] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.391851] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.392492] usb usb1: Product: EHCI Host Controller
[ 2.392926] usb usb1: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 ehci_hcd
[ 2.393577] usb usb1: SerialNumber: fe380000.usb
[ 2.399542] ehci-platform fe3c0000.usb: EHCI Host Controller
[ 2.400281] ehci-platform fe3c0000.usb: new USB bus registered, assigned bus number 2
[ 2.401098] ehci-platform fe3c0000.usb: irq 30, io mem 0xfe3c0000
[ 2.410481] ehci-platform fe3c0000.usb: USB 2.0 started, EHCI 1.00
[ 2.411224] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.411832] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.412472] usb usb2: Product: EHCI Host Controller
[ 2.412907] usb usb2: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 ehci_hcd
[ 2.413558] usb usb2: SerialNumber: fe3c0000.usb
[ 2.417532] ohci-platform fe3a0000.usb: Generic Platform OHCI controller
[ 2.418373] ohci-platform fe3a0000.usb: new USB bus registered, assigned bus number 3
[ 2.419199] ohci-platform fe3a0000.usb: irq 29, io mem 0xfe3a0000
[ 2.478655] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
[ 2.479263] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.479903] usb usb3: Product: Generic Platform OHCI controller
[ 2.480430] usb usb3: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 ohci_hcd
[ 2.481081] usb usb3: SerialNumber: fe3a0000.usb
[ 2.483585] ohci-platform fe3e0000.usb: Generic Platform OHCI controller
[ 2.484424] ohci-platform fe3e0000.usb: new USB bus registered, assigned bus number 4
[ 2.485226] ohci-platform fe3e0000.usb: irq 31, io mem 0xfe3e0000
[ 2.542638] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[ 2.543246] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.543887] usb usb4: Product: Generic Platform OHCI controller
[ 2.544413] usb usb4: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 ohci_hcd
[ 2.545064] usb usb4: SerialNumber: fe3e0000.usb
[ 2.548887] usbcore: registered new interface driver iforce
[ 2.549455] usbcore: registered new interface driver xpad
[ 2.550487] usbcore: registered new interface driver usbtouchscreen
[ 3.188740] usbcore: registered new interface driver uvcvideo
[ 3.199895] usbcore: registered new interface driver bfusb
[ 3.200454] usbcore: registered new interface driver btusb
[ 3.309929] usbcore: registered new interface driver usbhid
[ 3.310452] usbhid: USB HID core driver
[ 3.315479] usbcore: registered new interface driver snd-usb-audio
[ 4.043612] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.044214] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.044849] usb usb5: Product: xHCI Host Controller
[ 4.045279] usb usb5: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.045925] usb usb5: SerialNumber: xhci-hcd.8.auto
[ 4.049346] usb usb6: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 4.050147] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003
[ 4.050766] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.051401] usb usb6: Product: xHCI Host Controller
[ 4.051831] usb usb6: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.052477] usb usb6: SerialNumber: xhci-hcd.8.auto
[ 4.055961] usb usb6: USB disconnect, device number 1
[ 4.078133] usb usb5: USB disconnect, device number 1
[ 4.088391] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.089000] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.089641] usb usb5: Product: xHCI Host Controller
[ 4.090089] usb usb5: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.090768] usb usb5: SerialNumber: xhci-hcd.9.auto
[ 4.094974] usb usb7: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.094979] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.094982] usb usb7: Product: xHCI Host Controller
[ 4.094986] usb usb7: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.094990] usb usb7: SerialNumber: xhci-hcd.8.auto
[ 4.096059] usb usb8: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 4.096155] usb usb8: New USB device found, idVendor=1d6b, idProduct=0003
[ 4.096159] usb usb8: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.096163] usb usb8: Product: xHCI Host Controller
[ 4.096166] usb usb8: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.096170] usb usb8: SerialNumber: xhci-hcd.8.auto
[ 4.096864] rockchip-dwc3 usb0: USB HOST connected
[ 4.106667] usb usb6: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 4.107568] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003
[ 4.108175] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.108815] usb usb6: Product: xHCI Host Controller
[ 4.109262] usb usb6: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.109912] usb usb6: SerialNumber: xhci-hcd.9.auto
[ 4.402594] usb 5-1: new high-speed USB device number 2 using xhci-hcd
[ 5.238664] usb 6-1: new SuperSpeed USB device number 2 using xhci-hcd
[ 5.264409] usb 6-1: New USB device found, idVendor=13fe, idProduct=5500
[ 5.265047] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5.265742] usb 6-1: Product: GOODRAM 64GB
[ 5.266122] usb 6-1: Manufacturer: Wilk
[ 7.833515] usb-storage 6-1:1.0: USB Mass Storage device detected
[ 7.834094] scsi host0: usb-storage 6-1:1.0
[ 7.834412] usbcore: registered new interface driver usb-storage
[ 7.867510] usbcore: registered new interface driver uas
[ 10.115823] sd 0:0:0:0: [sda] 123469824 512-byte logical blocks: (63.2 GB/58.9 GiB)
[ 10.117097] sd 0:0:0:0: [sda] Write Protect is off
[ 10.117126] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
[ 10.118343] sd 0:0:0:0: [sda] No Caching mode page found
[ 10.119003] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 10.128169] sda: sda1
[ 10.134080] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 16.879044] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

Anyone?

Getting anywhere on this? I’ve got an external usb 3.0 hard drive and my transfer speeds are only 25MB/sec. (About 50MB/sec reading)

@jack any update on that?

What do you get from ‘lsusb -t’? With my hard drive connected, I show 5000, so I’d expect it to run at 3.0 speeds, but it doesn’t want to.

I’ve tried other pendrive and results are the same - no more than 30MB/s. The first one was GoodRam 64GB, second one was SanDisk Extreme Go USB 3.1 64GB.

@ditchmag I also have 5000 but pendrive acts as USB 2.0. Output below:

/: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M

Add to this list Transcend JetFlash 820G USB 3.0 and sata-usb3.0 reader AgeStar 3UBT2-silver. In lsusb -t they detected with 5000M, but speed is only 29-31 Mbit/s

And is everyone using Ubuntu server, or have they tried another OS with the same result? I’ve only used Ubuntu server so far. Really was looking forward to the usb 3.0 speed as my main use was for samaba server/OwnCloud server.

Edit:
As a comparison, I did a large file transfer with the usb drive connected to a windows machine and was able to to get 120MB/sec transfer speeds. This is on an x4 USB HDD enclosure, so I was reading from a 2tb drive and writing to a 3tb all over that one USB connection. I have a SanDisk extreme 3.0 pendrive I’ll test speeds on the rockpi4 next.

I tried only Ubuntu Server, since Debian is only Stretch (so it’s doesn’t have necessary libs versions that i need)

Ok, I connected my Sandisk extreme 3.0 32gb usb drive and mounted it using this command:

sudo mount -t vfat /dev/sde1 /mnt/32ex -o uid=1000,gid=1000,utf8,dmask=027,fmask=137

I then opened an ssh -X session and ran:

sudo nautilus

I then copied a large file from an ext4 formatted partition (mounted inside my USB hard drive enclosure) and pasted it on the Sandisk Extreme 3.0 usb pendrive. It was writing at about 100MB/sec! But then the system crashed for some reason before finishing, so I’m going to try again.
ntfs-3g is part of my problem with the ntfs formatted drives, but I expected the ext4 drives to be faster. At least vfat seems to work in this case, and obviously the read speed from the ext4 partition was reaching 100MB/sec as well.

EDIT:
Repeating the above steps it was successful moving a 2.7GB test file from the ext4 partition to the pendrive and maintained about 100MB/sec transfer rate. I then copied the test file from the pen drive to a sub-folder on the same drive and it transferred at a speed of only 35-40MB/sec.

EDIT:
Further testing:
I copied the test file from the Sandisk Extreme usb drive to the ext4 drive inside the USB hard drive enclosure and saw transfer speeds of about 55MB/sec.
Taking the same test file and copying from the ext4 hard drive to a subfolder on the same drive saw transfer speeds of 35-38MB/sec.

This command does not give any special abilities to the kernel to achieve such speed. There must be other reason why you managed to speed up the copying process. Maybe cache was used in your tests or Linux GUI has given some advanced control over the buses.

For me it should work out-of-the-box in console mode.

Yes, I don’t know how it achieved it, but it shows it is possible. Interesting that it only transferred at those speeds under very certain conditions. Copying a file to and from the same drive still had abysmal speeds. I would really like to figure this issue out since it won’t work for me as a file server with the speed so slow.

I ran ‘sudo dmsg |grep usb’ and here is the output if this helps. It is showing xhci_hcd, so I think it should be ok there too, but maybe there is something else in there I’m not aware of:

rock@RockSvr:/var/log$ sudo dmesg |grep usb
[ 1.526977] usbcore: registered new interface driver usbfs
[ 1.527503] usbcore: registered new interface driver hub
[ 1.528043] usbcore: registered new device driver usb
[ 1.654320] phy phy-ff770000.syscon:usb2-phy@e450.0: Looking up phy-supply from device tree
[ 1.654424] vcc5v0_host: could not add device link phy-ff770000.syscon:usb2-phy@e450.0 err -2
[ 1.654785] phy phy-ff770000.syscon:usb2-phy@e450.1: Looking up phy-supply from device tree
[ 1.654797] phy phy-ff770000.syscon:usb2-phy@e450.1: Looking up phy-supply property in node /syscon@ff770000/usb2-phy@e450/otg-port failed
[ 1.655021] phy phy-ff770000.syscon:usb2-phy@e450.1: Looking up vbus-supply from device tree
[ 1.655032] phy phy-ff770000.syscon:usb2-phy@e450.1: Looking up vbus-supply property in node /syscon@ff770000/usb2-phy@e450/otg-port failed
[ 1.655045] phy phy-ff770000.syscon:usb2-phy@e450.1: Failed to get VBUS supply regulator
[ 1.656487] phy phy-ff770000.syscon:usb2-phy@e460.2: Looking up phy-supply from device tree
[ 1.656543] vcc5v0_host: could not add device link phy-ff770000.syscon:usb2-phy@e460.2 err -2
[ 1.656803] phy phy-ff770000.syscon:usb2-phy@e460.3: Looking up phy-supply from device tree
[ 1.656814] phy phy-ff770000.syscon:usb2-phy@e460.3: Looking up phy-supply property in node /syscon@ff770000/usb2-phy@e460/otg-port failed
[ 1.657028] phy phy-ff770000.syscon:usb2-phy@e460.3: Looking up vbus-supply from device tree
[ 1.657039] phy phy-ff770000.syscon:usb2-phy@e460.3: Looking up vbus-supply property in node /syscon@ff770000/usb2-phy@e460/otg-port failed
[ 1.657051] phy phy-ff770000.syscon:usb2-phy@e460.3: Failed to get VBUS supply regulator
[ 1.659876] phy phy-ff7c0000.phy.6: Looking up phy-supply property in node /phy@ff7c0000/usb3-port failed
[ 1.660400] phy phy-ff800000.phy.8: Looking up phy-supply property in node /phy@ff800000/usb3-port failed
[ 2.357150] usbcore: registered new interface driver cdc_ether
[ 2.357715] usbcore: registered new interface driver rndis_host
[ 2.364579] rockchip-dwc3 usb0: fail to get drvdata hcd
[ 2.370382] rockchip-dwc3 usb1: fail to get drvdata hcd
[ 2.377131] ehci-platform fe380000.usb: EHCI Host Controller
[ 2.377788] ehci-platform fe380000.usb: new USB bus registered, assigned bus number 1
[ 2.378732] ehci-platform fe380000.usb: irq 28, io mem 0xfe380000
[ 2.390599] ehci-platform fe380000.usb: USB 2.0 started, EHCI 1.00
[ 2.391469] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.392077] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.392717] usb usb1: Product: EHCI Host Controller
[ 2.393152] usb usb1: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 ehci_hcd
[ 2.393803] usb usb1: SerialNumber: fe380000.usb
[ 2.399803] ehci-platform fe3c0000.usb: EHCI Host Controller
[ 2.400465] ehci-platform fe3c0000.usb: new USB bus registered, assigned bus number 2
[ 2.401238] ehci-platform fe3c0000.usb: irq 30, io mem 0xfe3c0000
[ 2.410575] ehci-platform fe3c0000.usb: USB 2.0 started, EHCI 1.00
[ 2.411272] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.411871] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.412513] usb usb2: Product: EHCI Host Controller
[ 2.412947] usb usb2: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 ehci_hcd
[ 2.413588] usb usb2: SerialNumber: fe3c0000.usb
[ 2.417049] ohci-platform fe3a0000.usb: Generic Platform OHCI controller
[ 2.417800] ohci-platform fe3a0000.usb: new USB bus registered, assigned bus number 3
[ 2.418594] ohci-platform fe3a0000.usb: irq 29, io mem 0xfe3a0000
[ 2.478708] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
[ 2.479307] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.479938] usb usb3: Product: Generic Platform OHCI controller
[ 2.480465] usb usb3: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 ohci_hcd
[ 2.481107] usb usb3: SerialNumber: fe3a0000.usb
[ 2.483557] ohci-platform fe3e0000.usb: Generic Platform OHCI controller
[ 2.484407] ohci-platform fe3e0000.usb: new USB bus registered, assigned bus number 4
[ 2.485222] ohci-platform fe3e0000.usb: irq 31, io mem 0xfe3e0000
[ 2.542760] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[ 2.543369] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.544009] usb usb4: Product: Generic Platform OHCI controller
[ 2.544536] usb usb4: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 ohci_hcd
[ 2.545187] usb usb4: SerialNumber: fe3e0000.usb
[ 2.549076] usbcore: registered new interface driver iforce
[ 2.549643] usbcore: registered new interface driver xpad
[ 2.550605] usbcore: registered new interface driver usbtouchscreen
[ 3.188839] usbcore: registered new interface driver uvcvideo
[ 3.199989] usbcore: registered new interface driver bfusb
[ 3.200553] usbcore: registered new interface driver btusb
[ 3.306801] usbcore: registered new interface driver usbhid
[ 3.307294] usbhid: USB HID core driver
[ 3.314649] usbcore: registered new interface driver snd-usb-audio
[ 4.078383] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.079042] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.079688] usb usb5: Product: xHCI Host Controller
[ 4.080133] usb usb5: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.080793] usb usb5: SerialNumber: xhci-hcd.8.auto
[ 4.084246] usb usb6: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 4.085064] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003
[ 4.085668] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.086306] usb usb6: Product: xHCI Host Controller
[ 4.086762] usb usb6: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.087410] usb usb6: SerialNumber: xhci-hcd.8.auto
[ 4.091163] usb usb6: USB disconnect, device number 1
[ 4.113355] usb usb5: USB disconnect, device number 1
[ 4.122888] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.123490] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.124125] usb usb5: Product: xHCI Host Controller
[ 4.124555] usb usb5: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.125201] usb usb5: SerialNumber: xhci-hcd.9.auto
[ 4.128503] usb usb6: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 4.129323] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003
[ 4.129934] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.130603] usb usb6: Product: xHCI Host Controller
[ 4.131033] usb usb6: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.131679] usb usb6: SerialNumber: xhci-hcd.9.auto
[ 4.136427] usb usb7: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.137029] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.137663] usb usb7: Product: xHCI Host Controller
[ 4.138094] usb usb7: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.138759] usb usb7: SerialNumber: xhci-hcd.8.auto
[ 4.141861] usb usb8: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 4.142711] usb usb8: New USB device found, idVendor=1d6b, idProduct=0003
[ 4.143313] usb usb8: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.143948] usb usb8: Product: xHCI Host Controller
[ 4.144378] usb usb8: Manufacturer: Linux 4.4.154-59-rockchip-g5e70f14 xhci-hcd
[ 4.145032] usb usb8: SerialNumber: xhci-hcd.8.auto
[ 4.152902] rockchip-dwc3 usb0: USB HOST connected
[ 21.275075] usb 6-1: new SuperSpeed USB device number 2 using xhci-hcd
[ 21.292838] usb 6-1: New USB device found, idVendor=152d, idProduct=0567
[ 21.292872] usb 6-1: New USB device strings: Mfr=10, Product=11, SerialNumber=5
[ 21.292894] usb 6-1: Product: USB to ATA/ATAPI Bridge
[ 21.292914] usb 6-1: Manufacturer: JMicron
[ 21.292934] usb 6-1: SerialNumber: 152D00539000
[ 21.445850] usb-storage 6-1:1.0: USB Mass Storage device detected
[ 21.446708] usb-storage 6-1:1.0: Quirks match for vid 152d pid 0567: 5000000
[ 21.446938] scsi host0: usb-storage 6-1:1.0
[ 21.447659] usbcore: registered new interface driver usb-storage
[ 21.452927] usbcore: registered new interface driver uas
rock@RockSvr:/var/log$

Here is the output of ‘sudo lsusb -t’:

rock@RockSvr:/var/log$ sudo lsusb -t
/: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M

Here are some interesting result running hdparm. This was run on my 2tb ext4 formatted partition inside my 4 bay usb 3.0 enclosure:

rock@RockSvr:/mnt/3tb/UbuntuBackupConfigs$ sudo hdparm -t /dev/sdb2
/dev/sdb2:
Timing buffered disk reads: 236 MB in 3.01 seconds = 78.36 MB/sec
rock@RockSvr:/mnt/3tb/UbuntuBackupConfigs$ sudo hdparm -t /dev/sdb2
/dev/sdb2:
Timing buffered disk reads: 256 MB in 3.01 seconds = 84.98 MB/sec
rock@RockSvr:/mnt/3tb/UbuntuBackupConfigs$ sudo hdparm -t /dev/sdb2
/dev/sdb2:
Timing buffered disk reads: 306 MB in 3.02 seconds = 101.47 MB/sec
rock@RockSvr:/mnt/3tb/UbuntuBackupConfigs$ sudo hdparm -t /dev/sdb2
/dev/sdb2:
Timing buffered disk reads: 246 MB in 3.02 seconds = 81.47 MB/sec

Additional runs on a 320GB drive and 250GB drive inside the same enclousure:

rock@RockSvr:/mnt/3tb/UbuntuBackupConfigs$ sudo hdparm -t /dev/sdc1
/dev/sdc1:
Timing buffered disk reads: 296 MB in 3.01 seconds = 98.41 MB/sec
rock@RockSvr:/mnt/3tb/UbuntuBackupConfigs$ sudo hdparm -t /dev/sdc1
/dev/sdc1:
Timing buffered disk reads: 302 MB in 3.01 seconds = 100.44 MB/sec
rock@RockSvr:/mnt/3tb/UbuntuBackupConfigs$ sudo hdparm -t /dev/sdd1
/dev/sdd1:
Timing buffered disk reads: 272 MB in 3.02 seconds = 90.10 MB/sec
rock@RockSvr:/mnt/3tb/UbuntuBackupConfigs$ sudo hdparm -t /dev/sdd1
/dev/sdd1:
Timing buffered disk reads: 246 MB in 3.02 seconds = 81.55 MB/sec

However, actually copying any files and doing anything real results in terrible speeds.

EDIT:
Additional testing using dd:

rock@RockSvr:~$ sudo sync; sudo dd if=/dev/zero of=/mnt/2tb/tempfile bs=1M count=1024;sudo sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 9.89387 s, 109 MB/s
rock@RockSvr:~$

EDIT:
Another test. I created an image of my 320gb drive and stored it on my 2tb. The speed was slow.

rock@RockSvr:/mnt/2tb$ sudo dd if=/dev/sdc of=/mnt/2tb/320.img
625142448+0 records in
625142448+0 records out
320072933376 bytes (320 GB, 298 GiB) copied, 6430.96 s, 49.8 MB/s
rock@RockSvr:/mnt/2tb$

Can anyone at radxa shed some light on all this?

SSD: Samsung T5 512G
Cable: USB 3.0 type A to type C cable 1m long
Port: lower USB 3.0 port of ROCK Pi 4.
File system: ext4
Firmware: Ubuntu minimal 18.04, updated the kernel to 4.4.154-72-rockchip-g6520deb

root@localhost:/mnt# dd if=/dev/zero of=./z.img bs=1G count=2 oflag=direct
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 6.99098 s, 307 MB/s
root@localhost:/mnt# sync
root@localhost:/mnt# dd if=/dev/zero of=./z.img bs=1G count=2 oflag=direct
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 6.55475 s, 328 MB/s
root@localhost:/mnt# dd if=/dev/zero of=./z.img bs=1G count=2 oflag=direct
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 7.2934 s, 294 MB/s
root@localhost:/mnt# dd if=/dev/zero of=./z.img bs=1G count=2 oflag=direct
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 7.13251 s, 301 MB/s
root@localhost:/mnt# dd if=/dev/zero of=./z.img bs=1G count=2 oflag=direct
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 6.30066 s, 341 MB/s
root@localhost:/mnt# uname -r
4.4.154-72-rockchip-g6520deb

root@localhost:~# hdparm -t /dev/sda1

/dev/sda1:
Timing buffered disk reads: 860 MB in 3.00 seconds = 286.64 MB/sec
root@localhost:~# hdparm -t /dev/sda1

/dev/sda1:
Timing buffered disk reads: 874 MB in 3.00 seconds = 291.16 MB/sec
root@localhost:~# hdparm -t /dev/sda1

/dev/sda1:
Timing buffered disk reads: 982 MB in 3.01 seconds = 326.69 MB/sec
root@localhost:~# hdparm -t /dev/sda1

/dev/sda1:
Timing buffered disk reads: 950 MB in 3.00 seconds = 316.58 MB/sec
root@localhost:~# hdparm -t /dev/sda1

/dev/sda1:
Timing buffered disk reads: 904 MB in 3.00 seconds = 301.08 MB/sec

1 Like

Do you know the usb chip of your drive? I think it’s some model from Jmicron? Does it support UAS?

I just noticed that UAS module should be automatically loaded. If not, please run:

sudo modprobe uas

and make sure lsmod shows it.

Here is my output of lsusb -v that pertains to the enclosure. It looks like a JMS567. I was able to reach decent speeds using dd as well. Could you try transferring a large file on your device using ‘rsync – progress’? I’m curious what a real world transfer speed would be for you. I had the same result with slow speeds when connecting my SanDisk extreme 3.0 is drive. This model:
SanDisk Extreme 32 GB USB 3.0 Flash Drive SDCZ80-032G-X46 https://www.amazon.com/dp/B007YXA5TC/ref=cm_sw_r_cp_apa_i_sKBqCbEGASYAX

Bus 008 Device 002: ID 152d:0567 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 9
idVendor 0x152d JMicron Technology Corp. / JMicron USA Technology Corp.
idProduct 0x0567 JMS567 SATA 6Gb/s bridge
bcdDevice 2.05
iManufacturer 10 JMicron
iProduct 11 USB to ATA/ATAPI Bridge
iSerial 5 152D00539000
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 44
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 22
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
Link Power Management (LPM) Supported
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 1
Lowest fully-functional device speed is Full Speed (12Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 2047 micro seconds
Device Status: 0x0001
Self Powered

Here is my output from that:
rock@RockSvr:~$ sudo modprobe uas
[sudo] password for rock:
rock@RockSvr:~$ lsmod
Module Size Used by
uas 20480 0
usb_storage 61440 5 uas
ip_tables 24576 0
x_tables 32768 1 ip_tables
autofs4 40960 2
rock@RockSvr:~$