No USB Devices in PVE9.1.1

kwat

Active Member
Apr 16, 2021
49
4
28
After a few days of normal operation, all USB devices stop working on my PVE 9.1.1 host. After reboot, lsusb outputs all devices but after a few days, lsusb outputs nothing and no USB devices (keyboard, mouse, UPS) work anymore. This scenario has been repeated multiple times.

I run the following commands at startup to save power:
echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo balance_power | tee /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference

and recently added usbcore.autosuspend=-1 option to the GRUB configuration. But this had no effect.

Any suggestions on what could be the problem would be greatly appreciated.
 
Hi,
please check your system logs/journal for any messages around the time of the issue. What kernel version are you running?
 
I am using kernel 6.17.2-2-pve. I am monitoring my system to gather the info requested. It is difficult to determine precisely when the problem occurs as the only indicating is USB devices don't work and I am not on the PVE all the time. Perhaps there is way to have a cron job to run lsusb and record the time if there is no output.
 
Still waiting for the problem to happen again. I ran dmesg | grep usb and found the following:
usb: port power management may be unreliable

Thought this might be helpful...
 
Problem happened again, here are some log entries that seemed relevant.
Anything other info I can provide?

Jan 04 02:05:17 pve kernel: xhci_hcd 0000:00:14.0: remove, state 1
Jan 04 02:05:17 pve kernel: usb usb2: USB disconnect, device number 1
Jan 04 02:05:17 pve kernel: usb 2-5: USB disconnect, device number 2
Jan 04 02:05:17 pve kernel: xhci_hcd 0000:00:14.0: USB bus 2 deregistered
Jan 04 02:05:17 pve kernel: xhci_hcd 0000:00:14.0: remove, state 1
Jan 04 02:05:17 pve kernel: usb usb1: USB disconnect, device number 1
Jan 04 02:05:17 pve kernel: usb 1-2: USB disconnect, device number 2
Jan 04 02:05:17 pve kernel: usb 1-4: USB disconnect, device number 3
Jan 04 02:05:17 pve kernel: usb 1-4.2: USB disconnect, device number 5
Jan 04 02:05:17 pve kernel: usb 1-4.4: USB disconnect, device number 6
Jan 04 02:05:17 pve kernel: usb 1-14: USB disconnect, device number 4
Jan 04 02:05:17 pve systemd[1]: Stopped target bluetooth.target - Bluetooth Support.
Jan 04 02:05:17 pve kernel: xhci_hcd 0000:00:14.0: USB bus 1 deregistered
Jan 04 02:05:17 pve systemd[1]: Starting systemd-rfkill.service - Load/Save RF Kill Switch Status...
Jan 04 02:05:17 pve systemd[1]: Started systemd-rfkill.service - Load/Save RF Kill Switch Status.
Jan 04 02:05:17 pve kernel: vfio-pci 0000:00:14.3: resetting
Jan 04 02:05:17 pve kernel: vfio-pci 0000:00:14.3: reset done
Jan 04 02:05:17 pve systemd[1]: Started 104.scope.
 
Thank you very much. Do I need to do anything other than Remove the PCI device from the VM via the PVE GUI, ie
VM>Hardware>PIC Device (click Remove button)?

I want to restore host control.
 
Last edited:
If you already started the VM, you'll need to unbind the vfio-pci driver from the USB controller and rebind the USB driver. Might be easier to reboot the Proxmox host and not start VMs that have devices in the same IOMMU group.