Heavy controller input lag in some games

Scenario:

  1. Gaming HVM with Debian 13 set-up partially according to: https://neowutran.ovh/qubes/articles/gaming_linux_hvm.html, but with Optimus
  2. Games launched through Steam with prime-run
  3. Game controller passed through using USB passthrough, wired (but same happens wireless on bluetooth)

Situation:

Certain games have horrible input lag for the controller. Not all games, though. Observed on Elden Ring and Remnant I. Input lag manifests as:

a) Inputs being very delayed

b) Inputs being held for way longer than they were actually held

c) Both of the above at the same time

d) Inputs being dropped.

Only happens in certain, more demanding games. Doesn’t really happen with USB keyboard and mouse. Something in the back of my mind tells me it could maybe be something related to power budgets on the platform (as those were an issue before), but I’m not sure. Does not happen on OSes other than Qubes on this hardware.

Has anyone come across this/found a solution?

I would suspect an issue with communication between your sys-usb and your gaming HVM.

You maybe have errors visible using “dmesg” in both sys-usb and your gaming HVM.

Also, try to do PCI passthough for your USB controller instead of USB passthrough to see if it have an impact.

Edit: Also, check your CPU usage, will help

As far as CPU usage is concerned, neither sys-usb nor gaming saturate their assigned cores. In fact the usage is around 25%. Same for the whole-system usage.

Also, nothing interesting in dmesg or the journal in sys-usb.

Isn’t communication between VMS happening in the dom0 and thechypervisor? Since its not sys-usb lag try adding a few more cores and ram in dom0 and try again

Yeah, dom0 is also not nearly close to using all the RAM/vCPUs assigned to it

Possible reason and workaround that I’ve found:

It seems that something (still trying to figure out what exactly) is causing my gaming qube to not be able to process a gamepad that polls at 1000Hz. I’ve switched the gamepad (it has a button for it) to 125Hz (Nintento Switch compatibility) mode and the lag is gone, for now.