Teach me to fish, please: USB 3.0 seems unstable, what's next?

Forward:
I am trying to use the Radxa zero as a NAS sever. I have a Mediasonic ProBox HF2-SU3S2 JBOD enclosure (amazon product link, sorry). I have tried the official Ubuntu and Debian for the Zero, as well as the Manjaro release, and run into the same problem. I’m now running Armbian, and I’ll probably stick with it since it’s polished.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

I have a whole slew of USB-C to USB-A hubs, some are recognized at USB 3.x hubs, but most of them look like this:

$ lsusb -tvv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /sys/bus/usb/devices/usb2  /dev/bus/usb/002/001
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    /sys/bus/usb/devices/usb1  /dev/bus/usb/001/001
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 2109:2817 VIA Labs, Inc. 
        /sys/bus/usb/devices/1-1  /dev/bus/usb/001/002
        |__ Port 1: Dev 6, If 0, Class=Mass Storage, Driver=usb-storage, 480M
            ID 152d:0551 JMicron Technology Corp. / JMicron USA Technology Corp. JMS551 SuperSpeed two ports SATA 3Gb/s bridge
            /sys/bus/usb/devices/1-1.1  /dev/bus/usb/001/006
        |__ Port 2: Dev 3, If 0, Class=Vendor Specific Class, Driver=ax88179_178a, 480M
            ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
            /sys/bus/usb/devices/1-1.2  /dev/bus/usb/001/003
        |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
            ID 2109:2817 VIA Labs, Inc. 
            /sys/bus/usb/devices/1-1.4  /dev/bus/usb/001/004
            |__ Port 3: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
                ID 1f75:0621 Innostor Technology Corporation IS621 SATA Storage Controller
                /sys/bus/usb/devices/1-1.4.3  /dev/bus/usb/001/005

…notice that in this current configuration I have a “SuperSpeed” (USB 3.x, 5000Mbp/s) devices working at “HighSpeed” (USB 2.0, 480Mbp/s) throughput.

The problem:

If I use a USB-C to USB-A 3.<x> Gen <y> HUB that registers everything at USB3.x speeds (5000 Mbps), sustained throughput (Network or drive activity for longer than a couple minutes) causes a “reset SuperSpeed Gen 1 USB device number <n>” to show up in my journalctl logs where <n> is the device number of the device that’s seeing sustained high throughput. When this happens everything attached to the hub becomes “unresponsive” (keyboards and mice don’t work, attached drives drop to “bytes per second” throughput)

If I use a hub like the one above (an Amazon Basics USB3.1 compatible hub) everything remains rock-solid-stable, albeit incredibly slow. Looking at the boot logs, I’m not sure there’s much to go on:

