Recently, I upgraded both Whonix qorkstation and gateway templates through Qubes Template Manager.
Result: no audio when playing videos in qubes based on Whonix Workstation (neither in Tor Browser, nor in VLC).
Looking at journalctl -f both in dom0 and domUs while trying this shows nothing interesting in dom0. In the domU I see these 2 lines when starting the video in Tor Browser:
[ 3762.297220] dom0 kernel: loop: Write error at byte offset 709730304, length 4096.
[ 3762.297232] dom0 kernel: I/O error, dev loop8, sector 1386192 op 0x1:(WRITE) flags 0x8800 phys_seg 2 prio class 2
... # repeats 8-9 times
VMs based on other templates (e.g. Debian 12, using pulseaudio-qubes, not pipewire) play audio just fine. The pipewire service and socket are active and running in dom0. There are no pulseaudio services in dom0.
IIUC, this is an issue with pipewire (I still can’t figure what exactly). Perhaps uninstalling pipewire and installing pulseaudio would fix it. I tried that in the AppVM but nothing changed.
I guess you have pulseaudio instead of pipewire in your Debian 12 minimal template.
And in Whonix Workstation you have pipewire but not all required packages installed.
The fix for missing pipewire packages in Whonix Workstation is not yet in stable repository so I think you’ll need to install the missing packages in your Whonix Workstation template manually:
Try to install them in a cloned Whonix Workstation template.
Maybe these packages need to be present during boot. Or maybe you need to restart some services after installing the packages.
I have the same symptoms with tor browser videos before + after installing those packages in a workstation template. I think this was working a few weeks back, but couldn’t swear to it.
Installed alsa-utils to test with speaker-test:
[workstation user ~]% speaker-test
speaker-test 1.2.8
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM default
Playback open error: -2,No such file or directory
zsh: exit 1 speaker-test
Following other forum threads here with that error didn’t turn anything up for me.
I’m using a separate sys-audio, and the dispvm does register in the volume control there. It wasn’t moving to sys-audio that broke this.
Fedora 34 [will be switching to PipeWire], which brings security and functionality improvements.
Motivation
Linux has no unified framework for exchanging multimedia content between applications or even devices. In most cases, developers realized that a user-space daemon is needed to make this possible:
For video content, we typically rely on the compositor to render our data.
For video capture, we usually go directly to the hardware devices, with all security implications and inflexible routing that this brings.
For consumer audio, we use PulseAudio to manage and mix multiple streams from clients.
For Pro audio, we use JACK to manage the graph of nodes.
None of these solutions (except perhaps to some extent Wayland) however were designed to support the security features that are required when dealing with flatpaks or other containerized applications. PipeWire aims to solve this problem and provides a unified framework to run both consumer and pro audio as well as video capture and processing in a secure way.
Linux has no unified framework for exchanging multimedia content between applications or even devices. In most cases, developers realized that a user-space daemon is needed to make this possible:
For video content, we typically rely on the compositor to render our data.
For video capture, we usually go directly to the hardware devices, with all security implications and inflexible routing that this brings.
For consumer audio, we use PulseAudio to manage and mix multiple streams from clients.
For Pro audio, we use JACK to manage the graph of nodes.
None of these solutions (except perhaps to some extent Wayland) however were designed to support the security features that are required when dealing with flatpaks or other containerized applications. PipeWire aims to solve this problem and provides a unified framework to run both consumer and pro audio as well as video capture and processing in a secure way.