Bug 203181 - HP x3 Lap Dock clickpad not generating BTN_LEFT and BTN_RIGHT events
Summary: HP x3 Lap Dock clickpad not generating BTN_LEFT and BTN_RIGHT events
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: Other Linux
: P1 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-07 14:59 UTC by Jérôme de Bretagne
Modified: 2019-12-09 22:22 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.0 5.1 5.2 5.3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg extract (2.00 KB, text/plain)
2019-04-07 15:12 UTC, Jérôme de Bretagne
Details
xinput list (2.60 KB, text/plain)
2019-04-07 15:15 UTC, Jérôme de Bretagne
Details
xinput list-props (1.52 KB, text/plain)
2019-04-07 15:18 UTC, Jérôme de Bretagne
Details
evemu-describe (4.96 KB, text/plain)
2019-04-07 15:27 UTC, Jérôme de Bretagne
Details
hidraw_single_bottom_left_physical_click (18 bytes, application/octet-stream)
2019-04-07 15:31 UTC, Jérôme de Bretagne
Details
hidraw_single_bottom_right_physical_click (18 bytes, application/octet-stream)
2019-04-07 15:32 UTC, Jérôme de Bretagne
Details
hid-recorder bottom_left (21.48 KB, text/plain)
2019-04-08 20:27 UTC, Jérôme de Bretagne
Details
hid-recorder bottom_right (21.48 KB, text/plain)
2019-04-08 20:28 UTC, Jérôme de Bretagne
Details
hid-recorder 4_other_captures (16.18 KB, application/zip)
2019-04-08 20:38 UTC, Jérôme de Bretagne
Details

Description Jérôme de Bretagne 2019-04-07 14:59:19 UTC
With an HP x3 Lap Dock accessory, clicks with the clickpad are ignored while the touchpad is working fine otherwise. Tap clicks are working as expected but physical clicks are not triggering any events at all.

I can see raw events upon physical clicks with the clickpad in the HID raw output of the right device in /dev/hidrawX.

However, there is no corresponding event reported at all for physical clicks with evtest or evemu-record, while other actions (tapping, moving, etc.) are showing in the output properly.

The HID raw output is consistent and 100% reproducible, with one small set of events for physical clicks on the bottom left corner:

# hexdump -C hidraw_single_bottom_left_physical_click
00000000  01 01 00 00 00 00 00 00  00 01 00 00 00 00 00 00  |................|
00000010  00 00                                             |..|

and another set for physical clicks the bottom right corner:

# hexdump -C hidraw_single_bottom_right_physical_click
00000000  01 02 00 00 00 00 00 00  00 01 00 00 00 00 00 00  |................|
00000010  00 00                                             |..|

The touchpad doesn't detect finger touch in the bottom left and right corners so the HID raw output is small in these cases; when clicking outside of these 2 zones, the output is mixed with touch events.

It seems that BTN_LEFT and BTN_RIGHT events are not generated for this hardware, it maybe needs a quirk or a specific code to detect these HID raw events.

The clickpad on this touchpad has never worked, as far as I know, and I've tested on a quite quite recent Linux kernel built from drm-tip (5.1.0-rc1.20190321).

I'll provide some logs / outputs below, feel free to ask for some more.
Comment 1 Jérôme de Bretagne 2019-04-07 15:12:53 UTC
Created attachment 282161 [details]
dmesg extract

Here is a small extract of dmesg
Comment 2 Jérôme de Bretagne 2019-04-07 15:15:20 UTC
Created attachment 282163 [details]
xinput list

Here is the output of xinput list
Comment 3 Jérôme de Bretagne 2019-04-07 15:18:11 UTC
Created attachment 282165 [details]
xinput list-props

Here is the ouput of xinput list-props on the right touchpad.
Comment 4 Jérôme de Bretagne 2019-04-07 15:27:37 UTC
Created attachment 282167 [details]
evemu-describe

Here is the output of evemu-describe.

It only lists BTN_LEFT and not BTN_RIGHT, while the hardware is generating dedicated events separately for the bottom left and bottom right corners.

