Public bug reported:

# Bug Report: Realtek ALC257 speaker mute LED not exposed via `ctl-led`
on Lenovo (17aa:3802) with SOF driver

## Summary

On a Lenovo laptop with Realtek ALC257 codec and Intel Meteor Lake SOF
audio driver (`sof-audio-pci-intel-mtl`), the **speaker mute LED is not
registered as a controllable LED** in the kernel's `ctl-led` framework.
As a result, the mute LED never lights up when audio is muted via
`Fn+F1`.

The **microphone mute LED works correctly**, and `ctl-led/mic/card0/`
exposes `attach`/`detach`/`list`. In contrast, `ctl-led/speaker/card0/`
has **no `attach` file at all**, only `brightness`, `mode`, `power`, and
`uevent`. This indicates the speaker LED was registered as a generic LED
but **not** as an audio-controllable LED.

## Environment

- **Distro**: Ubuntu 26.04
- **Kernel**: `7.0.0-38-generic #38-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 4 
09:10:14 UTC 2026 x86_64 GNU/Linux`
- **Machine**: Lenovo (SSID `17aa:3802`)
- **Audio codec**: Realtek ALC257
- **Audio driver stack**:
  - `sof-audio-pci-intel-mtl 0000:00:1f.3`
  - `snd_hda_codec_alc269` (ALC257 fixup picked for PCI SSID 17aa:3802)
  - `skl_hda_dsp_generic`
  - Topology: `intel/sof-ipc4-tplg/sof-hda-generic-2ch.tplg`

## Steps to Reproduce

1. Boot Ubuntu 26.04 on this Lenovo machine.
2. Confirm microphone mute LED works: press mic mute key (e.g. F4) — LED 
toggles correctly.
3. Press `Fn+F1` to toggle speaker mute. Audio mutes/unmutes correctly, but the 
**speaker mute LED never changes state**.

## Observed Behavior

### `ls -l /sys/class/sound/ctl-led/`

```
total 0
drwxr-xr-x 4 root root    0 Oct  8 14:50 mic
drwxr-xr-x 2 root root    0 Oct  8 14:50 power
drwxr-xr-x 4 root root    0 Oct  8 14:50 speaker
lrwxrwxrwx 1 root root    0 Oct  8 06:22 subsystem -> ../../../../class/sound
-rw-r--r-- 1 root root 4096 Oct  8 14:50 uevent
```

### `ls -l /sys/class/sound/ctl-led/speaker/card0/`

```
total 0
-r--r--r-- 1 root root 4096 Oct  8 15:00 brightness
drwxr-xr-x 3 root root    0 Oct  8 14:51 card0
-rw-r--r-- 1 root root 4096 Oct  8 15:00 mode
drwxr-xr-x 2 root root    0 Oct  8 15:00 power
-rw-r--r-- 1 root root 4096 Oct  8 15:00 uevent
```

**Note**: There is **no `attach`, `detach`, or `list`** file in
`speaker/card0/`, unlike `mic/card0/`.

### `ls -l /sys/class/sound/ctl-led/mic/card*/`

```
total 0
--w------- 1 root root 4096 Oct  8 14:51 attach
lrwxrwxrwx 1 root root    0 Oct  8 14:51 card -> 
../../../../../pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0
--w------- 1 root root 4096 Oct  8 06:22 detach
-r--r--r-- 1 root root 4096 Oct  8 14:51 list
drwxr-xr-x 2 root root    0 Oct  8 14:51 power
--w------- 1 root root 4096 Oct  8 14:51 reset
-rw-r--r-- 1 root root 4096 Oct  8 14:51 uevent
```

### `cat /sys/class/sound/ctl-led/mic/card0/list`

```
49
```

`numid=49` corresponds to:

```
numid=49,iface=MIXER,name='Dmic0 Capture Switch'
```

So the microphone LED is auto-bound to `Dmic0 Capture Switch`.

### `cat /sys/class/sound/ctl-led/speaker/card0/list`

```
(empty)
```

### `amixer -c 0 controls | grep -i -E "master|speaker|mute|switch"`

```
numid=13,iface=CARD,name='Speaker Phantom Jack'
numid=10,iface=MIXER,name='Master Playback Switch'
numid=9,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Headphone Playback Switch'
numid=7,iface=MIXER,name='Capture Switch'
numid=18,iface=MIXER,name='IEC958 Playback Switch'
numid=24,iface=MIXER,name='IEC958 Playback Switch',index=1
numid=30,iface=MIXER,name='IEC958 Playback Switch',index=2
numid=5,iface=MIXER,name='Auto-Mute Mode'
numid=46,iface=MIXER,name='Dmic0 Capture DRC switch'
numid=49,iface=MIXER,name='Dmic0 Capture Switch'
numid=43,iface=MIXER,name='Dmic0 Capture TDFB beam switch'
numid=40,iface=MIXER,name='Post Mixer Analog Playback DRC switch'
numid=4,iface=MIXER,name='Speaker Playback Switch'
numid=3,iface=MIXER,name='Speaker Playback Volume'
```

**Relevant controls exist** (`Master Playback Switch` numid=10, `Speaker
Playback Switch` numid=4), yet the speaker LED is not exposed as
controllable.

### `dmesg | grep -i "hda\|realtek"`

```
[    5.133044] sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 5
[    5.133049] sof-audio-pci-intel-mtl 0000:00:1f.3: using HDA machine driver 
skl_hda_dsp_generic now
[    5.136112] sof-audio-pci-intel-mtl 0000:00:1f.3:  Topology file:     
intel/sof-ipc4-tplg/sof-hda-generic-2ch.tplg
[    5.443198] sof-audio-pci-intel-mtl 0000:00:1f.3: loading topology: 
intel/sof-ipc4-tplg/sof-hda-generic-2ch.tplg
[    5.443529] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Parent card not 
yet available, widget card binding deferred
[    5.458862] snd_hda_codec_alc269 ehdaudio0D0: ALC257: picked fixup  for PCI 
SSID 17aa:3802
[    5.459339] snd_hda_codec_alc269 ehdaudio0D0: autoconfig for ALC257: 
line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[    5.459344] snd_hda_codec_alc269 ehdaudio0D0:    speaker_outs=0 
(0x0/0x0/0x0/0x0/0x0)
[    5.459346] snd_hda_codec_alc269 ehdaudio0D0:    hp_outs=1 
(0x21/0x0/0x0/0x0/0x0)
[    5.459347] snd_hda_codec_alc269 ehdaudio0D0:    mono: mono_out=0x0
[    5.459349] snd_hda_codec_alc269 ehdaudio0D0:    inputs:
[    5.459350] snd_hda_codec_alc269 ehdaudio0D0:      Mic=0x19
[    5.497094] skl_hda_dsp_generic skl_hda_dsp_generic: 
hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[    5.512615] input: sof-hda-dsp Mic as 
/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input17
[    5.512685] input: sof-hda-dsp Headphone as 
/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input18
[    5.512737] input: sof-hda-dsp HDMI/DP,pcm=3 as 
/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input19
[    5.512789] input: sof-hda-dsp HDMI/DP,pcm=4 as 
/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input20
[    5.512838] input: sof-hda-dsp HDMI/DP,pcm=5 as 
/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input21
```

## Expected Behavior

- The speaker mute LED should be exposed via 
`/sys/class/sound/ctl-led/speaker/card0/` with `attach`/`detach`/`list` files, 
**just like the microphone LED**.
- It should be automatically bound to `Master Playback Switch` (numid=10) or 
`Speaker Playback Switch` (numid=4), so pressing `Fn+F1` toggles the LED 
accordingly.

## Attempted Workarounds

Manual binding was attempted:

```bash
echo 10 | sudo tee /sys/class/sound/ctl-led/speaker/card0/attach
```

Result:

```
10
/sys/class/sound/ctl-led/speaker/card0/attach: No such file or directory (os 
error 2)
```

The `attach` file does not exist, so manual binding is impossible.

## Analysis

The microphone LED is correctly registered and auto-bound:

- `/sys/class/sound/ctl-led/mic/card0/` contains `attach`, `detach`, `list`
- `list` returns `49` (`Dmic0 Capture Switch`)

The speaker LED is registered but **not as an audio-controllable LED**:

- `/sys/class/sound/ctl-led/speaker/card0/` contains only generic LED 
attributes (`brightness`, `mode`, `power`, `uevent`)
- No `attach`, `detach`, or `list`

This strongly suggests that the ALC257 fixup for SSID `17aa:3802` (or
the SOF machine driver `skl_hda_dsp_generic`) does **not** register the
speaker LED GPIO as an audio-controllable LED via the `ctl-led`
framework.

## Requested Fix

1. Add an ALC257 fixup for Lenovo SSID `17aa:3802` that registers the speaker 
mute LED with the `ctl-led` framework, similar to the microphone LED.
2. Ensure the speaker LED is auto-bound to `Master Playback Switch` or `Speaker 
Playback Switch`, so `Fn+F1` toggles it.
3. If the LED GPIO is controlled through a different path in SOF, ensure 
`skl_hda_dsp_generic` passes the correct LED information to `snd_hda_codec` so 
`ctl-led` can create the `attach`/`detach`/`list` interface.

## Additional Notes

- `amixer` confirms `Master Playback Switch` (numid=10) and `Speaker Playback 
Switch` (numid=4) exist, so the hardware control is present; the problem is 
purely in LED registration/binding.
- The microphone LED case proves the kernel and driver stack can support this 
on this platform, so the fix should be feasible.
- Kernel version: `7.0.0-38-generic` (Ubuntu 26.04).

---

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: linux-image-7.0.0-38-generic 7.0.0-38.38
ProcVersionSignature: Ubuntu 7.0.0-38.38-generic 7.0.14
Uname: Linux 7.0.0-38-generic x86_64
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
AudioDevicesInUse:
 USER        PID ACCESS COMMAND
 /dev/snd/controlC0:  reyear    12780 F.... pipewire
                      reyear    12789 F.... wireplumber
 /dev/snd/seq:        reyear    12780 F.... pipewire
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Thu Oct  8 15:05:36 2026
InstallationDate: Installed on 2026-10-08 (0 days ago)
InstallationMedia: Ubuntu 26.04.1 LTS "Resolute Raccoon" - Release amd64 
(20260826)
MachineType: LENOVO 21LD
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-7.0.0-38-generic 
root=UUID=b9233851-f59a-4276-9c97-e57036055931 ro quiet splash 
crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/17/2025
dmi.bios.release: 2.67
dmi.bios.vendor: LENOVO
dmi.bios.version: NJCN67WW
dmi.board.asset.tag: NO Asset Tag
dmi.board.name: LNVNB161216
dmi.board.vendor: LENOVO
dmi.board.version: SDK0T76479 WIN
dmi.chassis.asset.tag: NO Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: ThinkBook 14 G6+ IMH
dmi.ec.firmware.release: 2.67
dmi.modalias: 
dmi:bvnLENOVO:bvrNJCN67WW:bd12/17/2025:br2.67:efr2.67:svnLENOVO:pn21LD:pvrThinkBook14G6+IMH:rvnLENOVO:rnLNVNB161216:rvrSDK0T76479WIN:cvnLENOVO:ct10:cvrThinkBook14G6+IMH:skuLENOVO_MT_21LD_BU_idea_FM_ThinkBook14G6+IMH:pfaThinkBook14G6+IMH:
dmi.product.family: ThinkBook 14 G6+ IMH
dmi.product.name: 21LD
dmi.product.sku: LENOVO_MT_21LD_BU_idea_FM_ThinkBook 14 G6+ IMH
dmi.product.version: ThinkBook 14 G6+ IMH
dmi.sys.vendor: LENOVO

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2169937

Title:
  Bug Report: Realtek ALC257 speaker mute LED not exposed via `ctl-led`
  on Lenovo (17aa:3802) with SOF driver

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2169937/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to