OVERHEAD

Prevent auto-switching to HDMI audio devices after waking from suspension

Linux

Have you ever noticed an “HDMI Audio” device switching its audio profile away from Off, after you wake up a suspended Linux system (which uses the pipewire-pulse package)? Well, here’s the fix for that annoying issue:

  1. Create a config file at the path: ~/.config/pipewire/pipewire-pulse.conf.d/disable-hdmi.conf.
  2. Insert the following content into the config:

The disable-hdmi.conf config for loading the module-switch-on-connect Pulseaudio module with the blocklist=hdmi option.

pulse.cmd = [
    { cmd = "load-module" args = "module-switch-on-connect blocklist=hdmi" flags = [ ] }
]

Read the ‘Pulseaudio Modules’ documentation for more information about handling them generally.

The page about the module-switch-on-connect module implies that blocklist=hdmi is already the default option when loading the module-switch-on-connect with this config, but, I’d argue it’s better for clarity to be explicit here.