Proxmox Devs: Please could you modernize the arcane forced default USB controllers logic??

Domino

Well-Known Member
May 17, 2020
54
16
48
57
This has been requested on a few occasions over the years, but to this day, Proxmox still forces these USB controllers into VMs.
Ovirt and other QEMU/KVM environments don't do it, but Proxmox likes to keep these legacy things hardcoded still in there, really annoying.

I checked the code and it is hard-coded in the file: /usr/share/perl5/PVE/QemuServer.pm

Perl:
# add usb controllers
    my @usbcontrollers =
        PVE::QemuServer::USB::get_usb_controllers($conf, $bridges, $arch, $machine_version);
    push @$devices, @usbcontrollers if @usbcontrollers;


With modern QEMU, I directly add the new performant virtio mouse and virtio keyboard via args:

Code:
-device virtio-mouse-pci -device virtio-keyboard-pci


Also I disable the old PS2 support via args:

Code:
-machine type=q35,i8042=off


But unfortunately there is no way to disable the UHCI/EHCI USB controller emulation.


If the concern is backwards compatibility, then at please consider adding an option in the VM Options page, "Disable USB UHCI/EHCI" or something along those lines, so us modern QEMU fans can just check it and wave goodbye to it.

Yes, I know I can modify the code, but I do not think this is an edge-case whatsoever, this is simply about keeping up with modern QEMU optimizations.

Keep up the great work! Many thanks.
 
In case anyone else wants to get rid of these pesky emulated USB controllers, just remove the relevant [device] sections from the file:
/usr/share/qemu-server/pve-q35-4.0.cfg

Not ideal to have to hack around the code, but on MOST all vm guests I simply have no need for these controllers. Simultaneously I also remove the emulated Intel HDA device from the same config file.


For those who run Windows guests (client/server), removing these controllers has a very noticeable drop in contexts load affecting overall DPC latency, in effect reducing micro-glitches/IO-lag considerably. Obviously the gain is not limited to just Windows alone, but there it is through user-exposure noticeable. Either way, these emulated controllers do impact a virtual guest, albeit very small, it all adds up when you've got a fairly handsome number of guests running on a host.

I do hope the option to disable these controllers and the audio-device is added to Proxmox, let us be realistic here, nobody else does it this way, no reason for Proxmox to continue this legacy 'nonsensical? :eek:' method which from what I can gather strolling through old message logs was considered a good-thing back when Q35 first hit the scene with USB support.
 
Last edited:
Hi,

Well, it's not only for bugs, it's for feature requests as well, and therefore be tracked by the Proxmox team (which is not the case with the forum).

As I can see feature requests are discussed on the bugzilla and if they are accepted by the team, it's integrated (more or less rapidly based on the difficulty, time and user-wide application).

EDIT :
Done : https://bugzilla.proxmox.com/show_bug.cgi?id=6905

Best regards,
 
Last edited: