It used to be that I could just open the audio panel, and sound would work again. But I did a fresh install of Qubes on the same laptop, and that “workaround” no longer works.
I searched around these forums and GitHub looking for a command to just “restart” the audio services to fix this issue, but I didn’t find one.
What I did find, is that I can tail -f ~/.xsession-errors in dom0, and I get a flood of errors about audio streams starting & underrunning over-and-over
I’m not asking for how to fix this long-term. I’m asking: how can I just restart all the audio-related services (and in which VM) to try to work around this issue when it happens.
Update: I found that I have choppy audio when I play a video in mpv, but not in vlc.
This command plays the video with the problematic “choppy” audio
user@host:$ mpv video.mp4
I can get a list of audio devices with the --audio-device=help command
user@host:$ mpv --audio-device=help
List of detected audio devices:
'auto' (Autoselect device)
'pipewire' (Default (pipewire))
'pipewire/qubes-sink' (Qubes Virtual Audio Sink)
'pulse/qubes-sink' (Qubes Virtual Audio Sink)
'alsa' (Default (alsa))
'alsa/lavrate' (Rate Converter Plugin Using Libav/FFmpeg Library)
'alsa/samplerate' (Rate Converter Plugin Using Samplerate Library)
'alsa/speexrate' (Rate Converter Plugin Using Speex Resampler)
'alsa/jack' (JACK Audio Connection Kit)
'alsa/oss' (Open Sound System)
'alsa/speex' (Plugin using Speex DSP (resample, agc, denoise, echo, dereverb))
'alsa/upmix' (Plugin for channel upmix (4,6,8))
'alsa/vdownmix' (Plugin for channel downmix (stereo) with a simple spacialization)
'jack' (Default (jack))
'sdl' (Default (sdl))
user@host:$
And, if I select the “pipewire” audio device, then I still have the problematic “choppy” audio
user@host:$ mpv video.mp4 --audio-device=pipewire
If, however, I select the alsa audio device, then the audio plays much, much better
user@host:$ mpv video.mp4 --audio-device=alsa
I don’t know the difference between pipewire or alsa, but I guess what I need to know is the commands to “reset” pipewire (and on which VM to execute this)
Especially the first one has exact same solution as yours. Don’t know why these stuttering audio glitches appear, and whether it is being solved. Might be more apparent on low-end machines. Might be memory leakage problem on some audio services (cumulative over use time & “suspend to RAM - wake up” solves the issue). Anyways, I suspect the issue being on QubesOS’ side.
Thanks for sharing your issue @maltfield. I have the very same issue. Today, after some trial and error, I was able to solve it by resetting the device manually in the audio panel. Specifically:
going to the Audio applet in the right upper corner
selecting the Audio Mixer…
clicking the “Configuration” tab; here I had 2 controllers, both [xxx] HD Audio controllers; the 1st had Profile set “Off” and the 2nd was on ‘Analog Stereo Duplex’
for the 2nd controller, I changed the ‘Profile’ from “Analog Stero Duplex” to “Off”–which stopped off the audio–THEN clicked BACK to “Analog Stero Duplex” and the audio was fixed
I don’t know how to write the script for this in dom0 terminal (anyone?), but I hopes this helps you and others. At least I hope it’s a faster fix than suspending to RAM and back.