FS#71768 - X220 Mic Mute Button LED won't turn off since kernel 5.13
Attached to Project:
Arch Linux
Opened by Angelo Geulin (arvl) - Sunday, 08 August 2021, 10:18 GMT
Last edited by Jonas Witschel (diabonas) - Sunday, 08 August 2021, 14:43 GMT
Opened by Angelo Geulin (arvl) - Sunday, 08 August 2021, 10:18 GMT
Last edited by Jonas Witschel (diabonas) - Sunday, 08 August 2021, 14:43 GMT
|
Details
Description:
Starting Linux 5.13, the mic mute button LED on the ThinkPad X220 stays lit after boot, and even when the mic is unmuted. The culprit seems to be this commit: https://github.com/torvalds/linux/commit/e2da5ff435d64b59880648269c136484bea5c312 Muting and unmuting works fine, it's just that the Mute LED button stays on even when unmuted. |
This task depends upon
sudo sh -c 'echo off > /sys/class/sound/ctl-led/mic/mode'
If yes, the LED is controlled correctly by the kernel and the microphone does not get muted correctly (or at least it's not recognised as being muted by the kernel). Otherwise something is wrong with the kernel code to control the LED itself.
Also, please provide the output of
cat /sys/class/leds/hda::micmute/trigger
Edit: I tried rebooting and it seems that command turns on and off the LED just fine.
I don't have a `/sys/class/leds/hda::micmute/trigger`, but there is a `/sys/class/leds/platform::micmute/trigger` after the reboot.
Here is the output of that file:
none usb-gadget usb-host kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock AC-online BAT0-charging-or-full BAT0-charging BAT0-full BAT0-charging-blink-full-solid disk-activity disk-read disk-write ide-disk mtd nand-disk cpu cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 panic mmc0 rfkill-any rfkill-none audio-mute [audio-micmute] rfkill0 rfkill1 rc-feedback rfkill2 bluetooth-power
sudo sh -c 'echo 0 > /sys/class/leds/platform::micmute/brightness'
sudo sh -c 'echo 1 > /sys/class/leds/platform::micmute/brightness'
"0" should turn it off, "1" should turn it on, but this might be switched if the LED is not recognised correctly by the kernel.
If that works, you can try
sudo sh -c 'echo audio-micmute > /sys/class/leds/platform::micmute/trigger; echo follow-mute > /sys/class/sound/ctl-led/mic/mode'
to setup the LED to light up only when the microphone is muted.
Did the LED use to follow the status of the microphone mute before kernel 5.13, or was it just permanently turned off then?
sudo sh -c 'echo 0 > /sys/class/leds/platform::micmute/brightness'
sudo sh -c 'echo 1 > /sys/class/leds/platform::micmute/brightness'
They turn off and on the mic button LED.
This command works fine, I suppose?
sudo sh -c 'echo audio-micmute > /sys/class/leds/platform::micmute/trigger; echo follow-mute > /sys/class/sound/ctl-led/mic/mode'
If the if the mic is muted in Pavucontrol, it sets the light ON. If the mic is unmuted in Pavucontrol, it sets the light OFF.
>Did the LED use to follow the status of the microphone mute before kernel 5.13, or was it just permanently turned off then?
Before kernel 5.13, the LED switches just fine when I toggle the mic on and off in Pavucontrol.
As a workaround, you can apply the correct trigger on every boot by creating a file /etc/tmpfiles.d/micmute-led.conf with the following contents:
w /sys/class/leds/platform::micmute/trigger - - - - audio-micmute
(As a bonus, if you want to invert the logic, i.e. light the LED if the microphone is unmuted, you can achieve this by adding the following line:)
w /sys/class/sound/ctl-led/mic/mode - - - - follow-route