xf86-input-mtrack
xf86-input-mtrack copied to clipboard
Support palm rejection on some "minimal capability" trackpads
I recently purchased a System76 Pangolin (pang11), which is a rebranded Clevo NL50NU. I started using xf86-input-mtrack for inertial scrolling support, but found that several features don't work with my touchpad. One such feature was palm rejection. The touchpad on my computer identifies as
FTCS1000:00 2808:0101 Touchpad
After using evtest, I noticed this this touchpad is, well, pretty dumb. The only things that it really supports is absolute value multi-touch (no pressure, touch size, etc.) and the multitouch "TOOL_TYPE" property. The TOOL_TYPE property is changed when the touchpad detects a palm. On a normal touch, the value is TOOL_TYPE=0, but when a palm is placed on the touchpad, it shows TOOL_TYPE=2. I haven't figured out if TOOL_TYPE=1 is even possible, but despite my efforts, I have yet to see it.
That means, that for this touchpad, normal palm rejection won't work properly -- there is no size attribute given to calculate a palm ratio. So, I modified the driver to take into account the TOOL_TYPE for palm rejection on this dumb trackpad. The changes only apply to trackpads without pressure/size information and that also expose a TOOL_TYPE attribute.
Of course, this is tested and working on my trackpad now.
Trackpad information:
$ ./mtrack-test /dev/input/event12
mtrack[1] src/capabilities.c:196: Capabilities:
mtrack[...]: devname: FTCS1000:00 2808:0101 Touchpad
mtrack[...]: devid: 2808 101 100
mtrack[...]: ABS_MT_POSITION_X: min: 0 max: 1481
mtrack[...]: ABS_MT_POSITION_Y: min: 0 max: 911
mtrack[...]: ABS_MT_TOOL_TYPE: min: 0 max: 2
mtrack[...]: ABS_MT_TRACKING_ID: min: 0 max: 65535
mtrack[...]: ABS_MT_SLOT: min: 0 max: 4
mtrack[...]: enabled caps: left mtdata slot
mtrack[1] src/mconfig.c:185: Touchpad only supports multitouch and palm rejection.
width: 1481
height: 911