BUG: palm recognition / confidence is not working properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello -

I think I've found a bug, either with hid-multitouch, or with the
quirks for my device.

I have an HP Spectre x360, which has a nice haptic touchpad, with
excellent finger tracking; the model is ELAN07CE:00 04F3:32C8
Touchpad.

I noticed that palm rejection wasn't working, and after some
investigation found that the touchpad uses "Confidence" as a way to
indicate whether a given touch is a finger or a palm. So I disabled
MT_QUIRK_ALWAYS_VALID and enabled MT_QUIRK_VALID_IS_CONFIDENCE.

While this worked, and palm touches were now not being sent via evdev,
occasionally the cursor will "lock up" after I have been typing or
doing other things that involve resting my palms on the touchpad. I've
examined the hidraw output during these situations, and the touchpad
is sending correct data.

I believe what is happening is that the kernel is holding a slot for a
finger/palm that is no longer there, and so all subsequent touches,
even if single-finger, are interpreted as "gestures" by libinput.

I've tried setting MT_QUIRK_SLOT_IS_CONTACTID, since the touchpad
reliably maps each touch to a contactID - this doesn't help.

I've tried using MT_QUIRK_CONFIDENCE instead, which seemed promising,
but never see any ABS_MT_TOOL_TYPE event codes (neither MT_TOOL_FINGER
or MT_TOOL_PALM) reported by evtest.

So my questions are:
1) Is the MT_QUIRK_VALID_IS_CONFIDENCE messing up event/slot tracking
somehow? The "lock up" doesn't happen when this quirk is not set.

I've attached a recording of the issue in the attached yaml file from
`libinput record --with-hidraw`. It includes the initial palm touches,
followed by a one finger motion that was ignored or misinterpreted
somewhere in the stack due to the prior palm touches, followed by a
6-finger touch on the touchpad, which reliably resets the tracking
state since the touchpad only supports 5 fingers.

2) Why am I unable to get MT_TOOL_FINGER or MT_TOOL_PALM reports to
show up anywhere? It seems like there is some kind of legacy emulation
going on (converting finger tools to BTN_TOOL?), but I haven't figured
out how or why this is happening.

Happy to provide more info if necessary.

Set of quirks I'm using:
default (no issues except false touches)
MT_QUIRK_ALWAYS_VALID | MT_QUIRK_CONTACT_CNT_ACCURATE

palm-reject (rejects palm, but appears to hold slots for fingers that
aren't there any more):
MT_QUIRK_VALID_IS_CONFIDENCE | MT_QUIRK_CONTACT_CNT_ACCURATE

use-tool (attempt to get "real" tools working - currently has the same
effect as default):
MT_QUIRK_CONFIDENCE | MT_QUIRK_CONTACT_CNT_ACCURATE

Thanks,
Jon


Attachments follow:

$ evtest /dev/input.event12
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x4f3 product 0x32c8 version 0x100
Input device name: "ELAN07CE:00 04F3:32C8 Touchpad"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 272 (BTN_LEFT)
    Event code 325 (BTN_TOOL_FINGER)
    Event code 328 (BTN_TOOL_QUINTTAP)
    Event code 330 (BTN_TOUCH)
    Event code 333 (BTN_TOOL_DOUBLETAP)
    Event code 334 (BTN_TOOL_TRIPLETAP)
    Event code 335 (BTN_TOOL_QUADTAP)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value   2470
      Min        0
      Max     4936
      Resolution      31
    Event code 1 (ABS_Y)
      Value    696
      Min        0
      Max     3045
      Resolution      31
    Event code 47 (ABS_MT_SLOT)
      Value      1
      Min        0
      Max        4
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max     4936
      Resolution      31
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max     3045
      Resolution      31
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max    65535
  Event type 4 (EV_MSC)
    Event code 5 (MSC_TIMESTAMP)
Properties:
  Property type 0 (INPUT_PROP_POINTER)
  Property type 2 (INPUT_PROP_BUTTONPAD)

Attachment: touchbug3.yaml
Description: application/yaml


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux