But running the first command sudo qubesctl top.enable sys-audio in dom0 shows a huge 3-screen-size exceptions output, probably telling that sys-audio.top file was not found or something.
I hope this command did not break anything already.
I think it can be wrong. I am not sure, that USB devices are possible to attach persistently, because I get error, that only pci and block can be attached persistently. Qubes OS R4.3.
Is this note correct?
If it is not correct, what should be the recommended approach to attach automatically on boot then?
Just in case anyone else was scratching their head about the RPC policies: admin.* API calls actually use different semantics for the columns. From Introducing the Qubes Admin API | Qubes OS :
we would like to say that a given VM can invoke certain Admin API calls only for specific AppVMs and cannot touch other sets of AppVMs.
To make this finer-grained policing possible, we need a simple trick: the destination argument for all Admin API calls should be interpreted on a slightly higher level than the qrexec protocol level
I’ve not seen this mentioned anywhere, but it’s a critical step for enabling pulseaudio to use the sound card in sys-audio based on a debian-12-minimal template.
Due to /dev/snd being writable only by the audio group and pulseaudio running with user privileges, the user must be added to the audio group in the sys-audio template:
sudo usermod -aG audio "$USER"
Without this, aplay -l and pacmd list-cards (both without sudo) will report no cards being detected and pavucontrol will only show a Dummy Output; even tho at the same time everything will seem fine in /proc/asound/* and dmesg will report no errors.
I could also find some older forum posts which reported this problem, without a solution; so it’s probably not obvious to many users. @neowutran could you please add this note to your original post?
I haven’t tried yet to use a Debian template to create this audio VM. I would need to try and write all the differences with Fedora. For the moment only Fedora is supported by this guide. But if you write a small paragraph listing the differences between Fedora and Debian I can add it
That is impossible, that is not how it work.
sys-audio handle all the audio processing of the qube configured with the correct audiovm parameter.
If the physical microphone is attached to sys-audio, sys-audio will always have access to the microphone. “dom0:mic” is virtual, not physical, basically it say “audiovm of XXXX, you can send the input stream to XXXX”
If, for some reason, you really want the microphone to be only available in the qube “toto”, you need to assign the physical device to “toto”, and not configuring “toto” as a audiovm. But this guide is not here for that.
Thanks.
Existing implementation of audio qube is much better then handle audio by dom0, I while look how can I improve it according to my needs.
My threat model request that, last week I have look back and investigate offline image of compromised dom0 past installation where journalctl wasn’t wiped - it look like same sophisticated and unclear set of events started by crash of sound service end in RCE activity in dom0.
I don’t have github account to react for your request, but agree that your or team implementation of audiovm should be part of future default QubesOS configuration.
Do you maybe have any idea, how to get the mute and micmuted lights to work on the keyboard in combination with the sys-audio vm? (I’ve managed the volume up/down/mute stuff with wpctl commands in my i3 config, but the muted light stays permanently on, which was different with dom0 as the audiovm.
Thanks for all insight/thoughts on that!
NB: this could be further simplified by tweaking the pre-installed salt states, I will submit a PR. Also, pre-installed salt states are missing some policies (cf. Audio qube - #363 by mattmccutchen).
It seems that there is a new issue (at least for me) where qubes using the audio qube will rapidly appear and disappear under the playback menu, and no audio can be heard.
I was able to resolve this by simply restoring to a backup of my audio template. So I assume this is a Fedora issue. Hopefully it gets resolved soon.