Microphone sound with a USB sound card produces spikes and crackling; using a paravirtualized VM (AppVM) causes it. Using HVM gives an error!
I have a microphone that I use with a USB sound card.
Using OBS in an AppVM called obs-studio, where obs-studio is installed, and the sound card is attached to it via sys-usb.
The microphone works, but then it starts producing terrible spikes and the audio becomes bad, with interference.
I analyzed it and thought it was latency because the VM is paravirtualized.
So I tried creating an obs-studio AppVM with the HVM option enabled, and attaching the same USB devices that are attached to sys-usb. But when I start it, Qubes errors:
“Got empty response from qubesd. See journalctl in dom0 for details.”
In the Settings → Devices tab, I put exactly the same USB hardware controllers as in sys-usb, but when I start it, it doesn’t work; Qubes shows an error warning.
To test whether OBS Studio works in HVM, I decided to install OBS Studio in the default template that sys-usb uses. I removed the minimal-usbvm option from the Services tab in sys-usb settings, and put 6 GB of RAM without any balancing. When I start OBS, I don’t need to attach the USB sound card because it’s already on sys-usb—and the microphone worked well.
There were some spikes, but they were rare. This also happens on normal Ubuntu outside Qubes. I did this only to test whether there was some kind of latency when using the USB sound card with the microphone in a paravirtualized VM.
My diagnosis is: using a paravirtualized VM and attaching a USB sound card causes latency or something similar that degrades the audio.
The solution to use OBS Studio with the microphone working fully would be to use an HVM AppVM with USB controllers enabled for the obs-studio AppVM—but it gives an error!
Maybe there’s a configuration where USB controllers can be enabled for sys-usb that is HVM and for other AppVMs also in HVM.
It’s not safe to use sys-usb with OBS Studio to use the microphone like this! And sys-usb goes offline, so using voice chat via WhatsApp in sys-usb, for example, is impractical because it stays offline! Use sys-usb online is not safe!
Someone help me please!