HP ZBook 15u mic mute button doesn't work

Bug #1535219 reported by Ippolitov Igor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

This is mostly similar to this one:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1334968

I have an HP Zbook 15u laptop with a mic mute button at fn+f8. I didn't work for me with xubuntu LTS 14.04.03

What is wished: keyboard shortcut fn+f8 should produce XF86AudioMicMute X key code which mutes microphone.
What is happening: keyboard shotcut has keycode 465 which does nothing, while muting microphone through GUI enables led on the keyboard.

How to debug similar issues and fix:
Enable keyboard debug, find your scancode, remap it to f20, restart X.

Now in step by step instruction:
NB: keyboard sends scancodes, kernel makes keycodes from those. Keycodes are remapped in X before getting into applications

1) enable keyboard debug to make things easier: edit /etc/default/grub, add the following options
GRUB_CMDLINE_LINUX="atkbd.softraw=0", Reboot to enable this.
2) install "evtest" utility
3) using "evtest" find your keyboard (was /dev/input/event3 for me)
4) look for the key down and key up scancodes for fn+f8 button. Fixed version looks like this:
Event: time 1453101052.604985, -------------- SYN_REPORT ------------
Event: time 1453101053.883744, type 4 (EV_MSC), code 3 (MSC_RAW), value e0
Event: time 1453101053.883744, type 4 (EV_MSC), code 3 (MSC_RAW), value 01
Event: time 1453101053.883744, type 4 (EV_MSC), code 4 (MSC_SCAN), value 81
Event: time 1453101053.883744, type 1 (EV_KEY), code 190 (KEY_F20), value 1
Event: time 1453101053.883744, -------------- SYN_REPORT ------------
Event: time 1453101053.955411, type 4 (EV_MSC), code 3 (MSC_RAW), value e0
Event: time 1453101053.955411, type 4 (EV_MSC), code 3 (MSC_RAW), value 81
Event: time 1453101053.955411, type 4 (EV_MSC), code 4 (MSC_SCAN), value 81
Event: time 1453101053.955411, type 1 (EV_KEY), code 190 (KEY_F20), value 0

the "code 190 (KEY_F20)" will be different for you.

5) using "eventX" from the above, find corresponding device using "find /sys/ -name event3".
6) find out udev modalias for your keyboard: "udevadm --debug test /devices/platform/i8042/serio0/input/input3/event3 2>&1 | grep dmi/id", The long path is from p.5 'find' output
7) create and change /etc/udev/hwdb.d/60-hp-mic-mute-hotkey.hwdb file. Add following lines there:
keyboard:dmi:bvnHewlett-Packard:bvrM71Ver.01.07:bd07/28/2015:svnHewlett-Packard:pnHPZBook15uG2:pvrA3009D510303:rvnHewlett-Packard:rn2216:rvrKBCVersion96.55:cvnHewlett-Packard:ct10:cvr:
 KEYBOARD_KEY_81=f20
The long identifier is from udevadm point 6 output. "81" is the scan code. f20 - is an alias for the keycode we wish to have (can be replaced with '190' keycode itself)
8) udevadm hwdb --update; udevadm trigger /dev/input/event3
9) test with evtest that you have appropriate keycode for the button. To make it work in X11 you have to restart X (or reboot, don't know for sure)
10) test with xev after reboot: fn+f8 should work as intended this time. (xmodmap maps f20 to XF86AudioMicMute).
11) for xfce4 you might need to map XF86AudioMicMute to a pactl action, but this is xfce specific.

For the maintainers:
Mose of HPProBooks, EliteBooks, ZBooks has the same issue. Could anyone contact HP and request some help with all those keyboards?...

Please, add ZBook into keyboard.hwdb file.

Martin Pitt (pitti)
Changed in systemd (Ubuntu):
status: New → In Progress
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

Comitted to my keymap upstream branch, will send a PR soon.

Changed in systemd (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 229-4ubuntu1

---------------
systemd (229-4ubuntu1) xenial; urgency=medium

  * Merge with Debian unstable. Remaining Ubuntu changes:
    - Hack to support system-image read-only /etc, and modify files in
      /etc/writable/ instead.

    Upgrade fixes, keep until 16.04 LTS release:
    - systemd Conflicts/Replaces/Provides systemd-services.
    - Remove obsolete systemd-logind upstart job.
    - Clean up obsolete /etc/udev/rules.d/README.
    - systemd.postinst: Migrate mountall specific fstab options to standard
      util-linux "nofail" option.
    - systemctl: Don't forward telinit u to upstart. This works around
      upstart's Restart() always reexec'ing /sbin/init on Restart(), even if
      that changes to point to systemd during the upgrade. This avoids running
      systemd during a dist-upgrade. (LP: #1430479)
    - Provide shutdown fallback for upstart. (LP: #1370329)
    - Break lvm (<< 2.02.133-1ubuntu1) and remove our dummy /etc/init.d/lvm2
      on upgrades, as it's shipped by lvm2 now.
    - Make udev break on mdadm << 3.3-2ubuntu3, as udev's init script dropped
      the "Provides: raid-mdadm".
    - Clean up /var/log/udev on upgrade (which is written under upstart, but
      not under systemd). (LP: #1537211)
    - Migrate existing s390x network configuration to new names. (LP: #1526808)
    - systemd.postinst: Bump Version comparison for migrating the UTC setting
      from /etc/default/rcS to /etc/adjtime, to run it for upgrades to 16.04.
    - VMWare BIOS reports implausibly high onboard numbers. This got fixed in
      upstream commit 6c1e69f9. Migrate names in ifupdown accordingly.
      (LP: #1550539)
    - udev: Don't kill peer processes if we don't run in a cgroup. This happens
      when running under/upgrading from upstart. udevd and everything else run
      in the root hierarchy on all controllers then, and the alleged cleanup of
      "our" cgroup becomes a system-wide killing spree. (LP: #1555237)

systemd (229-4) unstable; urgency=medium

  * Fix assertion crash when processing a (broken) device without a sysfs
    path. (Closes: #819290, LP: #1560695)
  * Fix crash when shutdown is issued from a non-tty. (LP: #1553040)
  * networkd: Stay running while any non-loopback interface is up.
    (Closes: #819414)
  * Fix reading uint32 D-Bus properties on big-endian.
  * Fix crash if an udev device has many tags or devlinks. (LP: #1564976)
  * systemctl, loginctl, etc.: Don't start polkit agent when running as root.
    (LP: #1565617)
  * keymap: Add Add HP ZBook (LP: #1535219) and HP ProBook 440 G3.
  * systemd.resource-control.5: Fix links to cgroup documentation on
    kernel.org. (Closes: #819970)
  * Install test-udev into libudev-dev, so that we have it available for
    autopkgtests.
  * Add "udev" autopkgtest for running the upstream test/udev-test.pl.

 -- Martin Pitt <email address hidden> Thu, 07 Apr 2016 09:53:25 +0200

Changed in systemd (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.