$ journalctl --boot 91b479232a8b4878bfcf8461f5641f98 | grep -i usb
Apr 09 16:48:29 archive kernel: Kernel command line: root=UUID=8743b309-dd36-4e7c-8e43-5b302f811ec5 rootwait rootfstype=ext4 console=ttyAML0,115200 console=tty1 consoleblank=0 coherent_pool=2M loglevel=1 ubootpart=11069eec-01 libata.force=noncq usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   cgroup_enable=memory swapaccount=1
Apr 09 16:48:29 archive kernel: usbcore: registered new interface driver usbfs
Apr 09 16:48:29 archive kernel: usbcore: registered new interface driver hub
Apr 09 16:48:29 archive kernel: usbcore: registered new device driver usb
Apr 09 16:48:29 archive kernel: ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Apr 09 16:48:29 archive kernel: ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
Apr 09 16:48:29 archive kernel: usbcore: registered new interface driver usb-storage
Apr 09 16:48:29 archive kernel: usbcore: registered new interface driver usbhid
Apr 09 16:48:29 archive kernel: usbhid: USB HID core driver
Apr 09 16:48:29 archive kernel: dwc3-meson-g12a ffe09000.usb: USB2 ports: 2
Apr 09 16:48:29 archive kernel: dwc3-meson-g12a ffe09000.usb: USB3 ports: 1
Apr 09 16:48:29 archive kernel: dwc2 ff400000.usb: supply vusb_d not found, using dummy regulator
Apr 09 16:48:29 archive kernel: dwc2 ff400000.usb: supply vusb_a not found, using dummy regulator
Apr 09 16:48:29 archive kernel: dwc2 ff400000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
Apr 09 16:48:29 archive kernel: xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 1
Apr 09 16:48:29 archive kernel: usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
Apr 09 16:48:29 archive kernel: usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Apr 09 16:48:29 archive kernel: usb usb1: Product: xHCI Host Controller
Apr 09 16:48:29 archive kernel: usb usb1: Manufacturer: Linux 5.10.109-meson64 xhci-hcd
Apr 09 16:48:29 archive kernel: usb usb1: SerialNumber: xhci-hcd.2.auto
Apr 09 16:48:29 archive kernel: hub 1-0:1.0: USB hub found
Apr 09 16:48:29 archive kernel: xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 2
Apr 09 16:48:29 archive kernel: xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0 SuperSpeed
Apr 09 16:48:29 archive kernel: usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
Apr 09 16:48:29 archive kernel: usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
Apr 09 16:48:29 archive kernel: usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Apr 09 16:48:29 archive kernel: usb usb2: Product: xHCI Host Controller
Apr 09 16:48:29 archive kernel: usb usb2: Manufacturer: Linux 5.10.109-meson64 xhci-hcd
Apr 09 16:48:29 archive kernel: usb usb2: SerialNumber: xhci-hcd.2.auto
Apr 09 16:48:29 archive kernel: hub 2-0:1.0: USB hub found
Apr 09 16:48:29 archive kernel: usb 1-1: new high-speed USB device number 2 using xhci-hcd
Apr 09 16:48:29 archive kernel: usb 1-1: New USB device found, idVendor=2109, idProduct=2817, bcdDevice= 3.64
Apr 09 16:48:29 archive kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Apr 09 16:48:29 archive kernel: usb 1-1: Product: USB2.0 Hub             
Apr 09 16:48:29 archive kernel: usb 1-1: Manufacturer: VIA Labs, Inc.         
Apr 09 16:48:29 archive kernel: hub 1-1:1.0: USB hub found
Apr 09 16:48:29 archive kernel: usb 1-1.2: new high-speed USB device number 3 using xhci-hcd
Apr 09 16:48:29 archive kernel: usb 1-1.2: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 1.00
Apr 09 16:48:29 archive kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 09 16:48:29 archive kernel: usb 1-1.2: Product: AX88179
Apr 09 16:48:29 archive kernel: usb 1-1.2: Manufacturer: ASIX Elec. Corp.
Apr 09 16:48:29 archive kernel: usb 1-1.2: SerialNumber: 007CC2C6328E30
Apr 09 16:48:29 archive kernel: usb 1-1.4: new high-speed USB device number 4 using xhci-hcd
Apr 09 16:48:29 archive kernel: usb 1-1.4: New USB device found, idVendor=2109, idProduct=2817, bcdDevice=90.23
Apr 09 16:48:29 archive kernel: usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Apr 09 16:48:29 archive kernel: usb 1-1.4: Product: USB2.0 Hub             
Apr 09 16:48:29 archive kernel: usb 1-1.4: Manufacturer: VIA Labs, Inc.         
Apr 09 16:48:29 archive kernel: hub 1-1.4:1.0: USB hub found
Apr 09 16:48:29 archive systemd[1]: Reached target Hardware activated USB gadget.
Apr 09 16:48:30 archive kernel: usbcore: registered new interface driver brcmfmac
Apr 09 16:48:30 archive kernel: ax88179_178a 1-1.2:1.0 eth0: register 'ax88179_178a' at usb-xhci-hcd.2.auto-1.2, ASIX AX88179 USB 3.0 Gigabit Ethernet, 7c:c2:c6:32:8e:30
Apr 09 16:48:30 archive kernel: usbcore: registered new interface driver ax88179_178a
Apr 09 16:48:30 archive kernel: usb 1-1.4.3: new high-speed USB device number 5 using xhci-hcd
Apr 09 16:48:30 archive kernel: usb 1-1.4.3: New USB device found, idVendor=1f75, idProduct=0621, bcdDevice= 0.36
Apr 09 16:48:30 archive kernel: usb 1-1.4.3: New USB device strings: Mfr=4, Product=5, SerialNumber=6
Apr 09 16:48:30 archive kernel: usb 1-1.4.3: SerialNumber: 1
Apr 09 16:48:30 archive kernel: usb-storage 1-1.4.3:1.0: USB Mass Storage device detected
Apr 09 16:48:30 archive kernel: scsi host0: usb-storage 1-1.4.3:1.0
Apr 09 16:48:30 archive kernel: usbcore: registered new interface driver uas
Apr 09 16:48:46 archive kernel: usb 1-1.1: new high-speed USB device number 6 using xhci-hcd
Apr 09 16:48:46 archive kernel: usb 1-1.1: New USB device found, idVendor=152d, idProduct=0551, bcdDevice= 1.00
Apr 09 16:48:46 archive kernel: usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Apr 09 16:48:46 archive kernel: usb 1-1.1: Product: USB to ATA/ATAPI Bridge
Apr 09 16:48:46 archive kernel: usb 1-1.1: Manufacturer: JMicron
Apr 09 16:48:46 archive kernel: usb 1-1.1: SerialNumber: 03711ED7AFFF
Apr 09 16:48:46 archive kernel: usb-storage 1-1.1:1.0: USB Mass Storage device detected
Apr 09 16:48:46 archive kernel: scsi host1: usb-storage 1-1.1:1.0

