May 10, 2021 ~1 minute minutes read Admin

Microphone mute for X220

In my Thinkpad X220 running Manjaro i3, the microphone mute button is disabled, as it is not supported by thinkpad-acpi.

To enable it, here's what I did. First, check that acpi is installed:

sudo pacman -S acpi

1) create the file /etc/acpi/events/lenovo-mutemic

event=button/f20 action=/etc/acpi/

2) create the file /etc/acpi/

if amixer sget $INPUT_DEVICE,0 | grep '\[on\]' ; then
amixer sset $INPUT_DEVICE,0 toggle echo "0 blink" | sudo tee /proc/acpi/ibm/led DISPLAY=":0. 0" notify-send -t 1000 -i microphone-sensitivity-muted-symbolic "Mic MUTED"
amixer sset $INPUT_DEVICE,0 toggle DISPLAY=":0.0" notify-send -t 1000 -i microphone-sensitivity-high-symbolic "Mic ON" echo "0 on" | sudo tee /proc/acpi/ibm/led

3) restart acpi

systemctl restart acpid.service