Audio qube

Not sure how I missed it (used fd and rg ) but you just need to make
/var/lib/bluetooth persistent

1 Like

hello, how can I get the DispVM to load in sys-audio

You need to configure the ā€œaudiovmā€ of your DispVM template

Hello! Thank you for providing this helpful guide!

I’m currently at the step where I’m trying to play audio using the command:

aplay /usr/share/sounds/alsa/Noise.wav

However, I’m not hearing any sound from the speakers on my 2024 GPD Max 2 laptop. I suspect the issue might be related to the devices connected to the qube.

In dom0, everything was functioning well, except for a few issues when I plugged in a USB headset and used it in a Firefox VM. I encountered problems with adjusting the audio levels and muting(using the onboard keyboard with i3wm) the headset, which is why I’m exploring the sys-audio path now.

I did a test with the USB headset, using sys-usb to sys-audio, and running the same command

aplay /usr/share/sounds/alsa/Noise.wav

seems to work fine. I believe the next step is to address the policy settings, but my primary concern is that the laptop speakers are not functioning.

Initially, I attempted to add other devices to sys-audio, but I encountered an error that prevented sys-audio from starting. It indicated that the device was in use by sys-usb:

sys-audio: Start failed: Requested operation is not valid: PCI device 0000:64:00.3 is in use by driver xenlight, domain sys-usb, see /var/log/libvirt/libxl/libxl-driver.log

I think I’ve seen this issue mentioned in other threads, but I’m not quite sure how to resolve it.

In some of your discussions, you suggested that it might be beneficial to keep sys-usb as sys-audio as well. Should I consider that option, or is there something else I should try first?

Thank you for your guidance!

Sorry, didn’t understood everything.
USB headphone work, but internal speaker doesn’t work ?
Have you identified the PCI device responsible for internal speaker ? it is correctly assigned to sys-audio ?

Well, for now I don’t know if the usb device works properly with other vms yet, but the internal speakers don’t work.
I am not sure which is the device I have to assign plus when I have assigned other devices I had the error above.

Can you provide the result of ā€œlspciā€ in dom0, or a screenshot of the available pci devices and pci devices currently passed to sys-audio ?

And the error above is because the PCI device you try to pass to sys-audio is already in use by sys-usb. So you would need to shutdown sys-usb and remove this pci device from sys-usb. (Or merge sys-usb and sys-audio)

I have a similar issue.
I created an audio-vm and it worked great initially. After a reboot (and any subsequent reboot) I would get my hdmi audio out as an audio device in my sys-audio qube, but my intel audio device would not show. If I would shutdown sys-net, sys-firewall, sys-audio and sys-usb, then restarted them, it would should up (granted, it may take a random number of restarts of all of those qubes until it would show).

my audio devices:

00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X]

For now, unless I want bluetooth audio, I just no longer use sys-audio and use the ā€œstandardā€ audio subsystem in qubes.

here is the dom0

lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14e8
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Device 14e9
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14ea
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14ea
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14ee
00:02.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14ee
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14ee
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14ea
00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14ea
00:04.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 19h USB4/Thunderbolt PCIe tunnel
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14ea
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14eb
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14eb
00:08.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14eb
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 71)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f7
01:00.0 Network controller: Intel Corporation Wi-Fi 6 AX210/AX211/AX411 160MHz (rev 1a)
02:00.0 SD Host controller: Genesys Logic, Inc GL9755 SD Host Controller (rev 01)
03:00.0 Non-Volatile memory controller: KIOXIA Corporation Device 002a (rev 01)
64:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 1900 (rev 01)
64:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
64:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 19h (Model 74h) CCP/PSP 3.0 Device
64:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15b9
64:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15ba
64:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller
65:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Device 14ec
65:00.1 Signal processing controller: Advanced Micro Devices, Inc. [AMD] AMD IPU Device
66:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Device 14ec
66:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15c0
66:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15c1
66:00.6 USB controller: Advanced Micro Devices, Inc. [AMD] Pink Sardine USB4/Thunderbolt NHI controller #2

the sys-audio:

 lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)
00:04.0 VGA compatible controller: Device 1234:1111 (rev 02)
00:05.0 USB controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 10)
00:06.0 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Radeon High Definition Audio Controller [Rembrandt/Strix]

Something a bit peculiar, on sys-usb seem to be assigned only usb devices, no audio.

Maybe your internal speaker is integrated into your screen and manager by your GPU ? Try to passthrough just 64:00.1.

If you can’t passthrough 64:00.1 you could define the audiovm of sys-audio to be dom0 and that way to use internal speaker you use the ā€œqubes virtual audioā€ in sys-audio.
A better alternative would be to passthrough all the iGPU to a sys-gui, but that could be very challenging to do (Or impossible depending on your hardware)

To me, it sound like your hardware have a shitty iommu handling, and afaik, there is no solution to that (maybe you could have luck by upgrading your bios). You can also try the ā€œno-strict-resetā€ flag.
And the alternative would be to keep sys-audio for everything that work on your computer, and set the audiovm of sys-audio to be dom0 so dom0 could handle the things that you hardware cannot handle in sys-audio.
(You could also try the same technique used for GPU passthrough (the PCI hiding part in ā€œGRUB modificationā€ Create a Gaming HVM) )

I’m sorry I thought it would be showing on the lspci.
The only device that is assigned now on sys-audio is the 64:00.1.
The 64:00.6 is the one that was giving the error above and it didn’t let the vm to start. I tried setting for sys-audio the audiovm as dom0 and it does finally work!
Thank a lot, I will keep following the guide, and if I have another issue I will repost!

I don’t think there is a good reason to have 64:00.6 attached to sys-usb. I would remove it from sys-usb and assign it to sys-audio

hmm, how should I be able to do that? In the configuration of the sys-usb it doesn’t show under devices as one ā€œalways connected to this qubeā€.

On another note, I still have issues with the usb device (headphones) not following the shortcuts of lowering down/up or muting audio.

That would make sense. My BIOS etc. is fully updated so I have no hope going that route :frowning:
I do have no-strict-reset on the audio devices.
If I do use the HDMI for audio output, I get some weird popping noise that is inconsistent but I have not yet taken time to figure out.

I will give what you suggested a shot. Thank you @neowutran .

An update on some issues I am experiencing currently with sys-audio.
Using usb connected headphones (with their microphone) sys-audio doesn’t seem to work properly.
I have tried using them on firefox and chromium for video calls using jitsi and other platforms and every time I have to attach as usb device to the firefox/ chromium appvm for them to work, but I cannot adjust the volume doing it that way.
If instead I attach the headphones using sys-usb to sys-audio the microphone doesn’t seem to work properly and most of the time not even the headphones.

With the current guide the audio should pass as qubes virtual audio source and that source should be in the sys-audio the usb attached headphones?

I want to revert the changes made using this guide. What is the default_audiovm on a fresh qubes os installation? dom0? sys-usb?

dom0

Great guide, only one issue with bluetooth there’s a weird sound every 30 seconds or so. I tried many solutions but still. But I like the idea of having a qube for only audio

I don’t have it.
After changing profile to hiaudio sound is clear and no interruptions or lags.
Only thing is that after connecting and changing profile sound is wery loud.
And after disconnection I need to remove device from paired othervise would need to restart sys-audio