Intermittent severe USB mouse lagging with R4.3 testing + dom0 updates question

Installed Qubes OS R4.3 about a week ago using the Qubes-4.3.202409300343-x86_64.iso image from Index of /qubes/iso-testing/. I have USB mice and keyboards allowed to automatically pass through to dom0. The particular keyboard and mouse I’m using is the Logitech MX Master 3S mouse, and the Logitech MX Mechanical Mini keyboard.

While my keyboard seems to be functioning without issues, my mouse is lagging horribly, but only intermittently. Sometimes the pointer will move smoothly and everything will just work, other times it will start moving slowly and in a choppy fashion, and sometimes it will just lock up entirely. Other input devices (my laptop’s build-in touchpad) will still work perfectly well, and even my USB keyboard continues to function just fine as far as I can tell, it’s only just the mouse that goes haywire. It feels almost like what happens when a Linux system starts thrashing because of low memory, though not quite as severe.

I checked CPU usage in sys-usb and it seems normal. I also checked sys-usb’s RAM and while it seems tight (315 megabytes total, 86 megabytes available, 10 megabytes free, 1023 megabytes swap space available, 121 megabytes swap space used), it doesn’t seem to me like it should cause this. It should have enough headroom to survive, especially with the plentiful swap space left.

I’m going to check to see if increasing available RAM helps at all, but I thought I should bring this up just in case it’s helpful. I should be using the latest updates for all Qubes since I updated this morning.

(Side note that I didn’t feel was worthy of its own forum post - does dom0 in Qubes R4.3 actually get updates the way it’s configured? I had trouble reinstalling a dom0 package the other day and it looks like the testing repository isn’t enabled by default, which would mean my dom0 is stagnating. I didn’t tweak any repository settings, all I did to my dom0’s packages beyond normal updates is reinstalling locally built versions of some things for development and testing purposes, then tried to reinstall the ones from Qubes’ dnf repos to revert back to upstream. I managed to get the reinstallation to work, but I had to explicitly specify the testing repository as the one to use in the qubes-dom0-update command.)

My R4.3 is an upgrade from R4.2. But it should be overall similar to your situation. I also use a USB mouse (but not a USB keyboard)

When does this exactly happen? During VM shutdown/start and/or heavy system load?

My sys-usb memory allocation is 512MB

Are you using Fedora 41 xfce stock template?

Doesn’t happen at any times in particular that I can tell, it just happens. Light load, heavy load, while VMs are starting/stopping or while they’re just running. The only pattern I was able to see was that the lag might be getting worse if I open the Qubes application menu and start moving the mouse pointer back and forth over the various Qubes I have, thus making a lot of different items become highlighted and unhighlighted. Even that doesn’t make the lag very bad though. The times it was the worst, I was just editing a MediaWiki page in Chrome.

I’m using the stock Fedora 40 XFCE template. (Fedora 41 templates aren’t available on R4.3 that I can tell, or at least one didn’t come with my installation.)

I tried increasing sys-usb’s RAM to 500MB, it did not resolve the issue.

Fedora 41 XFCE testing template should be available:
https://yum.qubes-os.org/r4.3/templates-itl-testing/rpm/

I believe the final official release date for Fedora 41 should be 29th October. Qubes OS support for it is currently under development.

Increase it to 1GB for a test so it won’t use any swap.

1 Like

These are wireless devices, yes?

I have had problems as you describe going back to q4.0. It was not very frequent but I always find turning mouse off and back on got it back to full speed.

I though it was due to more mouse related problem, than qubes. but should look that way too

They are wireless devices, yes. I tried turning the mouse off and back on during one of the lag “episodes” though and it didn’t have any effect.

Tried this, it had no effect.

I did notice that the lag seems to be pretty much absent when I don’t have Google Chrome running in my work VM, and it gets really bad once Chrome is running. This makes me think that the issue might be a code change of mine, since I’m hacking on the GUI daemon and introduced some code that could have an effect on performance there. Maybe Chrome is stressing the GUI virtualization code and having an effect on sys-usb’s performance as a result? Will try downgrading my qubes-gui-daemon package in dom0 to find out.