So I have two questions (and an off-by-one-bug):

  1. Is anyone else using the Radxa Zero with a JBOD enclosure, that provide USB3.0 speeds?
  2. How might I go about getting my current set-up working at USB 3.0 speeds? This Amazon Basics hub works splendidly on my Ryzen 5 based Manjaro Linux (21.2.5) desktop, giving me full USB 3.0 throughput.
  3. What’s the next step in trouble shooting this? Beyond the message We don't know the algorithms for LPM for this host, disabling LPM, I’m not seeing a lot to go on.

In your attached lsusb output your USB hub has been detected as USB 2.0 device. You can try flip the connector and plug in again. If it is still detected as such you can also try getting a USB Type-C to USB Type-B cable and plug in your disk enclosure directly to test.

I’m suspecting the issue could be you are stressing the USB hub too hard since you also have a USB Ethernet adapter. So I’d first test with enclosure only and then test Ethernet adapter only without any hub to make sure Zero can handle the load (it should) and the device itself is good. Then introduce the hub and slowly add more devices to test.

1 Like

Thanks very much for the suggestions! (and sorry for the long delay in responding)

Since I am using a powered USB hub (and tried other powered usb hubs), and the disc array enclosure is powered, I would have thought that overwhelming the usb port wouldn’t happen…

But it I believe you’re dead on. When this setup is on my desktop linux, and the [gen 2] port is backed by a sizeable power supply, providing peak power isn’t a problem. Likewise, when using just one device, everything seems pretty stable at 3.0 speeds on the zero.

I think the hub cannot properly negotiate the power at start-up. With everything connected, it’ll exceed the max power draw on a usb 3.0 port on the host (the zero), so the speed and power budget gets pushed down to usb2.0 specs (or the device gets reset later).

Oddly enough, the disc array, that has it’s own power supply, asks for more than 900mA (according to the maxPower attribute via “lsusb -v”).