Multiple Kinect2s on the same USB 3.1 Gen 2 bus

325 views
Skip to first unread message

Michael Gratton

unread,
Jun 29, 2018, 3:45:27 AM6/29/18
to openk...@googlegroups.com
Hi all,

I'm testing out using two K2's on a single USB 3.1 Gen 2 bus on Ubuntu
16.04 HWE. I thought this should work since since USB 3.1g2 has 10G
bandwith, however I'm getting the same kinds of errors as if I had
plugged them in to a 5G 3.0/3.1g1 bus.

This shows the USB topology:

> hriadmin@wall-01:~$ lsusb -t
> /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
> /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 10000M
> |__ Port 5: Dev 4, If 0, Class=Hub, Driver=hub/1p, 5000M
> |__ Port 1: Dev 5, If 2, Class=Audio, Driver=snd-usb-audio,
> 5000M
> |__ Port 1: Dev 5, If 0, Class=Vendor Specific Class,
> Driver=, 5000M
> |__ Port 1: Dev 5, If 3, Class=Audio, Driver=snd-usb-audio,
> 5000M
> |__ Port 1: Dev 5, If 1, Class=Vendor Specific Class,
> Driver=, 5000M
> |__ Port 8: Dev 2, If 0, Class=Hub, Driver=hub/1p, 5000M
> |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class,
> Driver=, 5000M
> |__ Port 1: Dev 3, If 1, Class=Vendor Specific Class,
> Driver=, 5000M
> |__ Port 1: Dev 3, If 2, Class=Audio, Driver=snd-usb-audio,
> 5000M
> |__ Port 1: Dev 3, If 3, Class=Audio, Driver=snd-usb-audio,
> 5000M
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
> |__ Port 5: Dev 3, If 0, Class=Hub, Driver=hub/1p, 480M
> |__ Port 8: Dev 2, If 0, Class=Hub, Driver=hub/1p, 480M

After setting USBFS buffer size to 64 (and 128M), and starting two
instances of Protonect, I get these errors launching the second
instance:

> hriadmin@wall-01:~/libfreenect2/build$ LIBUSB_DEBUG=3 ./bin/Protonect
> -noviewer cuda 005224162247
> Version: 0.2.0
> Environment variables: LOGFILE=<protonect.log>
> Usage: ./bin/Protonect [-gpu=<id>] [gl | cl | clkde | cuda | cudakde
> | cpu] [<device serial>]
> [-noviewer] [-norgb | -nodepth] [-help] [-version]
> [-frames <number of frames to process>]
> To pause and unpause: pkill -USR1 Protonect
> libusb: warning [initialize_device] Unknown device speed: 10000 Mbps
> [Info] [CudaDepthPacketProcessorImpl] device 0: GeForce GTX 1050 @
> 1455MHz Memory 2000MB
> [Info] [CudaDepthPacketProcessorImpl] selected device 0
> libva info: VA-API version 0.39.0
> libva info: va_getDriverName() returns -1
> libva error: va_getDriverName() failed with unknown libva
> error,driver_name=(null)
> [Error] [VaapiRgbPacketProcessorImpl] vaInitialize(display,
> &major_ver, &minor_ver): unknown libva error
> [Info] [Freenect2Impl] enumerating devices...
> [Info] [Freenect2Impl] 10 usb devices connected
> [Info] [Freenect2Impl] found valid Kinect v2 @2:6 with serial
> 005224162247
> [Info] [Freenect2Impl] found valid Kinect v2 @2:5 with serial
> 005069162247
> [Info] [Freenect2Impl] found 2 devices
> [Info] [Freenect2DeviceImpl] opening...
> libusb: error [op_get_configuration] device unconfigured
> libusb: error [op_set_configuration] failed, error -1 errno 28
> [Error] [protocol::UsbControl] failed to set configuration!
> LIBUSB_ERROR_OTHER Other error. Try debugging with environment
> variable: export LIBUSB_DEBUG=3 .
> [Info] [Freenect2DeviceImpl] closing...
> libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=3
> [Error] [protocol::CommandTransaction] bulk transfer failed:
> LIBUSB_ERROR_IO Input/Output Error
> libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=3
> [Error] [protocol::CommandTransaction] bulk transfer failed:
> LIBUSB_ERROR_IO Input/Output Error
> [Info] [Freenect2DeviceImpl] deallocating usb transfer pools...
> [Info] [Freenect2DeviceImpl] closing usb device...
> [Info] [Freenect2DeviceImpl] closed
> [Error] [Freenect2Impl] failed to open Kinect v2: @2:6
> failure opening device!

