Microphone mute key

I have a ThinkPad x230 with Sound (mute/unmute), Volume, Microphone (mute/unmute) and Lock Screen physical keys. The Microphone key does not work out-of-the-box, and I finally decided to search a bit for a solution. I found this nice post about Ubuntu.
So, I decided to give it a try.

Following the instructions, first run:


and press the Microphone key. It displayed this output:

button/f20 F20 00000080 00000000 K

Then run:

amixer scontrols

which resulted in:

Simple mixer control 'Master',0
Simple mixer control 'Capture',0

What I need is the second line in order to bind the Microphone key to the mute/unmute event. As suggested in the original post, I created an ACPI event file /etc/acpi/events/lenovo-mutemic contentaining:

event=button/f20 F20 00000080 00000000 K
action=/usr/bin/amixer sset 'Capture',0 toggle

Restarting acpid did not seem to have an effect:

/etc/rc.d/rc.acpid restart

Hmmm… Is it because of PulseAudio? I had to reboot the system for the button to start working. Even then, it sometimes behaved funny. For instance, I needed to press the Sound button couple of times before the Microphone button started working. Now it seems to work fine. I will search for a better solution, but for now this should do.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s