Laptop: HP Envy 15
OS: Ubuntu 22.04 LTS
The mic mute key of the laptop doesn't work, but other media/function keys work, e.g. brightness up/down, speaker mute, volume up/down, previous/next, play/pause. I used evtest
to see if the key-press detected and found out that some keys don't emit EV_KEY
but some of them keeps working although no EV_KEY
is emitted.
This is the output of evtest
, I add some comments to show what key is pressed.
Event: time 1664250299.376050, type 17 (EV_LED), code 0 (LED_NUML), value 0
### Brightness down, works.
Event: time 1664250299.376050, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1664250299.376050, -------------- SYN_REPORT ------------
Event: time 1664250299.429235, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1664250299.429235, -------------- SYN_REPORT ------------
### Brightness up, works.
Event: time 1664250303.397435, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1664250303.397435, -------------- SYN_REPORT ------------
Event: time 1664250303.462580, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1664250303.462580, -------------- SYN_REPORT ------------
### Speaker mute, works.
Event: time 1664250308.917516, type 4 (EV_MSC), code 4 (MSC_SCAN), value a0
Event: time 1664250308.917516, type 1 (EV_KEY), code 113 (KEY_MUTE), value 1
Event: time 1664250308.917516, -------------- SYN_REPORT ------------
Event: time 1664250308.971993, type 4 (EV_MSC), code 4 (MSC_SCAN), value a0
Event: time 1664250308.971993, type 1 (EV_KEY), code 113 (KEY_MUTE), value 0
Event: time 1664250308.971993, -------------- SYN_REPORT ------------
### Mic mute, doesn't work.
Event: time 1664250331.832285, type 4 (EV_MSC), code 4 (MSC_SCAN), value 82
Event: time 1664250331.832285, -------------- SYN_REPORT ------------
Event: time 1664250331.917810, type 4 (EV_MSC), code 4 (MSC_SCAN), value 82
Event: time 1664250331.917810, -------------- SYN_REPORT ------------
Event: time 1664250331.922914, type 4 (EV_MSC), code 4 (MSC_SCAN), value 58
Event: time 1664250331.922914, -------------- SYN_REPORT ------------
Some QAs/threads say that media keys that don't work is probably driver-related problem. However, I hope there's some workaround to solve this, since the key-press event is still detectable. Please help me getting the mic mute key working.
What I've done so far
/etc/udev/hwdb.d/some-name.hwdb
:
# Doesn't work.
evdev:name:AT Translated Set 2 keyboard:*
ID_INPUT_KEY=1
KEYBOARD_KEY_82=key_micmute
# Doesn't work.
evdev:name:AT Translated Set 2 keyboard:*
KEYBOARD_KEY_82=f20
Ok, so I can propose an alternative instead of a solution because i am facing the same problem in my HP Probook 640 G8.
I essentially wrote a shell script and made my own hotkey to mute/unmute the mic, now if you get no other solutions, you can try this one.
I mapped the script to
F8
which is same as the mute function on my laptop. But keep in mind that you have to pressF8
and not the function key, so to mute via this method, you have to press theFn
key withF8
key or turn onFn lock
.Open any text editor and paste this code
Save the file as
mute.sh
Navigate to the file in file manager.
Right-Click and select Open with Terminal.
Paste this command and press Enter:
Open Settings and go to Keyboard Shortcuts
Add a new shortcut, you can use any combination, I used
F8
.Paste the path to the file in the command field. Save and Done.