Difference between revisions of "Lenovo Fn+F4 MicMute binding fix"
(better instruction wording) |
|||
| Line 19: | Line 19: | ||
ThinkPad Console Audio Control at EC reg 0x30, | ThinkPad Console Audio Control at EC reg 0x30, | ||
</syntaxhighlight>From the example above, the card to use is card <code>#1</code> (using <code>1</code> in the examples in the text later - update based on your setup). In case the card is not the default one (= the first one when sorted by ID ascendingly) card ID needs to be specified explicitly. If it's the default one, the <code>-c1</code> switch can be omitted. | </syntaxhighlight>From the example above, the card to use is card <code>#1</code> (using <code>1</code> in the examples in the text later - update based on your setup). In case the card is not the default one (= the first one when sorted by ID ascendingly) card ID needs to be specified explicitly. If it's the default one, the <code>-c1</code> switch can be omitted. | ||
| + | |||
Open file <code>/etc/acpi/thinkpad-micmute.sh</code> and put the following snippet into it:<syntaxhighlight lang="sh"> | Open file <code>/etc/acpi/thinkpad-micmute.sh</code> and put the following snippet into it:<syntaxhighlight lang="sh"> | ||
Latest revision as of 18:37, 9 May 2025
Start ACPI service if not running:
$ /etc/init.d/acpid start
Run acpi_listen and hit the key kombination. Something like this should emit:
$ acpi_listen
button/micmute MICMUTE 00000080 00000000 K
Create a file /etc/acpi/events/thinkpad-micmute and put this snippet into it (update event based on previous command output):
event=button/micmute MICMUTE 00000080 00000000 K
action=/etc/acpi/thinkpad-micmute.sh
Create a file /etc/acpi/thinkpad-micmute.sh and make it executable
$ touch /etc/acpi/thinkpad-micmute.sh && chmod a+x /etc/acpi/thinkpad-micmute.sh
Find out the card and control to switch upon:
$ cat /proc/asound/cards
0 [HDMI ]: HDA-Intel - HDA Intel HDMI
HDA Intel HDMI at 0xf2530000 irq 42
1 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf2534000 irq 43
29 [ThinkPadEC ]: ThinkPad EC - ThinkPad Console Audio Control
ThinkPad Console Audio Control at EC reg 0x30,
From the example above, the card to use is card #1 (using 1 in the examples in the text later - update based on your setup). In case the card is not the default one (= the first one when sorted by ID ascendingly) card ID needs to be specified explicitly. If it's the default one, the -c1 switch can be omitted.
Open file /etc/acpi/thinkpad-micmute.sh and put the following snippet into it:
/usr/bin/amixer -c1 sset Capture toggle
Restart acpid service
$ /etc/init.d/acpid restart
also make sure it is being started after boot
$ systemctl enable acpid