Pressing calculator key generates infinitely many key-press key-release events

Bug #1929345 reported by wl2776
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Medium
Lukas Märdian

Bug Description

Full description is posted in this AskUbuntu question: https://askubuntu.com/q/1336575/625814

I've got a new notebook HP Omen 15, manufactured in 2020. I has Calculator key, this key is actual normal media key.

Pressing on it launches calculator only once, after the OS is booted. No reaction for other presses.

If I run xev and press Calculator I see infinitely many messages about pressing and releasing XF86Calculator key:

...
KeyRelease event, serial 42, synthetic NO, window 0x3e00001,
root 0x29e, subw 0x0, time 52918, (151,-96), root:(151,806),
state 0x14, keycode 148 (keysym 0x1008ff1d, XF86Calculator), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 42, synthetic NO, window 0x3e00001,
root 0x29e, subw 0x0, time 52918, (151,-96), root:(151,806),
state 0x14, keycode 148 (keysym 0x1008ff1d, XF86Calculator), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 42, synthetic NO, window 0x3e00001,
root 0x29e, subw 0x0, time 52958, (151,-96), root:(151,806),
state 0x14, keycode 148 (keysym 0x1008ff1d, XF86Calculator), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 42, synthetic NO, window 0x3e00001,
root 0x29e, subw 0x0, time 52958, (151,-96), root:(151,806),
state 0x14, keycode 148 (keysym 0x1008ff1d, XF86Calculator), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 42, synthetic NO, window 0x3e00001,
root 0x29e, subw 0x0, time 52999, (151,-96), root:(151,806),
state 0x14, keycode 148 (keysym 0x1008ff1d, XF86Calculator), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
...

Then I press Ctrl-C to stop this stream.
This happens only once after the system is booted, next runs of xev don't show any events after pressing this key.

If I run showkey, it always shows scan codes and key codes for that key:

$ sudo showkey -s
kb mode was ?UNKNOWN?
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
0x9c
0xe0 0x21
0x1d
^Ccaught signal 2, cleaning up...
0xe0 0x21
$ sudo showkey -k
kb mode was ?UNKNOWN?
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
keycode 28 release
keycode 140 press
keycode 29 press
^Ccaught signal 2, cleaning up...

Debugging with evtest shows that this key doesn't generate any events, while some other keys do:

sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: Power Button
/dev/input/event1: Lid Switch
/dev/input/event2: Power Button
/dev/input/event3: AT Translated Set 2 keyboard
/dev/input/event4: Video Bus
/dev/input/event5: HP WMI hotkeys
/dev/input/event6: HDA NVidia HDMI/DP,pcm=3
/dev/input/event7: SONiX USB Keyboard
/dev/input/event8: SONiX USB Keyboard Consumer Control
/dev/input/event9: SONiX USB Keyboard System Control
/dev/input/event10: PixArt Dell MS116 USB Optical Mouse
/dev/input/event11: HDA NVidia HDMI/DP,pcm=7
/dev/input/event12: HDA NVidia HDMI/DP,pcm=8
/dev/input/event13: HDA NVidia HDMI/DP,pcm=9
/dev/input/event14: HDA NVidia HDMI/DP,pcm=10
/dev/input/event15: HDA NVidia HDMI/DP,pcm=11
/dev/input/event16: SYNA32A5:00 06CB:CE17 Mouse
/dev/input/event17: SYNA32A5:00 06CB:CE17 Touchpad
/dev/input/event18: HD-Audio Generic Mic
/dev/input/event19: HD-Audio Generic Headphone
/dev/input/event20: HP Wide Vision HD Camera: HP Wi
/dev/input/event21: WI-XB400 (AVRCP)
Select the device event number [0-21]: 5
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0
Input device name: "HP WMI hotkeys"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 138 (KEY_HELP)
Event code 141 (KEY_SETUP)
Event code 148 (KEY_PROG1)
Event code 153 (KEY_DIRECTION)
Event code 184 (KEY_F14)
Event code 185 (KEY_F15)
Event code 186 (KEY_F16)
Event code 187 (KEY_F17)
Event code 224 (KEY_BRIGHTNESSDOWN)
Event code 225 (KEY_BRIGHTNESSUP)
Event code 226 (KEY_MEDIA)
Event code 240 (KEY_UNKNOWN)
Event code 358 (KEY_INFO)
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Event type 5 (EV_SW)
Event code 1 (SW_TABLET_MODE) state 0
Event code 5 (SW_DOCK) state 0
Properties:
Testing ... (interrupt to exit)
Event: time 1621804159.221294, type 4 (EV_MSC), code 4 (MSC_SCAN), value 21a7
Event: time 1621804159.221294, type 1 (EV_KEY), code 186 (KEY_F16), value 1
Event: time 1621804159.221294, -------------- SYN_REPORT ------------
Event: time 1621804159.221328, type 1 (EV_KEY), code 186 (KEY_F16), value 0
Event: time 1621804159.221328, -------------- SYN_REPORT ------------
Event: time 1621804168.961868, type 4 (EV_MSC), code 4 (MSC_SCAN), value 21a5
Event: time 1621804168.961868, type 1 (EV_KEY), code 185 (KEY_F15), value 1
Event: time 1621804168.961868, -------------- SYN_REPORT ------------
Event: time 1621804168.961910, type 1 (EV_KEY), code 185 (KEY_F15), value 0
Event: time 1621804168.961910, -------------- SYN_REPORT ------------
Event: time 1621804176.067436, type 4 (EV_MSC), code 4 (MSC_SCAN), value 21a4
Event: time 1621804176.067436, type 1 (EV_KEY), code 184 (KEY_F14), value 1
Event: time 1621804176.067436, -------------- SYN_REPORT ------------
Event: time 1621804176.067460, type 1 (EV_KEY), code 184 (KEY_F14), value 0
Event: time 1621804176.067460, -------------- SYN_REPORT ------------
Event: time 1621804177.250432, type 4 (EV_MSC), code 4 (MSC_SCAN), value 21a9
Event: time 1621804177.250432, type 1 (EV_KEY), code 187 (KEY_F17), value 1
Event: time 1621804177.250432, -------------- SYN_REPORT ------------
Event: time 1621804177.250455, type 1 (EV_KEY), code 187 (KEY_F17), value 0
Event: time 1621804177.250455, -------------- SYN_REPORT ------------

Here I've pressed calculator key and Fn + some other keys, no events were on pressing calculator key.

I've got debugging and programming experience, so I'm ready to produce additional information about my system and participate in fixing this bug.

Tags: hotkeys
wl2776 (wl2776)
description: updated
description: updated
description: updated
Revision history for this message
No names pls (trappedindreams) wrote :

I have exactly the same problem. Any updates?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
calcopiritus (calcopiritus) wrote :

I have found that the steps in this answer:
https://askubuntu.com/a/1367801

Fixed the problem for me

Revision history for this message
Lukas Märdian (slyon) wrote :

A fix for this has been landed upstream (v250) for HP Omen 15 and another fix for Omen 17:

https://github.com/systemd/systemd/commit/6f2353a2ce731afc8622a3d44679abc38105cded
https://github.com/systemd/systemd/commit/70920214b6a1c1825a2724793497e6be2ba3c0fc

It might be worth backporting those into Ubuntu.

Changed in systemd (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Lukas Märdian (slyon) wrote :
Changed in systemd (Ubuntu):
assignee: nobody → Lukas Märdian (slyon)
status: Triaged → In Progress
Revision history for this message
Lukas Märdian (slyon) wrote :

This is now in jammy-proposed.

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 - 249.11-0ubuntu2

---------------
systemd (249.11-0ubuntu2) jammy; urgency=medium

  * Fix calculator key on HP Omen, using upstream 6f2353a & 7092021 (LP: #1929345)
    Files:
    - debian/patches/lp1929345/hwdb-Add-force-release-for-HP-Omen-15-calculator-key.-205.patch
    - debian/patches/lp1929345/hwdb-Force-release-calculator-key-on-all-HP-OMEN-laptops.patch
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=f834f64842191c7c7af450806964297babc764d5

 -- Lukas Märdian <email address hidden> Fri, 18 Mar 2022 17:12:07 +0100

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.