I hacked together a dirty workaround, which I'm sharing just in case
somebody else with the same problem ends up on this bug report.
Since I'm using systemd and pulseaudio, and the microphone state
changes are correctly being sent to the kernel (I'm not exactly sure
who's responsible for this), I've created a small systemd service unit
that depends on pulseaudio and simply toggles the microphone muted
status twice. The pulseaudio unit is a user service, so this unit
needs to be a user service as well.
A temporary file is used to avoid toggling the microphone more than
once per boot.

$ cat /usr/local/lib/systemd/user/micropohe_led.service
[Unit]
Requires=pulseaudio.service
Description=Make sure that the microphone-muted LED on the F4 key
matches the actual microphone status

[Service]
Type=oneshot
ExecStart=/bin/sh -c "[ ! -f /temp/micmute-led-toggled ] && touch
/tmp/micmute-led-toggled && pactl set-source-mute @DEFAULT_SOURCE@
toggle && pactl set-source-mute @DEFAULT_SOURCE@ toggle"

[Install]
WantedBy=default.target


This service can be enabled for all users with "sudo systemctl
--global enable micropohe_led.service".


On Wed, 13 Apr 2022 10:36:14 +0200 Steven <[email protected]> wrote:
> Package: src:linux
> Version: 5.16.18-1
> Severity: normal
> X-Debbugs-Cc: [email protected]
>
> Dear Maintainer,
> I'd like to report that the initial status of the "microphone muted" LED on 
> the
> F4 key of a Thinkpad E14 (Gen 2) laptop is incorrectly set to on on boot, even
> though the microphone is indeed not muted.
> Pressing the key leaves the LED on but mutes the microphone. Pressing the key
> again unmutes the microphone and turns off the LED.
> All subsequent presses behave as expected (i.e., the LED matches the mute
> status).
>
> It look like the information that the mic is unmuted never gets to the module
> that is handling the LEDs.
>
> Manually turning the LED off via 
> "/sys/class/leds/platform::micmute/brightness"
> disables the LED trigger. Re-enabling the led trigger with "echo micmute >
> /sys/class/leds/platform::micmute/trigger" re-lights the LED.
>
> This seems somewhat related:
> https://lore.kernel.org/alsa-devel/[email protected]/
>
> Please let me know if I can help troubleshoot the problem. So far I was not
> able to find any workaround.
>
> Thank you!
>
> *** Reporter, please consider answering these questions, where appropriate ***
>
>    * What led up to the situation?
>    * What exactly did you do (or not do) that was effective (or
>      ineffective)?
>    * What was the outcome of this action?
>    * What outcome did you expect instead?
>
> *** End of the template - remove these template lines ***
>
>
> -- Package-specific info:
> ** Version:
> Linux version 5.16.0-6-amd64 ([email protected]) (gcc-11 (Debian 
> 11.2.0-19) 11.2.0, GNU ld (GNU Binutils for Debian) 2.38) #1 SMP PREEMPT 
> Debian 5.16.18-1 (2022-03-29)
>
> ** Command line:
> BOOT_IMAGE=/vmlinuz-5.16.0-6-amd64 root=/dev/mapper/ghoul--vg-root ro quiet
>
> ** Tainted: POE (12289)
>  * proprietary module was loaded
>  * externally-built ("out-of-tree") module was loaded
>  * unsigned module was loaded
>
> ** Kernel log:
> [   15.625143] audit: type=1400 audit(1649836987.684:5): apparmor="STATUS" 
> operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" 
> pid=829 comm="apparmor_parser"
> [   15.625191] audit: type=1400 audit(1649836987.684:6): apparmor="STATUS" 
> operation="profile_load" profile="unconfined" name="/usr/bin/man" pid=831 
> comm="apparmor_parser"
> [   15.625196] audit: type=1400 audit(1649836987.684:7): apparmor="STATUS" 
> operation="profile_load" profile="unconfined" name="man_filter" pid=831 
> comm="apparmor_parser"
> [   15.625198] audit: type=1400 audit(1649836987.684:8): apparmor="STATUS" 
> operation="profile_load" profile="unconfined" name="man_groff" pid=831 
> comm="apparmor_parser"
> [   15.625521] audit: type=1400 audit(1649836987.684:9): apparmor="STATUS" 
> operation="profile_load" profile="unconfined" name="lsb_release" pid=828 
> comm="apparmor_parser"
> [   15.627366] audit: type=1400 audit(1649836987.684:10): apparmor="STATUS" 
> operation="profile_load" profile="unconfined" name="ioq3ded" pid=832 
> comm="apparmor_parser"
> [   15.627902] audit: type=1400 audit(1649836987.688:11): apparmor="STATUS" 
> operation="profile_load" profile="unconfined" name="libreoffice-xpdfimport" 
> pid=840 comm="apparmor_parser"

Reply via email to