Three V4L2 USB webcams on Xavier not working

Hi,

I am trying to connect three V4L2 webcams via a USB Hub to the Jetson Xavier without success. The cameras are detected (using v4l2-ctl --list-devices) however when I start streaming from them I see the following error on the third cam:

Jan 14 20:46:10 afgooey kernel: [32825.521413] usb 1-1.2: reset high-speed USB device number 25 using tegra-xusb
Jan 14 20:46:10 afgooey kernel: [32826.050867] usb 1-1.2: Not enough bandwidth for new device state.
Jan 14 20:46:10 afgooey kernel: [32826.051034] usb 1-1.2: Not enough bandwidth for altsetting 9

I am using a USB-C → USB hub with 4 ports. First all three cams were connected to the same USB-C port on the Xavier. Later I changed it 2 cams on one port (via a Hub) and the third cam on the second USB-C port on the Xavier. The outcome was the same: The third camera doesn’t stream (regardless of which camera it is).

Any pointers on why Xavier complains about bandwidth and how it can be fixed?

Cheers,
S

This should probably be considered a limitation rather than an outright error. I suspect your cameras are using “isochronous” mode, which is a reserved bandwidth real time continuous data stream. If your camera was designed for USB3.1 gen. 1 (see https://www.usb.org/sites/default/files/usb_3_1_language_product_and_packaging_guidelines_final_0.pdf), then there is a good chance this is because USB2 does not have the sustained data rate required. HUBs do not increase bandwidth, and only succeed if the combined bandwidth of the involved devices does not exceed a single USB3 port’s bandwidth.

A USB3.1 gen. 2 will handle up to 10Gb/s, but Xavier came out before this specification and was originally listed as USB3. USB3 was absorbed into USB3.1 as gen. 1. 10Gb/s became USB3.1 gen. 2. You might see references to “USB3” which should be considered equivalent to “USB3.1 gen. 1”.

Every USB port is a “tree” structure, and each branch consumes data from the “root HUB”. If your root HUB is capable of 5Gb/s (and this is the USB3.1 gen. 1 specification for the Xavier…the Xavier SoC was designed before gen. 2), then some amount less than this (due to overhead) will be possible for actual reserved bandwidth. One camera will not exceed that max limit, but two will exceed that limit if they really are requiring USB3 bandwidth.

If you run “lsusb -t” you will get a list of USB topology in tree format. The lines ending with “5000M” are 5Gb/s (USB3.1, gen. 1), and “480M” is 480Mb/s, or USB2. Exceeding this bandwidth requires adding new root HUBs.

If the root HUBs present on the Xavier are not enough, then you will probably require adding a reasonably high quality PCIe expansion card for USB3.1.

When I say “reasonably high quality” I am implying a card which has multiple root HUBs, and not a single root HUB with multiple ports. It can be difficult to determine if this is the case for a given PCIe expansion for USB3.1, but some of the less expensive card are technically still USB3.1 with multiple ports, but are not capable of the same total throughput as that of a multiple root HUB variant.

One more note: Some USB3 devices can throttle back to USB2 and continue to function, but devices which do not have the ability to throttle back will simply not work with USB2 mode, or else some settings of that device will work at USB2, but other settings will fail without USB3.