Arch Linux – MacBookPro Retina – Digital Audio LED

source: http://nocodenolife.com/blog/2015/03/12/running-arch-linux-on-a-macbook-pro-retina-mid-2014/

arch-apple_logoMacBookPro Retina has the digital out on by default – resulting in a red LED that is on from the headphones/line out/D.out port (MBP 13 2014 – left side).

This can be disables with alsa-tools.

pacman -S alsa-tools

To DISABLE digital out LED (Setting holds only for current session):

hda-verb /dev/snd/hwC1D0 0x21 SET_PIN_WID 0x00

To ENABLE digital out LED (Setting holds only for current session):

hda-verb /dev/snd/hwC1D0 0x21 SET_PIN_WID 0x40

Creating a systemd service to run at every boot.

sudo nano /etc/systemd/system/macbook-audio-led-fix.service

Service file content:

[Unit]
Description="Disables digital audio LED on macbook."

[Service]
Type=oneshot
ExecStart=/usr/bin/hda-verb /dev/snd/hwC1D0 0x21 SET_PIN_WID 0x00
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Start the service manually:

systemctl start macbook-audio-led-fix.service

Start automatically at startup:

systemctl enable macbook-audio-led-fix.service