Can't play audio via Bluetooth headphones

I used the guide here to setup an audio qube which I have allowed all qubes to use except sys-net etc.

However, despite successfully connecting my Bluetooth headphones to the sys-audio qube, I am unable to play sound from another qube. Sound only seems to work in the sys-audio qube.

Did you try to run:

systemctl --user restart pipewire

In your sys-audio?

I have performed the following steps:

  1. systemctl --user restart pipewire
  2. Turned off and turned on my Bluetooth headphones
  3. Reconnected them via the Bluetooth Manager to the sys-audio qube
  4. Tried to play audio via a qube called personal. Result is I don’t hear anything though the YouTube video is playing in the Firefox browser.

P. S: Also I don’t see the personal VM in the Playback list like it appears in the original guide

What’s your sys-audio template?
Did you see any qrexec denied policy error notifications?
What’s the output of this command in your sys-audio?

ps aux | grep qvm-start-daemon

My sys-audio template is audio-app which is derived from a separate template audio-template. The process I followed is this one

Haven’t seen any policy error notifications. When I check in dom0 terminal, journalctl -f doesn’t show me anything related to that.

Output of the command:

[user@sys-audio ~]$ ps aux | grep qvm-start-daemon
user         889  0.0  0.6  33960 25884 ?        S    13:31   0:00 /usr/bin/python3 /usr/bin/qvm-start-daemon --all --watch
user       12036  0.0  0.0   3856  2048 pts/0    S+   15:24   0:00 grep --color=auto qvm-start-daemon

What template did you use to create audio-template?

fedora-39-xfce. Is there a way to find this out from the terminal of the audio-template? I no longer see it in the settings of the template and cat /etc/issue shows:

\S
Kernel \r on an \m (\l)

In dom0 terminal:

qvm-features audio-template | grep template-name

It should work.
You can try to check the journalctl in your sys-audio to see if there are any errors.

Some of the errors:

Aug 23 13:33:38 sys-audio kernel: Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
$ sudo journalctl -S '2024-08-23 00:00:00' | grep "mod.qubes-audio"
Aug 23 13:31:55 sys-audio pipewire[682]: mod.qubes-audio: no /qubes-audio-domain-xid entry in QubesDB
Aug 23 13:31:55 sys-audio pipewire[682]: mod.qubes-audio: unknown peer domain, cannot create stream
Aug 23 13:31:55 sys-audio pipewire[682]: mod.qubes-audio: unknown peer domain, cannot create stream
Aug 23 13:33:33 sys-audio pipewire[1177]: mod.qubes-audio: no /qubes-audio-domain-xid entry in QubesDB
Aug 23 13:33:33 sys-audio pipewire[1177]: mod.qubes-audio: unknown peer domain, cannot create stream
Aug 23 13:33:33 sys-audio pipewire[1177]: mod.qubes-audio: unknown peer domain, cannot create stream
Aug 23 13:36:44 sys-audio pipewire[1767]: mod.qubes-audio: no /qubes-audio-domain-xid entry in QubesDB
Aug 23 13:36:44 sys-audio pipewire[1767]: mod.qubes-audio: unknown peer domain, cannot create stream
Aug 23 13:36:44 sys-audio pipewire[1767]: mod.qubes-audio: unknown peer domain, cannot create stream
Aug 23 13:33:38 sys-audio bluetoothd[1284]: src/plugin.c:init_plugin() System does not support bap plugin
Aug 23 13:33:38 sys-audio bluetoothd[1284]: src/plugin.c:init_plugin() System does not support bass plugin
Aug 23 13:33:38 sys-audio bluetoothd[1284]: src/plugin.c:init_plugin() System does not support mcp plugin
Aug 23 13:33:38 sys-audio bluetoothd[1284]: src/plugin.c:init_plugin() System does not support vcp plugin
Aug 23 13:33:38 sys-audio bluetoothd[1284]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled
Aug 23 13:33:38 sys-audio bluetoothd[1284]: src/plugin.c:init_plugin() System does not support micp plugin
Aug 23 13:33:38 sys-audio bluetoothd[1284]: src/plugin.c:init_plugin() System does not support ccp plugin
Aug 23 13:33:38 sys-audio bluetoothd[1284]: src/plugin.c:init_plugin() System does not support csip plugin
Aug 23 13:33:38 sys-audio bluetoothd[1284]: src/plugin.c:init_plugin() System does not support asha plugin
Aug 23 13:33:53 sys-audio systemctl[1343]: Failed to connect to bus: No medium found
one systemd[672]: Finished grub-boot-success.service - Mark boot as successful.
Aug 23 13:34:04 sys-audio qubes.StartApp+blueman-manager-dom0[1367]: blueman-manager 13.34.04 ERROR    Manager:253 error_h>
Aug 23 13:34:04 sys-audio qubes.StartApp+blueman-manager-dom0[1367]: blueman-manager 13.34.04 ERROR    Manager:253 error_handler:  Authentication Rejected
Aug 23 13:34:04 sys-audio qubes.StartApp+blueman-manager-dom0[1367]: Traceback (most recent call last):
Aug 23 13:34:04 sys-audio qubes.StartApp+blueman-manager-dom0[1367]:   File "/usr/lib/python3.12/site-packages/blueman/bluez/Base.py", line 86, in callback
Aug 23 13:34:04 sys-audio qubes.StartApp+blueman-manager-dom0[1367]:     value = proxy.call_finish(result).unpack()
Aug 23 13:34:04 sys-audio qubes.StartApp+blueman-manager-dom0[1367]:             ^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 23 13:34:04 sys-audio qubes.StartApp+blueman-manager-dom0[1367]: gi.repository.GLib.GError: g-io-error-quark: GDBus.Error:org.bluez.Error.AuthenticationRejected: Authentication Rejected (36)
:
Aug 23 13:34:04 sys-audio blueman-tray[1433]: Failed to set text 'Disconnect PX7 Bowers & Wilkins' from markup due to error
 parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending
 to start an entity — escape ampersand as &
Aug 23 13:34:04 sys-audio blueman-tray[1433]: Failed to set text 'Disconnect PX7 Bowers & Wilkins' from markup due to error
 parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &

If there’s nothing else to check, I will just reset the audio preferences like so:

qubes-prefs default_audiovm ''

and remove the policy file. Will redo it from scratch and see if that fixes the problem.

One of the challenges I keep running into is making new policy files that require typing by hand a long sequence of policies. As much as I understand the security reasons behind not allowing copying to the dom0 terminal, it does make doing custom configurations a pain because of the very real possibility you may mis-type something.

Will come back and update the thread once I’ve done it from scratch. Thanks.

You can copy the hand-typed file from dom0 to the qube and then check if you’ve typed it correctly using e.g. diff command.