And this is logged by the kernel when I start it:

> Jun 29 17:09:18 wall-01 kernel: usb 1-5: new high-speed USB device
> number 8 using xhci_hcd
> Jun 29 17:09:19 wall-01 kernel: usb 1-5: New USB device found,
> idVendor=045e, idProduct=02d9
> Jun 29 17:09:19 wall-01 kernel: usb 1-5: New USB device strings:
> Mfr=1, Product=2, SerialNumber=0
> Jun 29 17:09:19 wall-01 kernel: usb 1-5: Product: NuiSensor Adaptor
> Jun 29 17:09:19 wall-01 kernel: usb 1-5: Manufacturer: Microsoft
> Corporation
> Jun 29 17:09:19 wall-01 kernel: usb 1-5: Not enough bandwidth for new
> device state.
> Jun 29 17:09:19 wall-01 kernel: usb 1-5: can't set config #1, error
> -28
> Jun 29 17:09:19 wall-01 kernel: usb 2-5: new SuperSpeed USB device
> number 16 using xhci_hcd
> Jun 29 17:09:22 wall-01 kernel: usb 2-5: New USB device found,
> idVendor=045e, idProduct=02d9
> Jun 29 17:09:22 wall-01 kernel: usb 2-5: New USB device strings:
> Mfr=1, Product=2, SerialNumber=0
> Jun 29 17:09:22 wall-01 kernel: usb 2-5: Product: NuiSensor Adaptor
> Jun 29 17:09:22 wall-01 kernel: usb 2-5: Manufacturer: Microsoft
> Corporation
> Jun 29 17:09:22 wall-01 kernel: usb 2-5: Not enough bandwidth for new
> device state.
> Jun 29 17:09:22 wall-01 kernel: usb 2-5: can't set config #1, error
> -28

Kernel version:

> hriadmin@wall-01:~/libfreenect2/build$ uname -a
> Linux wall-01 4.13.0-45-generic #50~16.04.1-Ubuntu SMP Wed May 30
> 11:18:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

This is using current libfreenect2 from git master.

The "libusb: warning [initialize_device] Unknown device speed: 10000
Mbps" line from running Protonect makes me think libusb has a problem
with it, but the kernel spew makes me think that maybe there's also a
problem eleswhere? Or are they related?

Thoughts? Anyone else got two devices working on the same USB 3.1g2 bus?

Cheers!
//Mike

--
Michael James Gratton <http://www.cse.unsw.edu.au/~mikeg/>
Computer Science and Engineering & Creative Robotics Lab.
The University of New South Wales, Sydney, Australia.

Florian Echtler

unread,
Jun 29, 2018, 4:04:11 AM6/29/18
to openk...@googlegroups.com, Michael Gratton
Off the top of my head, I would assume that plugging an USB 3.0 device (such as
the Kinect 2) into an USB 3.1 host will force the whole bus to use the lowest
common denominator, which in this case is 3.0.

But as usual with USB3, this may be due to a bug somewhere within the mess of OS
drivers, silicon errata etc. and after some update or with another HC, it might
magically start working...

Best regards, Florian
SENT FROM MY DEC VT50 TERMINAL

signature.asc

Michael Gratton

unread,
Jun 30, 2018, 12:05:11 AM6/30/18
to Florian Echtler, openk...@googlegroups.com
On Fri, Jun 29, 2018 at 6:04 PM, Florian Echtler <fl...@butterbrot.org>
wrote:
> Off the top of my head, I would assume that plugging an USB 3.0
> device (such as
> the Kinect 2) into an USB 3.1 host will force the whole bus to use
> the lowest
> common denominator, which in this case is 3.0.

Yeah, that was a worry of mine as well but 3.1's multiple INs support
should (in theory) make this a non-concern:
https://www.synopsys.com/designware-ip/technical-bulletin/achieving-10-gbps.html>

> But as usual with USB3, this may be due to a bug somewhere within the
> mess of OS
> drivers, silicon errata etc. and after some update or with another
> HC, it might
> magically start working...

I know what you mean. So basically apply firmware updates, upgrade then
kernel, and cross my fingers?

Dan Duque

unread,
Jun 30, 2018, 2:27:12 AM6/30/18
to openk...@googlegroups.com, Florian Echtler
You might have to re compile the drivers.. a few times to work out the bugs.... 

--
You received this message because you are subscribed to the Google Groups "OpenKinect" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openkinect+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages