I made a new post here and received a response with the solution:
Someone can correct me if I am wrong on any of this, but here is my thinking of Bluetooth and the Librem 14:
If you want to use the built-in Wifi-Bluetooth module for Bluetooth audio in a sys-audio qube, then you will have to have the device attached to the sys-audio qube. There are a few options here:
attach built-in Wifi-Bluetooth to sys-net and use as sys-audio too (one sys-* qube used for both sys-net and sys-audio functions)
attach built-in Wifi-Bluetooth to sys-net and use USB Bluetooth device for sys-audio
attach built-in Wifi-Bluetooth to sys-audio and use USB Wifi device for sys-net
One thing to consider is that the built-in Wifi-Bluetooth module does not need any drivers installed in order to use the Wifi, but you would need to install a non-free driver in order to use the Bluetooth.
I made a few attempts to get the built-in Bluetooth to work, but I decided to wait and see if anyone else ends up making a good write-up. Bluetooth is not very important to me, but I would be interested in understanding how to use it if the need ever does arise.
Also, I have split my Wifi and Ethernet networking devices into two separate service qubes: sys-net and sys-wifi. You may want to consider whether you want/need your Wifi and Ethernet in the same service qube.
I almost forgot to mention that I use debian-minimal templates for all my service qubes, and you could as well. There is no need for Fedora if you do not want to use it. That is one of the best things about QubesOS: Choice.
@dom0, thank you for the info on the mic. I managed to get it working on my comms qube.
The second option you wrote about peaked my interest. I believe in that case I would have to install the Bluetooth binary blob on sys-net, as it is the qube with the “hardware” attached to, and once the USB Bluetooth becames available on Qubes Device manager attach it to sys-audio. Unfortunately, it will be a couple of weeks before I’ll have time to tinker around with that, but I have it on my ToDo list now.
I understand that using non-free binary blob is not a good idea but I’ve become quite attached to my headset. I use it pretty much all the time, as the noise canceling is surprisingly good, making the sound crystal clear. (as you can see I’ve really grown attached to it )
I have thought about splitting my WiFi and Ethernet devices, but I plan on adding a sys-vpn qube and in that case I would have to either make 2 of them and connect one to each networking qube or keep switching the networking qube on sys-vpn. Neither option really appeal to me, but I have been thinking about it as I need at least one qube connected in the open (netflix…).
If you don’t mind me asking, why do you pick debian-minimal for your service qubes instead of fedora-minimal? My choice, if it can be called that, was essentially laziness as I left it on the default one.
There are a few reasons why I prefer Debian-minimal templates:
Debian has fewer updates than Fedora, and so I do not need to change my templates as often.
AppVMs based on minimal templates startup and shutdown faster.
Debian-minimal templates seem to take up slightly less space than Fedora-minimal templates.
I am more familiar with Debian commands.
As for the splitting of Wifi and Ethernet, I made some launcher scripts in my Panel to set any or all firewall and VPN qubes to use either Wifi or Ethernet. This allows me to switch things up on-the-fly, and I can have Whonix through Ethernet and Clearnet or VPN through Wifi, or vice versa. I just wanted to share some ideas, in case you had not considered it yet. There are lots of options available to you.
If you get Bluetooth working, it would be nice if you could share your experience here or in a new post.
OK, I know this thread is from August. but everywhere else points me to it as being the “best” sys-audio minimal template setup thread.
I am completely unable to get sys-audio to see my soundcard. Other qubes are sending it sound; I can see the playback trying to happen, but my output is “Dummy Output.” So I think there’s only one missing piece of the puzzle, and that’s the sound card.
sudo alsactl init simply returns alsactl: init:1759: No soundcards found...
The audiovm service is there, the soundcard is properly added as a device to sys-audio.
sudo qvm-start-daemon --all --watch simply says:
sys-audio: GUI connected to dom0. Skipping sys-audio: AUDIO connected to None. Skipping
Unless I make sys-audio the audiovm of sys-audio, then it reports:
sys-audio: GUI connected to dom0. Skipping.
sys-audio: Starting AUDIO
Loopback vchan connection not supported
libvchan_client_init: No such file or directory
My attempts to “autostart” pulseaudio and the daemon with those desktop files, by the way, failed; pulseaudio has to be manually started, and the daemon may or may not have started. (This time, it didn’t). EDIT–This is fixed
with the exception of alsactl init, all of the alsa commands pointed to in this thread result in command not found, even though they are installed according to apt-get. That is true whether or not I run them as sudo.
I imagine you’ll want more info; please let me know what’s still missing. Thank you in advance.
If you have opted for a disposable sys-audio, then I would recommend testing my hypothesis. I did this by starting sys-audio and using the pavucontrol package to check if “Dummy Output” changed to “Built-in Audio Analog Stereo” or not. If not, shutdown sys-audio and try again. If your sys-audio is non-disposable, then it might be unpredictable like my experience.
Hopefully this is helpful. Otherwise, maybe someone else could share their experiences.
I basically gave up on debian minimal for this at some point then spent another big long thread trying to get fedora to work (NOT my preference but they seemed to be having better luck with it), with the same result–my machine would pretend to play music, but nothing would come out of my speakers because sys-audio wouldn’t recognize my device. At this point, basically my debian-based sys-audio is long gone.
Nevertheless I tried cycling both a disposable and non-disposable version of that template like you talked about here…with zero success.
It’s just as well, honestly. If I have to do that every time I start it, it’s a broken piece of junk I don’t want on my system. Assuming I went with the disposable, how long would it be before my audio quit working because now it needs to be cycled 5 times instead of 3?
If it won’t work the first time it comes up, it’s crap.
EDIT TO ADD: Recreated my deb11 minimal stuff…same result. No amount of repetition will find the driver I seem to be missing.
Ok, I finally resolved the hardware part (making pulseaudio recognize my soundcard).
After a clean installation as post #2, only root has access to audio. You can identify that by running alsamixer and pulseaudio as root, and see the differences from running them as user. To fix this, you need to remove pulseaudio in the template, and reinstall those removed packages. This will make everything happy.
BTW, just a notice, gnome-keyring isn’t necessary for this setup.
After following the steps in post #2, you’ll get a sys-audio which correctly receives audio streams from other qubes, but cannot play sound. The reason is that after all of these, in sys-audio , only root has the privilege to talk to the soundcard. So the regular pulseaudio instance running as user doesn’t know your soundcard.
To make the regular user user have access to the soundcard, you have to shutdown sys-audio, boot up its template, remove pulseaudio, and reinstall those removed packages. After this, pulseaudio running as user will see your soundcard in Output devices.
What “removed packages”? Pulseaudio itself? That’s just one package, I think. (And even if so…I am not sure I can do an apt-install except with sudo.)
Thank you for your patience.
[next task for someone…you? me, if this works for me? Figure out how to install it properly the first time. Ideally this could be done in salt, somehow, without a special go-back-and-fix-it sequence that must be done manually. I have a couple of VMs that have such requirements (e.g. a printer driver that apparently must be configured manually, likewise with a couple of browser qubes) and I really don’t like it.]
Well I don’t want to go too far into the weeds, here, but the printer driver installs fine, but it must be run–with its gui–to tell it what printer to connect to–I’ve never found a command line method (that doesn’t require interaction) for it. I just have to remember, when regenerating all of my minimal templates, that after generating THAT one (all of the two dozen or so subsequent templates are derived from it) I need to run the configuration. After that, it works fine.
Not trying to solve that problem here, I was just giving examples of things that I can’t automate, as much as I would like to, whilst hoping this doesn’t get added to the list.
Not sure why you brought up bluetooth; I just want to play music and videos.
When you remove pulseaudio, there are some packages depending on it that will also be removed. I didn’t mention all of them, because I’m not sure which package is the vital one. It’s easy for you to know and copy the list of packages to be removed when running apt remove xxx, then key-in apt install and paste that list.
It depends on how you run this command. If you manage the qube through Qubes Manager’s open a console in the qube, you will be able to login as root and ignore that sudo. There are certainly other ways that require a sudo to work. You have to distill the crucial information, and adapt those insignificant part to your own use case.
Ok…so I went into my template, did a sudo apt remove on pulseaudio. I then did a sudo apt install on all of the packages.
I shut down the template and started pavucontrol in sys-audio. It showed the output device as “Dummy output.”
OK, so that didn’t work.
I repeated the above process, only in the template xterm I did “su” to become root and did not do sudo; I just did apt remove and apt install. After shutting down the template and restarting pavucontrol in sys-audio…same result, output is “Dummy Output.”
Trying to “open a console in the qube” in Qube Manager simply starts up a disposable which shows me a blank terminal with no prompt. It’s not running on the template. (So what is it good for?)
In any case, I’m stuck. Please instead of expecting me to play a guessing game as to how to reinstall the thing, just tell me the command(s) you used that would install the thing not as root.
Install pavucontrol pulseaudio qubes-core-admin-client qubes-gui-daemon-pulseaudio pulseaudio-qubeswith--no-install-recommends.
3.1. Remove pulseaudio through apt. Note that some other packages are also removed. Copy the list of removed packages in the terminal.
3.2 Install those removed packages whose names were copied, including pulseaudio.
Create a file at /etc/modprobe.d/, name it 50-snd.conf, and put options snd_hda_intel power_save=0 in it. Shutdown the template.
Create a appvm named sys-audio based on deb11-audio. Assign your PCI audio devices to it. Configure them to be no-strict-reset.
Create 50-sys-audio.policy in dom0 at /etc/qubes/policy.d/, enter those policy lines at #2.
In Qubes-Settings of sys-audio, turn to “Services” page, Add a (custom…) service called “audiovm”.
Run qubes-prefs default_audiovm sys-audio. Boot up sys-audio.
At this point, you have a working sys-audio. Any newly started qube is using sys-audio as its audio sink. You can start a new disposable and play music in it.
To adjust volume:
Run pavucontrol in a terminal in sys-audio. You’ll have a graphical interface to do adjust the volume.
To enable bluetooth:
See @dom0’s detailed guide.
Please note that if you are using a wireless card that also provides bluetooth, then the bluetooth device might appear in the Device Widget as a strange string of numbers, for example, 8087_2345.
To enable shortcut adjusting volume:
Add a shortcut based on your desktop environment (Xfce, KDE, etc.) to run the command qvm-run sys-audio 'amixer sset Master 2%+', which will turn up the volume.
Add a shortcut based on your desktop environment (Xfce, KDE, etc.) to run the command qvm-run sys-audio 'amixer sset Master 2%-', which will turn down the volume.
Add a shortcut based on your desktop environment (Xfce, KDE, etc.) to run the command qvm-run sys-audio 'amixer sset Master toggle', which will toggle the audio between muted and unmuted.
The shortcut can be the default Fn+F1/2/3 combinations. For KDE, no further config is required. For Xfce4, you might have to disable some audio related services in dom0, in order that your shortcut is correctly passed to sys-audio. That part is beyond this post and will not be discussed.