Read more

How to enable the Thinkpad microphone mute key on Ubuntu 16.04

Arne Hartherz
September 05, 2017Software engineer at makandra GmbH

While the hardware mute button of my Lenovo x230 worked on Ubuntu 14.04 out of the box, it does not on Ubuntu 16.04. It is fairly simple to fix, though.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

There is an extensive answer on Ask Ubuntu Show archive.org snapshot , but only part of it was required for me. Here is the gist of it.

  1. Open a terminal

  2. Run acpi_listen and press the mute key. You should see something like this:

    button/f20 F20 00000080 00000000 K
    

    Press Ctrl+C to exit.

  3. Run amixer scontrols. You will see multiple lines, one of which should be:

    Simple mixer control 'Capture',0
    

    If there is no 'Capture', you might see 'Internal Mic' or similar.

  4. Now bind the key to toggle that device. Create an ACPI event file for that:

    sudo vim /etc/acpi/events/lenovo-mutemic
    

    Add the following. Fill in event with the acpi_listen result for your hardware mute key. If there was no Capture control for you, change accordingly (keep the quotes).

    event=button/f20 F20 00000080 00000000 K
    action=/usr/bin/amixer sset 'Capture',0 toggle
    
  5. Restart the ACPI service.

    sudo service acpid restart
    
  6. That should be all. Do some testing to see if it actually works.

On my x230, the hardware key has an integrated notification LED. If your Thinkpad does not have that, you could use your power LED and/or an extra notification bubble.
Please see the answer on askubuntu.com on how to add such features, or if you run into trouble.

Posted by Arne Hartherz to makandra dev (2017-09-05 10:15)