I use lenovo t420. It has mute mic button. But it cannot be assigned to any action, because I got error The key you just pressed is not supported by Qt when I'm trying to assign to any action. But thinkvantage button can be. And I want to assign it to mute mic.I tried everything to make mic mute via command line, but nothing worked for me. For example I tried these comands, the most helpful for users, but didn't work for me:root@qet-PC: /home/qet# amixer sset 'Internal Mic',0 muteNo protocol specifiedxcb_connection_has_error() returned trueNo protocol specifiedxcb_connection_has_error() returned trueALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Access deniedamixer: Mixer attach default error: Connection refusedroot@qet-PC: /home/qet# amixer set Capture toggleNo protocol specifiedxcb_connection_has_error() returned trueNo protocol specifiedxcb_connection_has_error() returned trueALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Access deniedamixer: Mixer attach default error: Connection refusedroot@qet-PC: /home/qet# amixer -c 0 sset Mic toggleNo protocol specifiedxcb_connection_has_error() returned trueamixer: Unable to find simple control 'Mic',0results of /proc/asound/cards and lspci | grep Audio:root@qet-PC: /home/qet# cat /proc/asound/cards 0 [PCH            ]: HDA-Intel - HDA Intel PCH                      HDA Intel PCH at 0xf2520000 irq 4729 [ThinkPadEC     ]: ThinkPad EC - ThinkPad Console Audio Control                      ThinkPad Console Audio Control at EC reg 0x30, fw unknownroot@qet-PC: /home/qet# lspci | grep Audio00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)How do I mute mic using command line? which I can assign to thinkvantage button in System Settings -> Shortcuts and GesturesOr maybe there is another way to mute mic pressing that button?UPDATE:Turns out it does not work when I run command as root.With user permissions it works fine, mic is muted, except I still get some errors in the terminal:qet@qet-PC:~$ amixer set Capture toggleFailed to create secure directory (/run/user/1000/pulse): Permission deniedSimple mixer control 'Capture',0  Capabilities: cvolume cswitch  Capture channels: Front Left - Front Right  Limits: Capture 0 - 80  Front Left: Capture 80 [100%] [6.00dB] [off]  Front Right: Capture 80 [100%] [6.00dB] [off]qet@qet-PC:~$ amixer set Capture toggleFailed to create secure directory (/run/user/1000/pulse): Operation not permittedSimple mixer control 'Capture',0  Capabilities: cvolume cswitch  Capture channels: Front Left - Front Right  Limits: Capture 0 - 80  Front Left: Capture 80 [100%] [6.00dB] [on]  Front Right: Capture 80 [100%] [6.00dB] [on]
How to mute microphone using command line in debian 8?
debian;alsa