[pulseaudio-discuss] Device fallback priority

Georg Chini georg at chini.tk
Sun Apr 12 09:48:59 UTC 2020

On 11.04.20 22:29, Daniel wrote:
> Hello,
> I have 2 alsa devices in my system, card 0 is my Nvidia graphics card
> for HDMI Audio output, card 1 is my internal onboard audio. I prefer
> the HDMI Audio via my Nvidia card and setting this as default device
> works just fine.
> When I now add another audio device like via USB or Bluetooth, its
> sink becomes default, and this is quite what I want, so this is fine.
> But when I now disconnect this device again, the new default sink
> always is my internal audio instead of the HDMI audio.
> How can I get the system to fall back to my HDMI Audio after the
> active sink gets unavailable? Can I set priorities manually in
> default.pa or similar?
> The modules module-default-device-restore, module-device-restore,
> module-stream-restore and module-card-restore are loaded. If one of
> these is supposed to do this job, does that need some manual
> configuration? If yes, how?
> I'm running Ubuntu 19.10 64-bit. I already deleted ~.config/pulse and
> restarted pulseaudio to make sure there are no unwanted settings in my
> pulse db files. The file .config/pulse/[id]-default-sink correctly
> contains the HDMI sink in the format of the output below.
> $ pactl info
> Server String: /run/user/1000/pulse/native
> Library Protocol Version: 33
> Server Protocol Version: 33
> Is Local: yes
> Client Index: 8
> Tile Size: 65472
> User Name: daniel
> Host Name: windseeker
> Server Name: pulseaudio
> Server Version: 13.0
> Default Sample Specification: s16le 2ch 44100Hz
> Default Channel Map: front-left,front-right
> Default Sink: alsa_output.pci-0000_01_00.1.hdmi-stereo
> Default Source: alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
> Cookie: b87b:c3cd
> $ pactl list sinks short
> 1       alsa_output.pci-0000_00_1b.0.analog-stereo
> module-alsa-card.c      s16le 2ch 44100Hz       IDLE
> 4       alsa_output.pci-0000_01_00.1.hdmi-stereo
> module-alsa-card.c      s16le 2ch 44100Hz       IDLE
> Thank you and best regards,
> Daniel
The short answer is: You can't achieve what you want, at least not
by tweaking the configuration.

What you could try to do is write a script that catches default sink changes
(for example by parsing the output of "pactl subscribe") and switches to 
when necessary.

The feature you are requesting is one of the things that we plan to 
We need to remember the user defined default sink when one of the routing
modules changes the default sink so that we can fall back to the 
original sink
once the temporary default sink disappears.


More information about the pulseaudio-discuss mailing list