I'm running Ubuntu 22.04 with bspwm. On each boot, I have to re-specify my sink with pactl set-default-sink 0 to get HDMI sound working.

Here's the list of my sinks:

$ pacmd list-sinks | grep -e 'name:' -e 'index:'
    index: 0
    name: <alsa_output.pci-0000_00_1f.3.hdmi-stereo>
  * index: 1
    name: <alsa_output.usb-Generic_USB_Audio-00.iec958-stereo>

I have tried putting the pactl set-default-sink 0 command in my .bspwmrc but it doesn't produce the same result as running it once OS has fully booted.

I have also tried editing /etc/pulse/default.pa and adding:

set-default-sink 0


set-default-sink alsa_output.pci-0000_00_1f.3.hdmi-stereo

These manage to initially set the correct sink, but revert back to the wrong one within a few seconds once OS is loaded.

If I had to guess, this is probably some power saving issue, or some service rewriting the defaults. Any thoughts?

  • I believe the user can also have pulse audio settings which are loaded upon login, e.g. in /home/$USER/.config/pulse and /home/$USER/pulse but also in gsettings. Could this be the reason why the setting is changed? (Perhaps try to log in with a different, "clean" user.)
    – Ned64
    Jun 4, 2022 at 11:28
  • This is a clean new install. I don't have ~/pulse but do have ~/.config/pulse and files in there seems to have been generated on boot and on volume change, etc. Also opening gnome-control-center for sound crashes, so can't really change gsettings either.
    – d9ngle
    Jun 4, 2022 at 12:32

1 Answer 1


I do not like workarounds but here is one that works (util I find a better solution): Add the pactl set default sink command in startup applications.

  • Open the application "Startup Applications"
  • Click on "Add"
  • Give your startup item a name
  • Add:
    pactl set-default-sink 'Your-Device-Name'
  • Click on "Add".

Your default audio device will be set on each boot and as such be persistent. If you want to change the default device simply edit the device name in startup applications command.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .