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:

Cheers!

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:

http://ppa.launchpad.net/yktooo/ppa/ubuntu/pool/main/i/indicator-sound-switcher/indicator-sound-switcher_1.2.2ubuntu0-gtk3ppa0-1_all.deb

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: