USB bandwidth problem

I have 2 alliedvision cameras connected to my jetson Xavier NX. I know this jetson has USB 3 Gen 2 ports so the bandwidth should be 10Gb/s, but using “lsusb -t” I discovered something unexpected this bandwidth is only available for 1 camera and the other port has a bandwidth of only 480 Mb/s which is the same as USB2. By the way my jetson is far away and I access it via ssh, is there a non intrusive way to solve thhis problem?

here the lsusb -t output

/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
|__ Port 3: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
|__ Port 2: Dev 35, If 0, Class=Miscellaneous Device, Driver=usbfs, 5000M
|__ Port 2: Dev 35, If 1, Class=Miscellaneous Device, Driver=usbfs, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
|__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 36, If 0, Class=Miscellaneous Device, Driver=, 480M
|__ Port 1: Dev 36, If 1, Class=Miscellaneous Device, Driver=, 480M
|__ Port 4: Dev 5, If 0, Class=Vendor Specific Class, Driver=ch341, 12M
|__ Port 3: Dev 3, If 0, Class=Wireless, Driver=rtk_btusb, 12M
|__ Port 3: Dev 3, If 1, Class=Wireless, Driver=rtk_btusb, 12M

Please check dmesg to see if two cameras are enumerated as superspeed. Probably one is enumerated as superspeed and the other is highspeed.

Additional note: Keep in mind that the maximum speed is determined by the “root_hub”. The first root_hub can achieve 10000Mb/s, and so if you ignore overhead, then mostly the two 5000M devices will run at their max speed. The other “Miscellaneous Device” branching off of the 480M root hub looks like it is your other camera (but you’d need to confirm that), and it has no chance of running at USB3 speeds under current circumstances.

The rest of this long reply is just to illustrate switching between USB3 root hubs and devices which might be USB2 or slower in comparison to how USB3 shows up.

You won’t be able to use software to cause a USB2 hardware port to become USB3 (the port itself requires extra wires). One of these will apply:

  • (A) the controller itself does not support USB3 and thus the second root_hub from your lsusb -t could never reach USB3 even if the port itself is wired for USB3 (due to being on a USB2 root hub), or that
  • (B) the controller of the second root_hub you found could support USB3, but the port is not wired to support USB3, and thus there is once again no possibility of reaching USB3 speeds like this, or
  • (C) both controller and port wiring support USB3, and thus it would only be a matter of updating the device tree to achieve what you want (this is not your case if using a Jetson NX dev kit…the device tree is already correct in that case as a default).

Are you using the developer kit? If so, then can you describe which ports are being used relative to the diagram in the “getting started” guide here:

In the picture at that URL it shows 4 ports which are USB3, item label “5”. Which ports are used? Those 4 ports are wired such that they are USB3 capable if the device being plugged in is USB3.

There is another twist in this story which is important: Hardware for a USB2 root hub has historically supported this USB2 protocol and slower protocols, simply using a “transaction translater” (“TT”) to slow down the protocol for non-USB2 devices (a single controller for USB2 and earlier understands all of the slower protocols up to and including USB2).

USB3 root hubs typically do not work directly with slower protocols and do not understand slower protocols, and what they tend to do is to reroute USB2 devices to a different controller (USB3 root hubs will hand off to a USB2 controller and not work directly with USB2 or slower). It may look like a USB2 item in “lsusb -t” is plugged in to a root hub or port which does not support USB3, but the reality is that the port might support USB3 while a USB2 items shows up purely in the USB2 tree branch (the illusion of a USB3 root hub not being connected to that device or port). Devices showing as USB2 while connected to a USB3 port won’t necessarily show USB2 status branching off of the USB3 root hub. You need to be able to guarantee that both (A) the device is USB3, and (B) the connectors are fully seated in a USB3 port.

If you look at a normal “lsusb” without the “-t”, you will see an “ID” field. For example, it might look like “0955:7e19”. You can look at exactly that device and only that device with “lsusb -d 0955:7e19” (but change for your actual ID). Then look at the verbose output for that device and post it here when you know it is connected to a USB3 port (this can be from a PC as well, it doesn’t have to be from the Jetson):
sudo lsusb -d 0955:7e19 -vvv

If this is done from a USB3 port, then that content should indicate that at least part of this is USB3 capable (if performed from a USB2 port, then the USB3 verbose information might be missing). You can even use the same model device at your local computer if you don’t have access, but if you know the device itself is the same model, then the verbose lsusb information should be fine for confirming the device itself is or isn’t USB3.

FYI, my NX (an earlier release dev kit) only shows a single USB3 root hub. I don’t see a second. All four ports marked as label “5” on that previously mentioned URL’s picture use a single root hub (maybe a custom carrier board could use two independent USB3 root hubs, but not the dev kit carrier board). This means (since it shows up as 10000M) that you could theoretically maintain full performance with two 5000M devices, but 4 devices on those 4 ports would run only 2500M in actual throughput. Many USB3 cameras simply won’t work well if they don’t get a full 5000M throughput, but those are usually specialty cameras (e.g., 3D stereo).

If I connect a USB2 or slower device to my NX dev kit I see the device migrate in lsusb -t to the 480M root hub. If I don’t fully seat a USB3 device’s connector it also shows USB2 since the “extra” wires for USB3 won’t make contact if not fully seated.

Sorry for the late response, had to switch to another project so I was a little busy. Anyway I executed dmesg and these lines caught my attention.

[ 2.763649] usb 1-2.1: new high-speed USB device number 4 using tegra-xusb
[ 2.784375] usb 1-2.1: New USB device found, idVendor=1ab2, idProduct=0001
[ 2.784383] usb 1-2.1: New USB device strings: Mfr=2, Product=3, SerialNumber =4
[ 2.784387] usb 1-2.1: Product: ALVIUM 1800 U-501m NIR
[ 2.784391] usb 1-2.1: Manufacturer: Allied Vision
[ 2.784394] usb 1-2.1: SerialNumber: 00609

[ 6.951905] usb 2-3.2: new SuperSpeed USB device number 3 using tegra-xusb
[ 6.972513] usb 2-3.2: New USB device found, idVendor=1ab2, idProduct=0001
[ 6.972522] usb 2-3.2: New USB device strings: Mfr=2, Product=3, SerialNumber =4
[ 6.972527] usb 2-3.2: Product: ALVIUM 1800 U-501m NIR
[ 6.972531] usb 2-3.2: Manufacturer: Allied Vision
[ 6.972535] usb 2-3.2: SerialNumber: 00608

Here’s my dmesg output if you want to see the full output:

From the log, one is enumerated as USB3(superspeed) and the other is USB2(high-speed). One possible reason is the power supply is not enough. Please connect a hub with external power to Xavier NX, and connect one camera to the hub. See if both can be enumerated to USB3 in this setup.

I had forgotten the part @DaneLLL just mentioned. USB3 increased the power which can be delivered, and if the second camera plus anything else on that root hub combined exceeded power limits, then the USB3 device might be forced back to USB2 (which would reduce power consumption, and would be a valid mode change reason, but may not be obvious). The mentioned externally powered HUB could eliminate that as a cause if the slower speed is from the combined cameras requiring more power than a single USB3 host can provide.

One thing I do see is that the USB ID is invalid, but it may not matter. Notice that the manufacturer/product/serial reported by the device is just “2 3 4”. If you look at the USB registry here:
…then “Allied Vision” has manufacturer ID “1ab2”, not “2”. Either the devices were created prior to “Allied Vision” had its registry entry created, or the devices are not really from “Allied Vision”. Probably irrelevant to the topic, but might be a problem, and worth mentioning that the camera is possibly not really from the company it is listed as. Below is the USB registry information, search for manufacturer “1ab2” or “Allied Vision”:

Also probably not important, but your log shows USB errors with an interesting explanation:
(note that your NX is using kernel 4.9, and that they are really just warnings, not errors, but anyone seeing the same thing now has a URL to reference)

Regardless of any of the above, if you use “lsusb -t” to view those cameras on a PC, do both show they run at USB3 speeds? Is the issue only on the Jetson when looking at “lsusb -t”? Does a powered HUB solve anything?

thanks for your responses, will let you know what happened once I return to this part of the project.