HDMI audio auto-switch?

Is there some kind of command-line magic that will force audio through HDMI when an HDMI cable is connected, but otherwise play through the computer speakers? I have to manually switch it under the SOUND menu right now, but it would be way more convenient, you know, if I didn’t have to. :stuck_out_tongue:


I recommend Indicator-Sound-Switcher. It’s not automatic. But, it makes switching audio outputs a second’s job.

However, the very latest version is, by all accounts, a bit rubbish. So, I am using the last but one version

You can download it from here and then load and install it with gdebi:


Then run this command immediately

sudo apt-mark hold indicator-sound-switcher

The above command will stop indicator sound switcher from being updated to the latest (in my opinion problematic and inferior) version whenever you run an update/upgrade to your system.

See below for a video of it in use:

1 Like

Thank you, I will give this a try :slight_smile: