Make the laptop mute LED follow mute on USB, Bluetooth and HDMI outputs
omacom/omarchy#11005 (Yacl222's comments) supports the mechanism, the script verbatim, the unit settings (PartOf=wireplumber.service, Restart=always), the three verified cases and the trigger-detach gotcha, on a ThinkPad X1 Carbon 7th gen with Omarchy 4.0.4-1. Locally: XF86AudioMute is bound to omarchy-audio-output-volume mute-toggle in /usr/share/omarchy/default/hypr/bindings/media.lua, and that script runs pactl set-sink-mute "$sink" toggle on the default sink. Nothing in /usr/share/omarchy or the quattro tree references platform::mute. brightnessctl 0.5.1 and libpulse (pactl) are installed. Two precision fixes. The reporter verified a USB headset only and wrote that Bluetooth and HDMI 'would behave the same way', so the symptom should not present those as observed. And omarchy-brightness-keyboard-mute does not follow PipeWire state: omarchy-audio-input-mute calls it after toggling the default source on the mic-mute key, so the cause's comparison needs rewording. The fix itself is unchanged. Not exercised on LED hardware.
Writing to the LED switches its trigger to none. If you stop the service, the LED no longer follows anything until the next boot.
Symptom
The mute key mutes the sound and the OSD says muted, but the mute LED on the key stays dark. It works when playing through the laptop speakers and fails when the default output is on another sound card. A USB headset is the confirmed case. Bluetooth headphones are expected to behave the same way by the same mechanism, and HDMI may too, but neither was tested in the report.
Cause
The platform::mute LED uses the kernel's audio-mute trigger, which follows the internal sound card's ALSA Master switch. Muting a PipeWire sink on the internal card flips Master, so the LED follows. Muting a sink on any other card never touches the internal Master, so the LED stays dark. Omarchy 4's mute key runs omarchy-audio-output-volume mute-toggle, which mutes whatever the default sink is. For the microphone, Omarchy already sets platform::micmute with brightnessctl: omarchy-audio-input-mute toggles the default source and then calls omarchy-brightness-keyboard-mute on|off. Nothing does the same for platform::mute as of 4.0.4-1.
Fix
Run a small user service that follows the default sink's mute state and sets the LED through brightnessctl, which Omarchy installs and which needs no root for LEDs. This is the script the reporter verified on a ThinkPad X1 Carbon 7th gen:
#!/bin/bash
# ~/.local/bin/mute-led-follow
LED=platform::mute
last=""
sync_led() {
local value
if [[ $(pactl get-sink-mute @DEFAULT_SINK@ 2>/dev/null) == *yes ]]; then
value=1
else
value=0
fi
[[ $value == "$last" ]] && return
last=$value
brightnessctl --device="$LED" set "$value" >/dev/null 2>&1
}
# Writing 0 detaches the audio-mute trigger until the next boot
brightnessctl --device="$LED" set 0 >/dev/null 2>&1
sync_led
pactl subscribe | while read -r line; do
case $line in
*" on sink "* | *" on server"*) sync_led ;;
esac
done
# ~/.config/systemd/user/mute-led-follow.service
[Unit]
Description=Drive the mute LED from the default PipeWire sink
After=wireplumber.service
PartOf=wireplumber.service
[Service]
ExecStart=%h/.local/bin/mute-led-follow
Restart=always
[Install]
WantedBy=default.target
ls /sys/class/leds/ | grep -i mute # confirm the LED is platform::mute
chmod +x ~/.local/bin/mute-led-follow
systemctl --user daemon-reload
systemctl --user enable --now mute-led-follow.service
The same works on plain Arch with PipeWire, pipewire-pulse and brightnessctl installed.
Verify
With a USB or Bluetooth output as default, press the mute key: the LED lights, and unmuting turns it off. Switching the default to a muted sink lights it, and switching away clears it. systemctl --user status mute-led-follow.service shows it running.