<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Alessandro&#39;s blog</title>
    <subtitle>A place to share stuff. Maybe tech tips, maybe opinions, maybe not.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://www.aggro.it/blog/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://www.aggro.it/blog"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-10-30T00:00:00+00:00</updated>
    <id>https://www.aggro.it/blog/atom.xml</id>
    <entry xml:lang="en">
        <title>Using an external sound card in Qubes OS 4.3</title>
        <published>2026-10-30T00:00:00+00:00</published>
        <updated>2026-10-30T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://www.aggro.it/blog/blog/qubes-usb-sound-card/"/>
        <id>https://www.aggro.it/blog/blog/qubes-usb-sound-card/</id>
        
        <content type="html" xml:base="https://www.aggro.it/blog/blog/qubes-usb-sound-card/">&lt;h2 id=&quot;disclaimer&quot;&gt;Disclaimer&lt;/h2&gt;
&lt;p&gt;Claude was used to debug problems and to help write this article. Despite this, the content has been proof-read and tested by yours truly.&lt;/p&gt;
&lt;p&gt;If for some reason you believe shared AI authorship takes value away from this post, please feel under no obligation to read or follow its contents.&lt;/p&gt;
&lt;h2 id=&quot;overview&quot;&gt;Overview&lt;/h2&gt;
&lt;p&gt;This guide is the result of my efforts to try and make my USB sound card work under Qubes. Unfortunately, by default, Qubes only supports one audio card which stays attached to the dom0.&lt;/p&gt;
&lt;p&gt;These instructions take you from a default Qubes setup to one with a special audio qube (sys-audio), that manages both the integrated audio chip and the USB one(s).&lt;/p&gt;
&lt;p&gt;The end state: &lt;code&gt;sys-audio&lt;/code&gt; owns the internal PCI sound card permanently and receives the USB sound card automatically whenever it is plugged in. PipeWire inside &lt;code&gt;sys-audio&lt;/code&gt; switches playback to the USB card when it appears and falls back to the internal card when it is unplugged. App qubes never notice.&lt;/p&gt;
&lt;p&gt;Only &lt;code&gt;sys-audio&lt;/code&gt; touches sound hardware; dom0 hands over the internal card at boot and &lt;code&gt;sys-usb&lt;/code&gt; passes the USB card through on each plug.&lt;/p&gt;
&lt;p&gt;Written for Qubes OS 4.3 (dom0 on Fedora 41) with the &lt;code&gt;debian-13-minimal&lt;/code&gt; template. Commands marked &lt;strong&gt;dom0&lt;/strong&gt; run in a dom0 terminal; commands marked &lt;strong&gt;template&lt;/strong&gt; or &lt;strong&gt;sys-audio&lt;/strong&gt; run in that qube.&lt;/p&gt;
&lt;p&gt;What you trade:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;dom0 no longer plays sound itself. Volume control moves to a tray icon from &lt;code&gt;sys-audio&lt;/code&gt; and rebound volume keys (Step 8).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sys-usb&lt;/code&gt; and dom0 stay out of the audio path. dom0 never touches the USB card.&lt;/li&gt;
&lt;li&gt;The USB card&#39;s audio travels through the Qubes USB proxy from &lt;code&gt;sys-usb&lt;/code&gt; to &lt;code&gt;sys-audio&lt;/code&gt;. Some cards crackle this way at high sample rates. Test yours early (Step 6).&lt;/li&gt;
&lt;li&gt;Qubes already running when &lt;code&gt;sys-audio&lt;/code&gt; starts get no sound until restarted, so &lt;code&gt;sys-audio&lt;/code&gt; autostarts at boot.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before you start: back up, and keep a dom0 terminal open. Everything here is reversible; the rollback is at the end.&lt;/p&gt;
&lt;h2 id=&quot;step-1-build-the-audio-template&quot;&gt;Step 1: Build the audio template&lt;/h2&gt;
&lt;p&gt;Clone a fresh minimal template so your other qubes are untouched.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-template&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; install debian-13-minimal&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;      # skip if already installed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-clone&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; debian-13-minimal deb13-audio&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-run&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -u&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; root deb13-audio xterm&lt;/span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt; &amp;amp;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Minimal templates have no passwordless sudo, which is why the shell above runs as root.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;template (root xterm in deb13-audio):&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;apt&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; update&lt;/span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; apt&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; full-upgrade&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -y&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;apt&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -y \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;  pipewire-qubes qubes-audio-daemon qubes-core-admin-client qubes-usb-proxy&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;  pipewire pipewire-pulse pipewire-alsa wireplumber pulseaudio-utils&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;  alsa-utils alsa-ucm-conf pavucontrol pasystray&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# pipewire-alsa routes ALSA tools (aplay, speaker-test) through PipeWire,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# so they follow the same default output as everything else&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What each group is for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pipewire-qubes&lt;/code&gt;, &lt;code&gt;qubes-audio-daemon&lt;/code&gt;: receive audio streams from other qubes.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;qubes-core-admin-client&lt;/code&gt;: lets &lt;code&gt;sys-audio&lt;/code&gt; see which qubes exist and start their audio connections.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;qubes-usb-proxy&lt;/code&gt;: required to receive the USB card from &lt;code&gt;sys-usb&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pipewire-pulse&lt;/code&gt;, &lt;code&gt;wireplumber&lt;/code&gt;, &lt;code&gt;pulseaudio-utils&lt;/code&gt;: the sound server, its session manager, and &lt;code&gt;pactl&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pavucontrol&lt;/code&gt;, &lt;code&gt;pasystray&lt;/code&gt;: mixer window and tray icon.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If apt reports a conflict between &lt;code&gt;pulseaudio&lt;/code&gt; and &lt;code&gt;pipewire-*&lt;/code&gt;, remove &lt;code&gt;pulseaudio&lt;/code&gt; but keep &lt;code&gt;qubes-audio-daemon&lt;/code&gt;. If apt wants to remove &lt;code&gt;qubes-audio-daemon&lt;/code&gt; too, stop and check the Audio qube forum guide for the current workaround.&lt;/p&gt;
&lt;p&gt;Stop speaker pops caused by the internal card&#39;s power saving:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;options snd_hda_intel power_save=0&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; /etc/modprobe.d/50-snd.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Recent Intel laptops often need Sound Open Firmware. If the internal card later shows no outputs, enable the &lt;code&gt;non-free-firmware&lt;/code&gt; component in &lt;code&gt;/etc/apt/sources.list.d/&lt;/code&gt; and &lt;code&gt;apt install firmware-sof-signed&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Shut the template down when done.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-shutdown&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --wait&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; deb13-audio&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;step-2-create-the-sys-audio-qube&quot;&gt;Step 2: Create the sys-audio qube&lt;/h2&gt;
&lt;p&gt;Use a regular app qube, not a disposable, so mixer settings and the tray autostart persist.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-create&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --class&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; AppVM&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --template&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; deb13-audio&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --label&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; red sys-audio&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-prefs&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio netvm &amp;#39;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;           # no network needed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-prefs&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio virt_mode hvm&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;      # required for PCI passthrough&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-prefs&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio memory&lt;/span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-prefs&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio maxmem&lt;/span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;           # turns off memory balancing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-prefs&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio autostart True&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-prefs&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio audiovm &amp;#39;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;         # it plays its own sound locally&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-service&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio audiovm on&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;       # marks it as an audio qube&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The same settings exist in &lt;strong&gt;Qube Settings&lt;/strong&gt;: Basic (template, networking, autostart), Advanced (HVM mode, memory, untick memory balancing), Services (add &lt;code&gt;audiovm&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Don&#39;t start it yet.&lt;/p&gt;
&lt;h2 id=&quot;step-3-give-the-internal-sound-card-to-sys-audio&quot;&gt;Step 3: Give the internal sound card to sys-audio&lt;/h2&gt;
&lt;p&gt;This takes three parts: pick the right device, assign it, and stop dom0 from grabbing it at boot.&lt;/p&gt;
&lt;h3 id=&quot;3a-find-the-audio-controller&quot;&gt;3a. Find the audio controller&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-pci&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; list&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; grep&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -iE&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;audio|multimedia&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;lspci&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -nn&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; grep&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -iE&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;audio|multimedia&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;      # same devices, with bus addresses and classes&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You want the line that is an &lt;strong&gt;Audio device&lt;/strong&gt; (class &lt;code&gt;[0403]&lt;/code&gt;) driving the speakers and headphone jack. Never assign a &lt;strong&gt;PCI bridge&lt;/strong&gt; (class &lt;code&gt;[0604]&lt;/code&gt;); see the troubleshooting section if &lt;code&gt;sys-audio&lt;/code&gt; reports a non-endpoint device.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Intel:&lt;/strong&gt; usually one ID such as &lt;code&gt;dom0:00_1f.3&lt;/code&gt;. Assign only that function; leave the other &lt;code&gt;00:1f.x&lt;/code&gt; functions (ISA bridge, SMBus, SPI) in dom0.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AMD:&lt;/strong&gt; audio sits behind a bridge, and Qubes 4.3 shows the path in the ID, e.g. &lt;code&gt;dom0:00_08.1-00_00.6&lt;/code&gt;. There are usually three functions: &lt;code&gt;.6&lt;/code&gt; is the HD Audio Controller (assign it), &lt;code&gt;.5&lt;/code&gt; is the Audio Coprocessor that often runs the built-in digital mics (assign only if you want the internal mic), &lt;code&gt;.1&lt;/code&gt; is the GPU&#39;s HDMI audio (leave in dom0).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;3b-assign-it&quot;&gt;3b. Assign it&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-pci&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; assign&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --required -o&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; no-strict-reset=True sys-audio dom0:00_1f.3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# AMD example:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# qvm-pci assign --required -o no-strict-reset=True sys-audio dom0:00_08.1-00_00.6&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# qvm-pci assign --required -o no-strict-reset=True sys-audio dom0:00_08.1-00_00.5   # optional, internal mic&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;no-strict-reset&lt;/code&gt; is needed on most laptops. Onboard audio usually can&#39;t be reset on its own, and on AMD it shares a bus with the integrated GPU, which dom0 always uses, so a bus reset is never possible. It means the card isn&#39;t wiped between qubes, which matters little here because only &lt;code&gt;sys-audio&lt;/code&gt; ever uses it. On a desktop where it isn&#39;t needed, you can try without it first.&lt;/p&gt;
&lt;h3 id=&quot;3c-hide-the-card-from-dom0-at-boot&quot;&gt;3c. Hide the card from dom0 at boot&lt;/h3&gt;
&lt;p&gt;Otherwise dom0&#39;s sound driver claims the card first and &lt;code&gt;sys-audio&lt;/code&gt; fails to start because the device is in use. Take the bus address from the &lt;code&gt;lspci&lt;/code&gt; output (e.g. &lt;code&gt;00:1f.3&lt;/code&gt; on Intel, &lt;code&gt;c1:00.6&lt;/code&gt; on AMD, not the Qubes path ID).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt; edit &lt;code&gt;/etc/default/grub&lt;/code&gt; as root. In the &lt;code&gt;GRUB_CMDLINE_LINUX&lt;/code&gt; line there is usually already an &lt;code&gt;rd.qubes.hide_pci=&lt;/code&gt; list holding your USB controllers. Append the audio address(es) to that same list with commas; don&#39;t add a second &lt;code&gt;rd.qubes.hide_pci=&lt;/code&gt; entry:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# before: rd.qubes.hide_pci=&amp;lt;existing USB controller entries&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# after:  rd.qubes.hide_pci=&amp;lt;existing USB controller entries&amp;gt;,c1:00.6,c1:00.5&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Keep the existing entries exactly as they are: they are your USB controllers, hidden so &lt;code&gt;sys-usb&lt;/code&gt; gets them. You only append. If there is no &lt;code&gt;rd.qubes.hide_pci&lt;/code&gt; yet, add one with just the audio addresses.&lt;/p&gt;
&lt;p&gt;Then regenerate the boot configuration:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; grub2-mkconfig&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -o&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; /boot/grub2/grub.cfg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The reboot in Step 5 applies it. If you leave out the coprocessor later, remove its address from this list too.&lt;/p&gt;
&lt;h2 id=&quot;step-4-allow-sys-audio-to-see-its-client-qubes&quot;&gt;Step 4: Allow sys-audio to see its client qubes&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;sys-audio&lt;/code&gt; must query dom0 for which qubes use it, their state and their audio features. Qubes tags every qube whose audio qube is &lt;code&gt;sys-audio&lt;/code&gt; with &lt;code&gt;audiovm-sys-audio&lt;/code&gt; automatically; the policy grants read access to those qubes only.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; tee /etc/qubes/policy.d/50-sys-audio.policy&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; /dev/null&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span&gt;&amp;#39;EOF&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.Events          *  sys-audio  sys-audio               allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.Events          *  sys-audio  @adminvm                allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.Events          *  sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.CurrentState *  sys-audio  @adminvm                allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.CurrentState *  sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.List         *  sys-audio  @adminvm                allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.List         *  sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.property.Get +audiovm     sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.property.Get +xid         sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.property.Get +stubdom_xid sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.property.Get +virt_mode   sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.property.Get +klass       sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.property.Get +is_preload  sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.feature.CheckWithTemplate +audio                      sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.feature.CheckWithTemplate +audio-model                sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.feature.CheckWithTemplate +supported-service.pipewire sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.feature.CheckWithTemplate +audio-low-latency          sys-audio  @tag:audiovm-sys-audio  allow target=dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;# silence harmless requests it doesn&amp;#39;t need&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.feature.CheckWithTemplate +gui  sys-audio  @tag:audiovm-sys-audio  deny notify=no&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;admin.vm.property.GetAll           *     sys-audio  @tag:audiovm-sys-audio  deny notify=no&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EOF&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This follows the current community &lt;a rel=&quot;external&quot; href=&quot;https://forum.qubes-os.org/t/audio-qube/20685&quot;&gt;Audio qube guide&lt;/a&gt; for 4.3, including later fixes from its thread. If you see policy-denied notifications mentioning &lt;code&gt;sys-audio&lt;/code&gt; after Step 5, the notification names the missing call; add an &lt;code&gt;allow&lt;/code&gt; line for it in the same style.&lt;/p&gt;
&lt;h2 id=&quot;step-5-switch-the-system-to-sys-audio-and-reboot&quot;&gt;Step 5: Switch the system to sys-audio and reboot&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qubes-prefs&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; default_audiovm sys-audio&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check for qubes that override the default, for example ones you set to &lt;code&gt;dom0&lt;/code&gt; earlier:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-ls&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --raw-data --fields&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; NAME,AUDIOVM&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-prefs&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --default&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;qub&lt;/span&gt;&lt;span&gt;e&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; audiovm&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;     # reset an override to the default&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reboot the machine. A reboot hands the internal card cleanly from dom0 to &lt;code&gt;sys-audio&lt;/code&gt; and autostarts &lt;code&gt;sys-audio&lt;/code&gt; early in boot, so qubes you open afterwards connect to it.&lt;/p&gt;
&lt;p&gt;After login, play a sound in any app qube. It should come out of the laptop speakers or headphone jack, now via &lt;code&gt;sys-audio&lt;/code&gt;. Don&#39;t continue until this works; the troubleshooting section covers the usual causes.&lt;/p&gt;
&lt;h2 id=&quot;step-6-auto-attach-the-usb-sound-card&quot;&gt;Step 6: Auto-attach the USB sound card&lt;/h2&gt;
&lt;p&gt;Qubes 4.3 assignments do this natively. A plain assignment (without &lt;code&gt;--required&lt;/code&gt;) attaches the card whenever it appears and never blocks &lt;code&gt;sys-audio&lt;/code&gt; from booting if &lt;code&gt;sys-usb&lt;/code&gt; or the card is missing.&lt;/p&gt;
&lt;p&gt;Plug the card in, then in &lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-usb&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                                          # note its ID, e.g. sys-usb:2-1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-usb&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; assign&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --device&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio sys-usb:2-1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;--device&lt;/code&gt; matches the card&#39;s identity (vendor, product, serial) on any port. Use &lt;code&gt;--port&lt;/code&gt; instead to attach whatever is plugged into that one port. Add &lt;code&gt;--ask&lt;/code&gt; if you want a confirmation prompt before each attach.&lt;/p&gt;
&lt;p&gt;Unplug and re-plug the card, then confirm:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-usb&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; list&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -s&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                                  # -s adds assignments to the listing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-run&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio &amp;#39;pactl list short sinks&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    # an alsa_output.usb-... sink appears&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;How to read &lt;code&gt;qvm-usb&lt;/code&gt;: the first column always starts with &lt;code&gt;sys-usb:&lt;/code&gt; because it names where the device comes from, not where it is attached. That never changes. Look at the column on the right instead: it should show &lt;code&gt;sys-audio&lt;/code&gt; once the card is attached, and with &lt;code&gt;-s&lt;/code&gt; an asterisk (&lt;code&gt;*sys-audio&lt;/code&gt;) marks the assignment.&lt;/p&gt;
&lt;p&gt;Now test quality before relying on it: play music for a few minutes through the USB card, at the sample rate you normally use. If it crackles or drops out over the USB proxy, try a lower sample rate in Step 7 before giving up on the setup.&lt;/p&gt;
&lt;p&gt;To undo: &lt;code&gt;qvm-usb unassign --device sys-audio sys-usb:2-1&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;make-sys-audio-start-after-sys-usb&quot;&gt;Make sys-audio start after sys-usb&lt;/h3&gt;
&lt;p&gt;With a USB assignment in place, Qubes tries to auto-attach the card the moment &lt;code&gt;sys-audio&lt;/code&gt; starts, which needs &lt;code&gt;sys-usb&lt;/code&gt; to be fully up. At boot both autostart together, so &lt;code&gt;sys-audio&lt;/code&gt; can fail with &lt;code&gt;Start failed: (2, &#39;No such file or directory&#39;)&lt;/code&gt; while a manual &lt;code&gt;qvm-start&lt;/code&gt; later works. Order the two autostart units:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; list-units &amp;#39;qubes-vm@*&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;      # both qubes-vm@sys-usb and qubes-vm@sys-audio should be listed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; mkdir&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; /etc/systemd/system/qubes-vm@sys-audio.service.d&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;printf&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;[Unit]\nAfter=qubes-vm@sys-usb.service\n&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;  sudo&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; tee /etc/systemd/system/qubes-vm@sys-audio.service.d/after-sys-usb.conf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; systemctl daemon-reload&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;qubes-vm@sys-usb&lt;/code&gt; only counts as finished once &lt;code&gt;sys-usb&lt;/code&gt; is fully started, qrexec included.&lt;/p&gt;
&lt;h2 id=&quot;step-7-make-pipewire-prefer-the-usb-card&quot;&gt;Step 7: Make PipeWire prefer the USB card&lt;/h2&gt;
&lt;p&gt;WirePlumber picks the default output by priority and by what you last chose. Raising the USB card&#39;s priority makes it win whenever it is present, and the internal card takes over when it disappears. Settings in &lt;code&gt;sys-audio&lt;/code&gt;&#39;s home folder persist across reboots.&lt;/p&gt;
&lt;p&gt;Open a terminal in sys-audio from &lt;strong&gt;dom0:&lt;/strong&gt; &lt;code&gt;qvm-run sys-audio xterm &amp;amp;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;sys-audio:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ~/.config/wireplumber/wireplumber.conf.d&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;cat&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ~/.config/wireplumber/wireplumber.conf.d/51-prefer-usb.conf&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span&gt;&amp;#39;EOF&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;monitor.alsa.rules = [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;  {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    matches = [ { node.name = &amp;quot;~alsa_output.usb-.*&amp;quot; } ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    actions = { update-props = { priority.session = 2000, priority.driver = 2000 } }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EOF&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --user&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; restart wireplumber pipewire pipewire-pulse&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then set the USB card as default once, so the remembered choice and the priority agree. Run &lt;code&gt;wpctl status&lt;/code&gt;, find the USB card&#39;s number under &lt;strong&gt;Audio → Sinks&lt;/strong&gt;, and run &lt;code&gt;wpctl set-default &amp;lt;number&amp;gt;&lt;/code&gt;. WirePlumber remembers this across reboots and replugs. Ticking the card as fallback in &lt;code&gt;pavucontrol&lt;/code&gt; (Output Devices tab) does the same.&lt;/p&gt;
&lt;p&gt;Check with &lt;code&gt;wpctl status&lt;/code&gt;: the asterisk under Sinks marks the current default. Unplug the card and it moves to the internal card within a second or two; plug it back and it returns.&lt;/p&gt;
&lt;p&gt;Two things that look wrong but aren&#39;t:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pactl list short sinks&lt;/code&gt; shows both cards as &lt;code&gt;SUSPENDED&lt;/code&gt;. PipeWire suspends any output that is idle; it switches to &lt;code&gt;RUNNING&lt;/code&gt; as soon as something plays.&lt;/li&gt;
&lt;li&gt;To test inside &lt;code&gt;sys-audio&lt;/code&gt;, use &lt;code&gt;pw-play /usr/share/sounds/alsa/Front_Center.wav&lt;/code&gt; or &lt;code&gt;paplay&lt;/code&gt; rather than &lt;code&gt;speaker-test&lt;/code&gt;. Without &lt;code&gt;pipewire-alsa&lt;/code&gt;, &lt;code&gt;speaker-test&lt;/code&gt; bypasses PipeWire and always plays on the first hardware card. App qubes always follow the WirePlumber default, so the decisive test is playing something in an app qube.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Optional, if the USB card crackled in Step 6: fix the sample rate at 48 kHz.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ~/.config/pipewire/pipewire.conf.d&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;cat&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ~/.config/pipewire/pipewire.conf.d/10-rate.conf&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span&gt;&amp;#39;EOF&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;context.properties = {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;  default.clock.rate          = 48000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;  default.clock.allowed-rates = [ 44100 48000 ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EOF&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --user&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; restart wireplumber pipewire pipewire-pulse&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;step-8-volume-control-from-the-panel-and-keyboard&quot;&gt;Step 8: Volume control from the panel and keyboard&lt;/h2&gt;
&lt;p&gt;The dom0 XFCE volume applet now controls an output with no hardware behind it. Replace it with a tray icon from &lt;code&gt;sys-audio&lt;/code&gt; and point the volume keys at &lt;code&gt;sys-audio&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tray icon.&lt;/strong&gt; Start &lt;code&gt;pasystray&lt;/code&gt; with every boot of sys-audio.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;sys-audio:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ~/.config/autostart&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;cat&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ~/.config/autostart/pasystray.desktop&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span&gt;&amp;#39;EOF&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;[Desktop Entry]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;Type=Application&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;Name=pasystray&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;Exec=pasystray&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EOF&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Its icon appears in the dom0 panel with &lt;code&gt;sys-audio&lt;/code&gt;&#39;s red border. Left click shows volume and output choice; middle click mutes; the menu opens &lt;code&gt;pavucontrol&lt;/code&gt; for per-app volume.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remove the old applet.&lt;/strong&gt; In dom0, right-click the XFCE PulseAudio plugin → Remove. Removing it also frees the volume keys it was grabbing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Volume keys.&lt;/strong&gt; Bind the media keys to &lt;code&gt;pactl&lt;/code&gt; in sys-audio. &lt;code&gt;@DEFAULT_SINK@&lt;/code&gt; follows whichever card is active, so the keys control the USB card when plugged and the internal one otherwise.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;set_key&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;  xfconf-query&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -c&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; xfce4-keyboard-shortcuts&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;/commands/custom/&lt;/span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;$1&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -n -t&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;    -s&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;qvm-run -q --no-gui sys-audio &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;$2&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;set_key&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; XF86AudioRaiseVolume &amp;#39;pactl set-sink-volume @DEFAULT_SINK@ +5%&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;set_key&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; XF86AudioLowerVolume &amp;#39;pactl set-sink-volume @DEFAULT_SINK@ -5%&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;set_key&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; XF86AudioMute        &amp;#39;pactl set-sink-mute @DEFAULT_SINK@ toggle&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;set_key&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; XF86AudioMicMute     &amp;#39;pactl set-source-mute @DEFAULT_SOURCE@ toggle&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The same bindings can be made by hand in &lt;strong&gt;Settings → Keyboard → Application Shortcuts&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Microphone.&lt;/strong&gt; The internal microphone now belongs to &lt;code&gt;sys-audio&lt;/code&gt; too. Attach it to a qube from the Qubes Devices widget as before; it is listed under &lt;code&gt;sys-audio&lt;/code&gt; instead of dom0, though how the widget labels it may differ.&lt;/p&gt;
&lt;h2 id=&quot;testing-troubleshooting-and-rollback&quot;&gt;Testing, troubleshooting and rollback&lt;/h2&gt;
&lt;h3 id=&quot;final-checklist&quot;&gt;Final checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;After a cold boot, an app qube plays through the internal speakers with the USB card unplugged.&lt;/li&gt;
&lt;li&gt;Plugging the card in moves playback to it within a few seconds, without restarting anything.&lt;/li&gt;
&lt;li&gt;Unplugging moves playback back to the internal speakers.&lt;/li&gt;
&lt;li&gt;Booting with the card already plugged in sends sound to the USB card.&lt;/li&gt;
&lt;li&gt;Tray icon and volume keys control whichever card is active.&lt;/li&gt;
&lt;li&gt;A few minutes of music through the USB card play without crackles.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;/h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Symptom&lt;/th&gt;&lt;th&gt;Likely cause&lt;/th&gt;&lt;th&gt;Fix&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;No sound in a qube that was already running&lt;/td&gt;&lt;td&gt;It started before sys-audio&lt;/td&gt;&lt;td&gt;Restart that qube&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;No sound in any qube&lt;/td&gt;&lt;td&gt;Policy missing a line, or audiovm service not set&lt;/td&gt;&lt;td&gt;Check policy-denied notifications; &lt;code&gt;qvm-service sys-audio&lt;/code&gt; must list &lt;code&gt;audiovm&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;sys-audio won&#39;t start, PCI error&lt;/td&gt;&lt;td&gt;Card can&#39;t reset&lt;/td&gt;&lt;td&gt;Re-assign with &lt;code&gt;no-strict-reset=True&lt;/code&gt; (Step 3)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Only a &quot;Dummy Output&quot; in pavucontrol&lt;/td&gt;&lt;td&gt;Internal card has no driver or firmware&lt;/td&gt;&lt;td&gt;Run &lt;code&gt;aplay -l&lt;/code&gt; in sys-audio; install &lt;code&gt;firmware-sof-signed&lt;/code&gt; (Step 1)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;USB card not attached after replug&lt;/td&gt;&lt;td&gt;Assignment missing or made by port&lt;/td&gt;&lt;td&gt;&lt;code&gt;qvm-usb list -s&lt;/code&gt; shows assignments with &lt;code&gt;*&lt;/code&gt;; redo Step 6 with &lt;code&gt;--device&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;USB card attached but sound stays internal&lt;/td&gt;&lt;td&gt;Remembered default overrides priority&lt;/td&gt;&lt;td&gt;Pick USB in pavucontrol; check the rule in Step 7 matches &lt;code&gt;wpctl status&lt;/code&gt; names&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Crackling on the USB card&lt;/td&gt;&lt;td&gt;USB proxy at high sample rates&lt;/td&gt;&lt;td&gt;Fix 48 kHz (Step 7); try another USB port&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Audio drops after sys-usb restarts&lt;/td&gt;&lt;td&gt;Card detached with it&lt;/td&gt;&lt;td&gt;Should re-attach on its own; if not, replug&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Useful logs, in sys-audio: &lt;code&gt;journalctl --user -u pipewire -u wireplumber -b&lt;/code&gt; and &lt;code&gt;journalctl -b | grep -i qubes-audio&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;non-endpoint-pci-devices-cannot-be-assigned-to-guests&quot;&gt;&quot;Non-endpoint PCI devices cannot be assigned to guests&quot;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;sys-audio&lt;/code&gt; fails to start with this error when a PCI &lt;strong&gt;bridge&lt;/strong&gt; was assigned instead of the sound card itself. Xen can&#39;t pass a bridge to a qube. It is easy to do on AMD laptops, where the audio devices sit behind a bridge.&lt;/p&gt;
&lt;p&gt;Qubes 4.3 shows that path in the device ID: &lt;code&gt;dom0:00_08.1-00_00.6&lt;/code&gt; means function &lt;code&gt;00.6&lt;/code&gt; behind bridge &lt;code&gt;00:08.1&lt;/code&gt;. Assigning &lt;code&gt;dom0:00_08.1&lt;/code&gt; alone assigns the bridge.&lt;/p&gt;
&lt;p&gt;Example from a Rembrandt-era AMD laptop (&lt;code&gt;qvm-pci list -s | grep -i audio&lt;/code&gt;):&lt;/p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Device ID&lt;/th&gt;&lt;th&gt;What it is&lt;/th&gt;&lt;th&gt;Assign to sys-audio?&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;dom0:00_08.1-00_00.6&lt;/code&gt;&lt;/td&gt;&lt;td&gt;HD Audio Controller: speakers and headphone jack&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;dom0:00_08.1-00_00.5&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Audio Coprocessor (ACP): usually the built-in digital mics&lt;/td&gt;&lt;td&gt;Only if you want the internal mic in sys-audio&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;dom0:00_08.1-00_00.1&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Radeon HD Audio: HDMI/DisplayPort audio from the GPU&lt;/td&gt;&lt;td&gt;No, leave it with the GPU in dom0&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-pci&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; list&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -s&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                                            # find the line marked *sys-audio&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-pci&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; unassign sys-audio dom0:00_08.1&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                    # remove the bridge&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-pci&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; assign&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --required&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio dom0:00_08.1-00_00.6&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;   # the audio controller&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-pci&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; assign&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --required&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio dom0:00_08.1-00_00.5&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;   # optional: internal mic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-start&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To double-check a device before assigning it, run &lt;code&gt;lspci -nn -s &amp;lt;bus:dev.fn&amp;gt;&lt;/code&gt; in dom0: class &lt;code&gt;[0604]&lt;/code&gt; is a bridge, &lt;code&gt;[0403]&lt;/code&gt; or &lt;code&gt;[0401]&lt;/code&gt; is audio. If startup then fails with a reset error, re-assign with &lt;code&gt;-o no-strict-reset=True&lt;/code&gt; (Step 3).&lt;/p&gt;
&lt;h3 id=&quot;pci-reset-errors-when-starting-sys-audio&quot;&gt;PCI reset errors when starting sys-audio&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&quot;Can&#39;t reset ... active in dom0&quot; / device in use.&lt;/strong&gt; dom0&#39;s sound driver claimed the card at boot. Hide it from dom0 with &lt;code&gt;rd.qubes.hide_pci&lt;/code&gt; (Step 3c) and reboot. For a one-off test without rebooting, release it by hand in dom0:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --user&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; stop pipewire pipewire-pulse wireplumber&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; 2&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;/dev/null&lt;/span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; pulseaudio&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --kill&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; 2&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;/dev/null&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 0000:c1:00.6&lt;/span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; tee /sys/bus/pci/drivers/snd_hda_intel/unbind&lt;/span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    # your bus address&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-start&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&quot;Can&#39;t reset c1:00.5 as c1:00.6 is active on the same bus&quot;.&lt;/strong&gt; The functions share a bus (on AMD, together with the integrated GPU) and only support a whole-bus reset, which Xen won&#39;t do while anything on the bus is in use. Re-assign every audio function with &lt;code&gt;no-strict-reset&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-pci&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; unassign sys-audio dom0:00_08.1-00_00.5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-pci&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; assign&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --required -o&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; no-strict-reset=True sys-audio dom0:00_08.1-00_00.5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-pci&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; unassign sys-audio dom0:00_08.1-00_00.6&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-pci&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; assign&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --required -o&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; no-strict-reset=True sys-audio dom0:00_08.1-00_00.6&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you don&#39;t need the built-in microphone, dropping the coprocessor (&lt;code&gt;.5&lt;/code&gt;) from both the assignment and &lt;code&gt;rd.qubes.hide_pci&lt;/code&gt; is simpler.&lt;/p&gt;
&lt;h3 id=&quot;sound-plays-on-the-built-in-card-instead-of-usb&quot;&gt;Sound plays on the built-in card instead of USB&lt;/h3&gt;
&lt;p&gt;Set the USB card as default with &lt;code&gt;wpctl set-default&lt;/code&gt; and add the priority rule (Step 7). If only &lt;code&gt;speaker-test&lt;/code&gt; or &lt;code&gt;aplay&lt;/code&gt; play on the built-in card while app qubes use USB, &lt;code&gt;pipewire-alsa&lt;/code&gt; is missing from the template (Step 1).&lt;/p&gt;
&lt;h3 id=&quot;sys-audio-doesn-t-autostart-start-failed-2-no-such-file-or-directory&quot;&gt;sys-audio doesn&#39;t autostart: &quot;Start failed: (2, &#39;No such file or directory&#39;)&quot;&lt;/h3&gt;
&lt;p&gt;The qubesd log (&lt;code&gt;sudo journalctl -b -u qubesd&lt;/code&gt;) shows the qube getting as far as &lt;code&gt;Activating qube&lt;/code&gt; and then failing, while &lt;code&gt;qvm-start sys-audio&lt;/code&gt; after login works. The USB auto-attach ran before &lt;code&gt;sys-usb&lt;/code&gt;&#39;s qrexec was ready. Add the systemd ordering rule from Step 6. To confirm the cause first, unplug the card and reboot: without it, &lt;code&gt;sys-audio&lt;/code&gt; autostarts normally.&lt;/p&gt;
&lt;h3 id=&quot;rollback&quot;&gt;Rollback&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;dom0:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qubes-prefs&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; default_audiovm dom0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-usb&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; unassign&lt;/span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --device&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio sys-usb:2-1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-pci&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; unassign sys-audio dom0:00_1f.3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;qvm-prefs&lt;/span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sys-audio autostart False&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also remove the audio addresses from &lt;code&gt;rd.qubes.hide_pci&lt;/code&gt; in &lt;code&gt;/etc/default/grub&lt;/code&gt; and run &lt;code&gt;sudo grub2-mkconfig -o /boot/grub2/grub.cfg&lt;/code&gt;, or dom0 still won&#39;t see the card.&lt;/p&gt;
&lt;p&gt;Then reboot. dom0 gets its sound card back, and you can re-add the XFCE volume applet. Delete &lt;code&gt;sys-audio&lt;/code&gt;, &lt;code&gt;deb13-audio&lt;/code&gt; and the policy file once you&#39;re sure.&lt;/p&gt;
&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://forum.qubes-os.org/t/audio-qube/20685&quot;&gt;Audio qube community guide&lt;/a&gt; and its later policy fixes (&lt;a rel=&quot;external&quot; href=&quot;https://forum.qubes-os.org/t/audio-qube/20685/426&quot;&gt;#426&lt;/a&gt;, &lt;a rel=&quot;external&quot; href=&quot;https://forum.qubes-os.org/t/audio-qube/20685/479&quot;&gt;#479&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://dev.qubes-os.org/projects/core-admin-client/en/stable/manpages/qvm-device.html&quot;&gt;qvm-device manual (assign, --device, --required)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://forum.qubes-os.org/t/debian-minimal-template-for-sys-audio/11108/87&quot;&gt;Debian-minimal template for sys-audio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://www.qubes-os.org/news/2025/10/30/debian-13-templates-available/&quot;&gt;Debian 13 templates announcement&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
        
    </entry>
</feed>