By the way, this device didn't always behave this way, as support for touchpad physcial clicks (and drag and drop) was added in the latest firmware revision T0057 (which my unit is running) as described here for instance:

https://www.windowscentral.com/new-firmware-hp-lap-dock-touchpad
Comment 5 Jérôme de Bretagne 2019-04-07 15:31:44 UTC
Created attachment 282169 [details]
hidraw_single_bottom_left_physical_click

The HID raw output from a single click in the bottom left corner:
# cat /dev/hidraw5 > hidraw_single_bottom_left_physical_click
Comment 6 Jérôme de Bretagne 2019-04-07 15:32:59 UTC
Created attachment 282171 [details]
hidraw_single_bottom_right_physical_click

The HID raw output from a single click in the bottom right corner:
# cat /dev/hidraw5 > hidraw_single_bottom_right_physical_click
Comment 7 Jérôme de Bretagne 2019-04-08 20:24:47 UTC
As suggested by Peter in https://gitlab.freedesktop.org/libinput/libinput/issues/264, I'm attaching captures taken with hid-recorder to share the HID reports.
Comment 8 Jérôme de Bretagne 2019-04-08 20:27:37 UTC
Created attachment 282177 [details]
hid-recorder bottom_left

Here is the capture of a single physical click in the bottom left corner
Comment 9 Jérôme de Bretagne 2019-04-08 20:28:39 UTC
Created attachment 282179 [details]
hid-recorder bottom_right

Here is the capture of a single physical click in the bottom right corner
Comment 10 Jérôme de Bretagne 2019-04-08 20:38:23 UTC
Created attachment 282181 [details]
hid-recorder 4_other_captures

Finally, here are 4 captures of a single physical click in 4 other regions:
- bottom center
- top left
- top center
- top right

In those 4, there is no clear reference to a button press it seems, as opposed to the content of the previous 2 captures in the bottom corners.
Comment 11 Peter Hutterer 2019-04-08 23:58:19 UTC
Benjamin: looks like the buttons come in as Report ID 1 (Mouse) and still as left/right button presses there, even though the device uses the touchpad mode otherwise. All the data from comment 10 comes in via Report ID 4 (Touchpad).

Evemu record from the libinput bug says: Kernel: 5.1.0-rc1.20190321.01-drm-tip+
Comment 12 Benjamin Tissoires 2019-04-09 08:24:44 UTC
I guess this is one more reason to not filter out the mouse node on touchpads.

The only thing I am not that happy about is that this touchpad doesn't even expose itself as a Win8 Precision Touchpad. So that means I should enable the mouse node for everybody, and hope that Win7 touchscreens are a thing of the past.
Comment 13 Jérôme de Bretagne 2019-04-09 09:03:50 UTC
This HP model was indeed described as *not* having a Precision Touchpad when launched, for instance in this review:

https://m.windowscentral.com/hp-lap-dock-review
Comment 14 Jérôme de Bretagne 2019-09-17 21:10:24 UTC
Hi Benjamin, hi Peter,

I've just recently seen Benjamin's patch, proposed here a few weeks ago:
   https://patchwork.kernel.org/patch/11090121/
   [1/2] HID: multitouch: do not filter mice nodes
and it seemed to me somehow related to the point discussed in comment 12.

So I've compiled a newer kernel with this small change applied and I'm happy to report that the physical clicks on the HP x3 Lap Dock are now working perfectly: left and right single-clicks, double-clicks, click-and-drag, etc. Thanks so much.

I'll close this bug once the patch is officially merged upstream, hopefully in kernel 5.4.0

Jérôme


P.S. My kernel build is based on drm-tip, for other reasons, 5.3.0+ on commit 2019y-09m-16d-21h-12m-08s for reference.
Comment 15 Jérôme de Bretagne 2019-12-09 22:22:31 UTC
I can confirm that this issue is now fixed in kernel 5.4.0 , thanks again.

Jérôme

Note You need to log in before you can comment on or make changes to this bug.