The best currently existing Guide about how to create and use audio qube (sys-audio) is made by @neowutran and available here:
Currently no proper guide exists on how to create and use sys-audio (AudioVM) in R4.1/R4.2.
Qubes OS Documentation does not have a single article about it.
Qubes Community Documentations also has nothing at all about it.
So many people are trying to create sys-audio qube to listen to Bluetooth headphones and almost nothing helps or guides them except several forum topics which are mess: full of different information combined with useless, outdated or random messages on different topics. Almost nobody can set sys-audio to work properly in full.
So, I am asking people who is savvy enough or/and have a properly working sys-audio to:
Provide a detailed, up-to-date step-by-step guide how to create and set a sys-audio qube for having sound in it from the very beginning. Majority of steps should have an explanation of what (and why) is happening and how to test that the result of the step is right (check with aplay, reboot and check processes, look for something in pavucontrol and etc).
Explain how exactly the sound data should be moved by qubes tools by design for future Qubes OS versions that will include sys-audio be default similar to how sys-usb is used nowadays.
Provide a guide how to use Bluetooth headphones in this sys-audio qube to play sound in headphones.
Provide a guide how to make the sound work in Windows qubes too (currently this topic is even messier, some patches of qemu and etc).
Let’s hope that someone (or multiple users) will try to do this important job for the greater good of others. It will be very appreciated.
I can make such guides myself but currently I am not able to set sys-audio for myself, facing multiple issues and lack of straight-forward information on the topic.
Links to information on the topic that I think can be useful
The response is by far not overwhelming, so maybe I overestimated the struggle of Qubes OS users with sys-audio and Bluetooth headphones.
P.S. I managed to reroute sound of usual qube to Bluetooth headphones that are connected to sys-audio using device from sys-usb. On Thinkpad T16 Gen 1. There are a couple of places that I still do not understand fully, though.
That, and perhaps tagging/listing a bunch of users in hopes that one might fulfill your request, may not be the best approach, also taking into consideration the amount of resources that are required.
Although your request was well structured and some research was made, a better approach could be to start doing it yourself and ask when you need help. Users may be more inclined to reply to smaller requests.
Having said that, what are the places that you still not fully understand?
Well, actually it’s more than a couple of places.
Let’s say I have sys-audio and test-qube with a audiovm set to sys-audio. I have no PCI devices in sys-audio, removed it in qubes’s settings, keeping it for dom0. I start sys-audio first and test-qube second.
Why pavucontrol does not reliably show volume bar from test-qube (almost never) before I reboot both qubes like 5 times? How to diagnose this issue and make it work? I see some users reboot sys-audio 3 (sic) times each PC boot to make it work, it’s awful.
Why after the first start sys-audio I have sound output from it (testing by aplay /usr/share/sounds/alsa/Front_Center.wav) though dom0 but after reboot of sys-audio it stops outputing sound like that? How to diagnose this issue? I would want to work it preferably the way it works on first boot - with a dom0 fallback in case I disconnect headphones.
Why do I still have errors and warnings as popup notifications about policies on qubes starts and bluetooth usb device passing? I added a lot of recommended lines from random guides to policies, but still some errors and warning are present. What warning even mean? I understand errors with denied resources, but warnings? How to diagnose, fix and make only the required amount. So many questions.
Why passing bluetooth device from sys-usb was not working with default fedora-36 template and I also had temporary change is to fedora-36-xfce? Maybe something should be added? I changed kernel of qubes to 6.* hoping it should fix things but it did not. The define should be supported with default kernel (5.12.* or later) as I found on some Intel page.
How passing volume is suppose to be working? Changing volume inside sys-audio only via some third-party custom scripts or is there any logic in Qubes OS that is intended for that?
According to reports on forum - other people have it too. Right now I rebooted and pavucontrol in sys-audio (which iautor-starts on boot of the system) shows no bars for qubes that have it as audiovm. Should it be like that? What is the order of qubes to run, does it matter? How to diagnose? No information.
Are you sure allow policies can conflict?
I added recommended ones, well, “recommended”, because there is not proper guide, nor documentation.
And what is a good way to diagnose if there is no documentation?
No, it’s not a PCI device, but USB from sys-usb. And kernel has drivers as I told you above. Even the old one that goes with Qubes OS, but I tried a new one too. Messages from sudo dmesg are not providing useful information to me.
How? What should be changed, what is expected design by Qubes OS, does Qubes OS has something in mind on this matter (I suppose yes, according to policies)?
And why would you write a message like that, it has no actual information to add to my previous post and links I provided. Of course I can make some shortcuts to some commands, I mentioned it in my message (did not read?).
Another sys-audio thread is becoming a clutter that is not possible to read for other users. Sorry.
Why do you want that? You can ask sys-audio to also handle your stereo speakers, and that’s recommended since it’s more flexible.
The information is all there, just need someone to gather. I recently did a reinstall and configured sys-audio in one go, without any troubleshooting. The information in my thread is at least enough to make an ALC257 work flawlessly with sys-audio.
The reason I don’t do the gathering myself is, I cannot edit the original post that was marked as solution, because it was posted too long ago. And I don’t think reposting the same bulk of information everywhere is a humble action. You may encounter different issues based on your hardware specs, and I don’t think I’m skilled enough to build a bullet-proof solution for sys-audio.
My idea was to allow all qubes to work with speaker/jack-headphones, but others with bluetooth output. And even without bluetooth headphones those qubes will still play sound in usual way (but via sys-audio). If these feature is not supported then OK, it’s not a requirement, I just mentioned it. It just is not clear why rebooting of sys-audio changes behavior (it should not, imho).
While I still wonder what the issue is, I have found that Bluetooth audio is a nice workaround, as documented here:
I would like to respond to this comment below:
I do not think that developers owe me or anyone an explanation on this issue. I share your desire to know the cause, but it is not their responsibility to identify it.
As I mentioned in the linked comment above, I think that the cause lies with the hardware itself. Hopefully someone from Purism can identify the cause of the issue someday, but since sys-audio is still a relatively new part of Qubes OS and is optional, I do not expect much investigation to be had anytime soon. I also think that I am probably the only person experiencing this issue, and it is not very important to me. I am very happy with my Qubes OS setup as it is.
I greatly appreciate the work being done by the developers of Qubes OS and other free software projects, and I think we need to remember that we are the beneficiaries of their free labor.