Hi, I would like to configure a minimal template for sys-audio instead of the default fedora-34-xfce.
I installed qubes-core-agent-usb , qubes-core-admin-client , and pulseaudio-gui-daemon-qubes,alsa-utils,pavucontrol in deb11-audio, which was a clone of debian-11-mimnimal, and changed the pre-configured sys-audio’s template to deb11-audio. I’m happy to see audio streams coming from other qubes in pavucontrol .
However, I couldn’t use any physical audio device, including my soundcard (Realtek ALC257) and USB headset. They simply didn’t appear in “Output Devices” section in pavucontrol. Also, in alsamixer, there’s no soundcard available except the dummy output.
I thought there might be a driver problem, so I installed firmware-linux. Sadly, it didn’t help.
I compared dmesg output of sys-audio based on fedora-34-xfce and deb11-audio, only to find there’s hardly any difference in the audio part. My soundcard is most likely initialized correctly.
Note that perhaps not all of these lines are needed. But these are sufficient.
Then run qubes-prefs default_audiovm sys-audio in dom0.
In Qubes-Settings of sys-audio, turn to “Services” page, “Add” a “(custom…)” service called “audiovm”.
Start sys-audio, make pulseaudio autostart in it.
Also add qvm-start-daemon --all --watch to autostart.
(These two actions may or may not be necessary.)
Then it works like magic.
If you encounter problem with your soundcard, try these: sudo alsactl init in sys-audio.
Make a file called “snd.conf” in deb11-min-audio at /etc/modprobe.d/, add the line options snd_hda_intel power_save=0
Is the sys-audio able to use as disposable vm/ If yes, is there any difference in 50-sys-audiio.policy?
Also, how much memory did you put on sys-audio? Did you modify your sound card PCI device int sys-audio?
Personally I haven’t tried to use it as disposable, however I don’t think it’s impossible to do so.
You just need to make a sys-usb-like qube. Since there’s no VM name changes in this process, perhaps you don’t need to care about policies.
Remeber to make those autostart config persistent.
I put 500MB on it, just arbitrary.
I didn’t modify my soundcard in sys-audio. Just a conf in modprobe.d to avoid the scratchy sound issue.
I think I express my problem wrongly. I mean, did you make pci passthrough to sys-audio? Just like you have to make your NIC passthrough to your sys-net. btw thanks for your information.
No problem. Certainly I need to passthrough my sound card to sys-audio. On my PC, I assigned those devices whose names start with “Audio:”. I also need to disable pci strict reset for those. All in Qube-settings GUI tool.
I’ve followed your work: install packages, create sys-audio, edit policy, add pci device, and run qubes-prefs. I haven’t add qvm-start-daemon --all --watch as I don’t know how to “add”.
however suffer in this situation:
I try to play music(download) and videos(websites) in different disps with different templates but not successful. Both of the video and music’s progress time bar are stuck.
For example, when I start a downloaded music on music player, it will not have any progress, stuck in 0:00, when I move the “point” to 1;27, then it will stuck in 1:27. In website, it is in same situation.
I’ve ran sudo alsactl init in sys-audio and it shows:
alsa-lib parsor.c:260:(error_node) UCM is not supported for this HDA model (HDA Intel PCH at 0xf2110000 irq 67)
alsa- lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -6
Found hardware: "HDA-Intel" "Realtek ALC256" "HDA:10ec0256,10ec1200,00100002" "0x10ec" "0x1200"
Hardware is initialized using generic method
I haven’t make snd.conf yet as I don’t know should it be consider as soundcard problem. Sorry for disturbing.
Do you see streams coming from other qubes in sysaudio?
To check this simply take a look at the “Playback” section of pavucontrol in sys-audio.
My problem (the first post of this thread) was nearly the same to yours. Maybe my solutions are suitable for your problems.
You can try to install alsa-firmware-loaders and reboot, rerun alsactl init alsactl restore
as root.
Also, install alsa-ucm-conf and see.
To have a working setup, you need to see “Output Devices” in pavucontrol.
As long as it’s something dummy or mono, it’s your soundcard problem. Make that conf.
Regarding qvm-start-daemon --all --watch, you can see those Ref links.
No, in sys-audio’s “Playback” section, only shows “System Sounds”.
I’ve installed alsa-fimware-loaders and run alsactl restore but shows the same error.
The alsa-ucm-conf was already installed. And now I made the snd.conf on template. But still, the dom0’s pavucontrol shows “Dummy Output”.
Ok, the “Playback” problem can be that your daemon is not running.
Manually run qvm-start-daemon --all --watch in sys-audio.
Dummy output in dom0 is expected as your soundcard has been assigned to your sys-audio from dom0. See if in sys-audio is also dummy output.
After some trying, I find that although the sys-audio does detect my device (when I plug in my earphones), still the music and videos will not play.
As you said, I also think that the problem is that I don’t have run daemon. However when I tried to run qvm-start-daemon --all --watch, it seems that doesn’t works normally, because it only shows what qvm-start-daemon --help also shows.
ran sudo alsactl ... and made snd.conf on template
Passthrough audio PCI device with “no strict reset”
ran qvm-start-daemon --all --watch in both sys-audio and dom0 (It is unnecessary to ran on dom0, right?)
“Add” a “custom” sevice named “audiovm” in “Settings: sys-audio”
Here’s my situation:
All of the vm’s music and video stopped running
I try to play music(download) and videos(websites) in different disps with different templates but not successful. Both of the video and music’s progress time bar are stuck.
For example, when I start a downloaded music on music player, it will not have any progress, stuck in 0:00, when I move the “point” to 1;27, then it will stuck in 1:27. In website, it is in same situation.
I notice that my headphones does passthrough to sys-audio, as the pavucontrol of sys-audio can “sense” my headphones plugged in or not.
when I tried to run qvm-start-daemon --all --watch in sys-audio, it shows: Segmentation fault (core dumped), when run in root in sys-audio, shows