Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save kmf/952cae5c1441a7f829ad9175cb2c6bed to your computer and use it in GitHub Desktop.

Select an option

Save kmf/952cae5c1441a7f829ad9175cb2c6bed to your computer and use it in GitHub Desktop.
ThinkPad E14 Gen 7 — Mute & Mic-Mute LED Fix.md
tags
thinkpad
e14
opensuse
tumbleweed
pipewire
audio
led
date 2026-06-18
machine ThinkPad E14 Gen 7 (21SX006XZA)

ThinkPad E14 Gen 7 — Mute & Mic-Mute LED Fix

Fix for the Fn+F1 (speaker mute) and Fn+F4 (mic mute) indicator lights not working on Linux.

Machine: ThinkPad E14 Gen 7 (21SX006XZA)
OS: openSUSE Tumbleweed (kernel 7.0.12)
Audio: Intel Arrow Lake cAVS / SOF-HDA-DSP, PipeWire 1.6.6

Problem

The mute and mic-mute LEDs on the keyboard function keys did not light up when pressing Fn+F1 or Fn+F4.

The hardware LEDs themselves work — writing 1 to /sys/class/leds/platform::mute/brightness turns the light on. The issue was entirely in how Linux wired software mute to those LEDs.

Root Cause

Two separate issues:

1. LED triggers not connected at boot

ThinkPad exposes mute LEDs via thinkpad_acpi:

  • /sys/class/leds/platform::mute
  • /sys/class/leds/platform::micmute

These need the audio-mute and audio-micmute LED triggers, which are provided by the snd_ctl_led kernel module. At boot, the triggers were present but not properly bound to the ALSA mute controls, so the physical LEDs never received mute state updates.

2. PipeWire uses software mute

PipeWire (via WirePlumber) mutes audio in software. It does not toggle the ALSA hardware switches that drive the LEDs:

Control ALSA name LED
Speaker mute Master Playback Switch platform::mute
Mic mute Dmic0 Capture Switch platform::micmute

Direct amixer commands worked and lit the LEDs, but Fn+F1/F4 (which go through PipeWire) did not.

Capture switch syntax note: playback switches use on/off; capture switches use cap/nocap.

Solution Overview

Component Scope Purpose
thinkpad-mute-led-setup.sh system Load snd_ctl_led, bind ALSA controls, activate LED triggers
thinkpad-mute-led.service system Run setup at boot
99-thinkpad-mute-led.rules system Re-run setup when ctl-led sysfs appears
thinkpad-mute-led.conf system Load snd_ctl_led module early
thinkpad-mute-led-sync.sh user Mirror PipeWire mute state → ALSA hardware switches
thinkpad-mute-led-sync.service user Run sync daemon in login session

Files Installed

/usr/local/sbin/thinkpad-mute-led-setup.sh

Runs at boot and on udev events. It:

  1. Loads snd_ctl_led
  2. Waits for /sys/class/sound/ctl-led/ to appear
  3. Attaches Master Playback Switch → speaker LED
  4. Attaches Dmic0 Capture Switch → mic LED (detaches Capture Switch)
  5. Sets audio-mute / audio-micmute triggers on platform LEDs
  6. Applies ALSA UCM HiFi verb via alsaucm

/usr/local/sbin/thinkpad-mute-led-sync.sh

User-session daemon that:

  1. Subscribes to pactl subscribe events
  2. On sink change → syncs @DEFAULT_SINK@ mute to amixer sset Master on|off
  3. On source change → syncs @DEFAULT_SOURCE@ mute to amixer sset Dmic0 cap|nocap

/etc/systemd/system/thinkpad-mute-led.service

[Unit]
Description=ThinkPad mute/mic-mute LED setup
After=sound.target
Wants=sound.target

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/thinkpad-mute-led-setup.sh
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

~/.config/systemd/user/thinkpad-mute-led-sync.service

[Unit]
Description=Sync PipeWire mute to ALSA for ThinkPad speaker LED
After=pipewire-pulse.service wireplumber.service
BindsTo=pipewire-pulse.service
PartOf=pipewire-pulse.service

[Service]
ExecStart=/usr/local/sbin/thinkpad-mute-led-sync.sh
Restart=on-failure
RestartSec=2

[Install]
WantedBy=default.target

/etc/udev/rules.d/99-thinkpad-mute-led.rules

ACTION=="add", KERNEL=="ctl-led", SUBSYSTEM=="sound", RUN+="/usr/local/sbin/thinkpad-mute-led-setup.sh"

/etc/modprobe.d/thinkpad-mute-led.conf

snd_ctl_led

Verification

# Check services
systemctl status thinkpad-mute-led.service
systemctl --user status thinkpad-mute-led-sync.service

# Check LED sysfs
cat /sys/class/leds/platform::mute/brightness        # 0=off, 1=on
cat /sys/class/leds/platform::micmute/brightness

# Check ALSA bindings
cat /sys/class/sound/ctl-led/speaker/card0/list   # should show 12 (Master)
cat /sys/class/sound/ctl-led/mic/card0/list       # should show 51 (Dmic0)

# Check triggers (active trigger shown in square brackets)
cat /sys/class/leds/platform::mute/trigger | tr ' ' '\n' | grep '\['
cat /sys/class/leds/platform::micmute/trigger | tr ' ' '\n' | grep '\['

Press Fn+F1 and Fn+F4 — the corresponding key LEDs should toggle.

Manual Testing

# Speaker LED via ALSA directly
amixer -c 0 sset Master off    # LED on
amixer -c 0 sset Master on     # LED off

# Mic LED via ALSA directly
amixer -c 0 sset Dmic0 nocap    # LED on
amixer -c 0 sset Dmic0 cap      # LED off

# Via PipeWire (should also work with sync service running)
pactl set-sink-mute @DEFAULT_SINK@ 1
pactl set-source-mute @DEFAULT_SOURCE@ 1

Troubleshooting

LEDs still not working after reboot

sudo systemctl restart thinkpad-mute-led.service
systemctl --user restart thinkpad-mute-led-sync.service

Or manually re-apply triggers:

echo audio-mute | sudo tee /sys/class/leds/platform::mute/trigger
echo audio-micmute | sudo tee /sys/class/leds/platform::micmute/trigger
sudo /usr/local/sbin/thinkpad-mute-led-setup.sh

Mic LED stuck on

In alsamixer (card: sof-hda-dsp), keep Auto-Mute Mode set to Disabled. Enabling it can interfere with mic LED behaviour.

Re-enable services after reinstall

sudo systemctl enable --now thinkpad-mute-led.service
systemctl --user enable --now thinkpad-mute-led-sync.service

How It Works (diagram)

Fn+F1 / Fn+F4
      │
      ▼
  PipeWire (software mute)
      │
      ▼
thinkpad-mute-led-sync.sh  ──►  ALSA hardware switches
      │                              │
      │                              ▼
      │                         snd_ctl_led
      │                              │
      │                              ▼
      └─────────────────────►  platform::mute / platform::micmute
                                      │
                                      ▼
                               Keyboard LED lights

Related Kernel/ALSA Details

  • thinkpad_acpi module provides platform LED sysfs entries
  • snd_ctl_led module bridges ALSA mixer switches to LED triggers
  • CONFIG_SND_CTL_LED=m (module, not built-in) on this kernel
  • No ledtrig-audio module — triggers are registered by snd_ctl_led itself
  • ALSA UCM config at /usr/share/alsa/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf only auto-attaches speaker LED for Dell/MSI laptops, not ThinkPad

Date Fixed

2026-06-18 on durin (openSUSE Tumbleweed 20260616)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment