My laptop runs Arch Linux. Arch Linux targets people who want a simple and customisable system. A simple and customisable system doesn't pre-empt what you want to happen when you (dis)connect a HDMI cable.
This how-to (which also appears here) will help you set up HDMI hotplugging. The result will be that when you connect a HDMI cable, you will immediately get HDMI audio output, and when you disconnect the cable, your default settings will automatically be restored.
aplay -lyou obtain,
**** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0
We will work through three basic steps:
For non-standard set-ups, ALSA will refer to one of two different configuration files,
/etc/asound.conf, as explained
here. We will keep two different
configuration files, and symbolically link
/etc/asound.conf to the correct file.
We will keep the configuration files in
Create that directory if it doesn't exist yet:
[[ -d /etc/alsa/ ]] || sudo mkdir -v /etc/alsa/
Place the following two files in
Also place the following script in
has execute permisions, then test it with both the cable plugged in and not plugged in.
Ensure the script successfully modifies your ALSA configuration before proceeding.
Place the following file in
hdmi.rules. Make udev start using the new
rule straight away by running:
Voila! Revel in your new hotpluggable HDMI audio goodness.
sudo udevadm control --reload-rules
Last updated Friday, 25 October 2013.
Copyright Tim Rice 2013.
Disclaimer: The content and style of this website are the responsibility of Tim Rice. They do not represent the views, policies or opinions of The University of Melbourne, which is a very serious institution that takes itself seriously. Only a few animals were harmed in the construction of this website. One, two, a dozen, who's counting?