Fully solved, at least for a given scenario, I can use online meeting software in my appvms. It took me 3 full days.
Summary is here. This does not cover too many details, and you are welcome to make it more complete.
This mainly apply to using Intel Tiger Lake Audio Controller on Qubes R4.1.
-
Bootstrap
sys-audio
according to Setting up an audio VM - #24 by hamenarin .
Most detail is similar, while the template VM ofsys-audio
may need more work.
The template VM ofsys-audio
start fromfedora-34-xfce
, and installqubes-audio-daemon
,qubes-core-admin-client
; for better debugging I suggest installingstrace
gdb
busybox
pulseaudio-utils
but they does not seem necessary.
Note that the post did not mention that one should manually configure PCI Passthrough for theaudio device. Also, step 7 in the mentioned post does not seem necessary in R4.1 now sinceqvm-start-daemon
startup on boot automatically now.
Also,/etc/qubes/policy.d/50-sys-audio.policy
need more rules than what the post mentions. Add them in later steps until you do not see complaint fromsys-audio
. -
Edit
/etc/xdg/autostart/qubes-pulseaudio
.start-pulseaudio-with-vchan
is an app that is only useful for client VMs, not for asys-audio
. Let’s hack and editstart-pulseaudio-with-vchan
intopulseaudio
.
Yes, nakedpulseaudio
with no arguments.
Note thatpulseaudio
andpacat-simple-vchan
all write their log by default in~/.xsession-errors
, in case you need it. -
/etc/pulse/default.pa
is the config file that a nakedpulseaudio
command uses.
Look at this part
### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-null-sink
#load-module module-pipe-sink
### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif
Uncomment the upper part and comment the lower part (load audio drivers statically, not automatically)
Also load-module module-alsa-source device=hw:1,0
the device=...
part should be deleted. The final result of the above part should be:
load-module module-alsa-sink
load-module module-alsa-source
load-module module-null-sink
load-module module-pipe-sink
- wait for the patch of https://github.com/QubesOS/qubes-issues/issues/7288
- or, recompile a version of
pacat-simple-vchan
by yourself - or, like me, kill the original
pacat-simple-vchan
and hack thebind()
argument with gdb byb bind; r; p *(short*)$rsi=1; c
when manually runningpacat-simple-vchan
with correct arguments
-
Above initialized the template for
sys-audio
. The kernel version ofsys-audio
does not seem to matter, as both default and latest versions seem good. -
Set audiovm of other VMs. In dom0:
qubes-prefs default_audiovm ''
qvm-prefs appvmneedingaudio audiovm sys-audio
-
Make sure that the headset is plugged and start
sys-audio
-
Run
pavucontrol
insys-audio
and speak to see whether input device works; you should hear fromparole /usr/share/sounds/alsa/Front_Center.wav
. If input device and output device do not work insidesys-audio
, you need to try better; otherwise congratulations and you can continue to the last step -
Run your appvm needing audio. In dom0 pass mic to your appvm, and if
pulseaudio agent not running
error message appears, check out step 4 in this post. When mic has been passed, your appvm should be able to play sounds and record from mic. Congratulations.
Note that I can only make it work when I plug my headphone, and I did not test whether restarting some of VMs or suspension makes the sound work. However I believe this is a good start.