VM limited to 3 USB 3.0 devices

Ivo

Member
Jan 9, 2018
6
0
6
41
Hello,

i seem to be only able to connect 3 USB3.0 devices to one VM.

Version is 4.4.20.

It seems like the xhci controller only has 4 ports, so adding the 4th device triggers the addition of a nested hub at only 12Mb/s. Is there a way to increase the number of ports, or make the nested hub 5000Mb/s?

<vmid.conf>
...
usb0: host=3-1,usb3=yes
usb1: host=3-2,usb3=yes
usb2: host=3-3,usb3=yes
usb3: host=3-4,usb3=yes
usb4: host=2-5
...

qm monitor <vmid> info usb
Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet, ID: tablet
Device 1.2, Port 1, Speed 480 Mb/s, Product Ext HDD 1021, ID: usb4
Device 2.2, Port 1, Speed 5000 Mb/s, Product ASM1153E, ID: usb0
Device 2.3, Port 2, Speed 5000 Mb/s, Product ASM1153E, ID: usb1
Device 2.4, Port 3, Speed 5000 Mb/s, Product ASMT1053, ID: usb2
Device 2.1, Port 4, Speed 12 Mb/s, Product QEMU USB Hub
Device 2.0, Port 4.1, Speed 5000 Mb/s, Product ASMT1053, ID: usb3

qm monitor <vmid> info usbhost
Bus 3, Addr 9, Port 4, Speed 5000 Mb/s
Class 00: USB device 174c:55aa, ASMT1053
Bus 3, Addr 8, Port 3, Speed 5000 Mb/s
Class 00: USB device 174c:55aa, ASMT1053
Bus 3, Addr 3, Port 2, Speed 5000 Mb/s
Class 00: USB device 174c:55aa, ASM1153E
Bus 3, Addr 2, Port 1, Speed 5000 Mb/s
Class 00: USB device 174c:55aa, ASM1153E
Bus 2, Addr 5, Port 6, Speed 12 Mb/s
Class 00: USB device 0403:6001, FT232R USB UART
Bus 2, Addr 4, Port 5, Speed 480 Mb/s
Class 00: USB device 1058:1021, Ext HDD 1021


lsusb -t on the guest
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=uas, 5000M
|__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
|__ Port 3: Dev 4, If 0, Class=Mass Storage, Driver=uas, 5000M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
|__ Port 4: Dev 2, If 0, Class=Hub, Driver=hub/8p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
 
did you try if the speed is limited?
afaik it only displays as 12M but is not limited
 
The 4th USB 3.0 drive does not even register in the guest. As you can see in the lsusb of the guest, the 4th device is not listed.
 
hmm thats weird, i will see if i have time tomorrow to look at this in more detail
 
I actually found a workaround for this by editing /usr/share/perl5/PVE/QemuServer.pm
And changing my $MAX_USB_DEVICES = 5; to my $MAX_USB_DEVICES = 9;

This worked until i did an apt upgrade yesterday. now only 3 USB3 Devices will be mapped in again. (I applied the change again after the update)

my $MAX_USB_DEVICES = 9;

Any way to troubleshoot this? I'm at a loss here.
 
I found the solution:

There is also a patch needed for /usr/share/perl5/PVE/QemuServer/USB.pm:

push @$devices, '-device', "nec-usb-xhci,id=xhci$pciaddr,p3=$max_usb_devices" if $use_usb3;

Here the ",p3=$max_usb_devices" was added

Could this be changed for some version down the line?
 
What has happened with this? I am running version 7.1-10 and the problem still exists. The patch recommended above does not work. I made both changes and still can only access 3 devices.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!