Unavoidable stuttering/lag until reboot

This is a weird chain of issues, and I don’t know what could be the root cause, so bear with me.

I have been having an issue for the past few months since I started using qubes where pulseaudio will become very stuttery/laggy under any form of stress on the cpu. This mainly happens (rarely) when starting and stopping qubes, attaching usb devices, etc. On top of this electron apps and most apps in general will become very unresponsive inside of my qubes. Usually, the culprit of this is sys-usb randomly spiking in cpu usage for no reason (60-70%) and it will not go down until I restart it. When checking the qube the main stressor is qrexec-client-v. To remedy this I’ve tried to add more cpu cores and ram to this qube. However, what is weird is even after restarting the sys-usb cube and stopping most things on my pc to lower the stress, pulseaudio will remain a stuttery mess no matter what I do. The only solution is always a full system reboot.

My hardware isn’t that bad, I’m running an i5-12600k and 32GB of 4100MHz ram which should be able to handle what I’m doing so I don’t think that could be the cause.

If anyone could point me in the right direction on how to identify and fix this issue I would really appreciate it.

I used to have this issue as well.

Since you are using a sys-usb, what have you got attached to it?
You aren’t using a USB KB/Mouse are you?
Got anything forwarded to other virtuals?
Have you got anything scanning the drives?
Do you have any anti-malware on the sys-USB to scan devices?

Since you are using a sys-usb, what have you got attached to it?
You aren’t using a USB KB/Mouse are you?

I have a USB mouse, which is the only USB plugged in. I also have ps/2 keyboard. (I would use both as ps/2 but my motherboard only has one port)

Also, this stuttering I’m experiencing also affects my keyboard somehow too. I will be typing in a qube and characters will repeat (liiiike thhhhhis) and the keyboard will be generally laggy. I can only fix this with a full reboot. My computer basically becomes unusable.

Got anything forwarded to other virtuals?

I usually experience the stuttering when plugging in / attaching my USB microphone to a qube, but it also happens at other times randomly even with nothing else being plugged in or being attached.

I’ve had similar issues, and figured if I could use a sys-audio qube, maybe just restarting it would clear up the audio stuttering. (I never saw the keyboard issues you are talking about.)

Unfortunately I could never get a working sys-audio on my system. But if you can, it might be worth a try.

Do you see anything noticeable when you run sudo dmesg | grep -v audit in dom0 and/or sys-usb at that time?

If your CPU or RAM is overclocked or undervolted, restore the default settings and see if that helps.

I don’t see anything noticeable unfortunately, and also I don’t think I can even check/edit cpu/ram voltage settings since I’m using coreboot

Can it be this?

Does setting pci=nomsi to sys-usb help?

qvm-prefs sys-usb kernelopts pci=nomsi