Open hast0011 opened 3 years ago
I have always had this issue with Qubes. I think it might be because of the Qubes firewall, which hogs up a lot of CPU during high network traffic, but I am not sure. My mouse always stutters when I access files over my Gbps local network. With lower traffic (~20MBps or so) it's not really noticeable.
Could be depending on network speed. I upgraded my internet connection during pandemic situation and maybe it is now more obvious.
I just tried and made a screenshot of xentop. CPU power of firewall does not seem to be too high.
By studering do you mean that the cursor position jumps over much larger distances than normal, but still accurate? As if the mouse is moving smoothly like normal in sys-net, but the syncing that mouse movement back to dom0 is slow? If so I have a similar problem too (in a dedicated sys-usb), expect on my system it isn't so reproducible. If I restart sys-usb the problem goes away for a awhile.
+1. I have a separate sys-usb
and yes, syncing the events (clicks, movements etc.) do dom0 seems slow. I notice this with my USB keyboard too. Sometimes key strokes are delayed and sometimes a single key stroke gets repeated multiple times in the AppVM where I am typing!
By studering do you mean that the cursor position jumps over much larger distances than normal, but still accurate? As if the mouse is moving smoothly like normal in sys-net, but the syncing that mouse movement back to dom0 is slow? If so I have a similar problem too (in a dedicated sys-usb), expect on my system it isn't so reproducible. If I restart sys-usb the problem goes away for a awhile.
I have no separate sys-usb vm. The feeling is that the mouse pointer doesnt follow the movement of the mouse immediatly. It hangs for some millisecons and the jumps to the expected position. That happens repeatedly during a movement. It
s very hard to be precise during this behaviour because it also creates some kind of overshot.
I didn`t recognize the keystroke behaviour in my case.
What do you mean by "syncing that mouse movement back to dom0 is slow" ?
What do you mean by "syncing that mouse movement back to dom0 is slow"?
I meant that sys-usb recognizes it, and sort of "caches it" in some sense, but there is a delay in when the effects appear outside of sys-usb.
and sometimes a single key stroke gets repeated multiple times in the AppVM where I am typing!
I have also seen this before on a computer using some installation configurations.
I have the same issue with the mouse lagging. It only happens when I do my backups. As soon as I kill the backup process, everything comes back to normal.
I've looked at overall CPU and RAM usage (inside backup-qube, sys-net, sys-usb, sys-firewall and dom0) when the lag starts and nothing looks weird. I don't see any spikes anywhere, I saw some swapping on sys-net and added some more RAM to it and it did not fix the lag. This left me thinking that there is some network conflict or something.
I use btrfs send
and btrfs receive
to copy my backups over the network.
To make sure it was not the issue I tried to use:
Those two programs still cause the same mouse lag.
I am out of ideas to debug this, does anyone have an idea of what I should look at next? Any logs?
Thanks a lot any help is apreciated.
Is this still a problem in 4.1?
I can't tell I don't use QubesOS anymore
I have similar problems during high io operations (like transferring data over network, but also during qubes backup itself iirc). Running 4.1
Is this still a problem in 4.1?
Long time no see. Sorry for my late answer.
For me the topic is solved. I upgraded/installed Qubes 4.2.0-rc2 recently and since then this problem does not occur on my machine.
Regarding sys-usb: Just to mention that now I can (and do) also use sys-usb, set up with the installer (#7674). Before in 4.1 it was unusable for me. In 4.1 it was possible to install and use sys-usb with usb mouse and usb keyboard but in that case the mouse movement was really bad all the time. Really worse compared to stuttering described in this issue. However not it works fine.
This happens to me (Qubes 4.1) when I repeatedly remove and re-insert a Yubikey. It is random so difficult to determine the cause. Maybe 1 out of 6 inserts (but also sometimes 1 out of 4, or 1 out of 3) suddenly makes my (USB-connected) mouse jerky/stuttery. The only way to resolve it is to reboot the sys-usb qube.
The sys-usb is a disposable VM using Debian 11 as a template, and has a Kensington USB/HDMI hub is plugged into one port (with a USB keyboard, USB mouse and monitor HDMI attached to that hub). The other USB port in the laptop is used by my Yubikey
When I reproduce it after plugging in my Yubikey, this is what I see in the journalctl on the sys-usb:
Oct 02 16:22:47 sys-usb kernel: usb 4-1: new full-speed USB device number 11 using xhci_hcd
Oct 02 16:22:47 sys-usb kernel: usb 4-1: New USB device found, idVendor=1050, idProduct=0407, bcdDevice= 5.43
Oct 02 16:22:47 sys-usb kernel: usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Oct 02 16:22:47 sys-usb kernel: usb 4-1: Product: YubiKey OTP+FIDO+CCID
Oct 02 16:22:47 sys-usb kernel: usb 4-1: Manufacturer: Yubico
Oct 02 16:22:47 sys-usb kernel: input: Yubico YubiKey OTP+FIDO+CCID as /devices/pci0000:00/0000:00:09.0/usb4/4-1/4-1:1.0/0003:1050:0407.000F/input/input16
Oct 02 16:22:47 sys-usb kernel: hid-generic 0003:1050:0407.000F: input,hidraw1: USB HID v1.10 Keyboard [Yubico YubiKey OTP+FIDO+CCID] on usb-0000:00:09.0-1/input0
Oct 02 16:22:47 sys-usb kernel: hid-generic 0003:1050:0407.0010: hiddev96,hidraw2: USB HID v1.10 Device [Yubico YubiKey OTP+FIDO+CCID] on usb-0000:00:09.0-1/input1
Oct 02 16:22:47 sys-usb mtp-probe[8460]: checking bus 4, device 11: "/sys/devices/pci0000:00/0000:00:09.0/usb4/4-1"
Oct 02 16:22:47 sys-usb mtp-probe[8460]: bus: 4, device: 11 was not an MTP device
Oct 02 16:22:47 sys-usb systemd[1]: Started Qubes input proxy sender (keyboard).
Oct 02 16:22:47 sys-usb mtp-probe[8514]: checking bus 4, device 11: "/sys/devices/pci0000:00/0000:00:09.0/usb4/4-1"
Oct 02 16:22:47 sys-usb mtp-probe[8514]: bus: 4, device: 11 was not an MTP device
Oct 02 16:22:52 sys-usb kernel: hid-generic 0003:17EF:60A1.0005: control queue full
That last line hid-generic 0003:17EF:60A1.0005: control queue full
floods the system log (many entries per second) forever, and causes the CPU to skyrocket.
In a 'normal' insertion, all the preceding lines appear, but not the last one.
Seems to be the same case as https://forum.qubes-os.org/t/sys-usb-kernel-control-queue-full-when-using-usb-keyboard-mouse/9757
Qubes OS version R4.04
Affected component(s) or functionality
USB mouse movement
Brief summary
The mouse starts stuttering if there is some network traffic. Was not visible at 4.02.
How Reproducible
Happens all the time
To Reproduce
Steps to reproduce the behavior:
Expected behavior
smooth movement
Actual behavior
Screenshots
Additional context
Solutions you've tried
Increase memory of sys-net.
Relevant documentation you've consulted
Related, non-duplicate issues