Bug 98844 - Delay on touchpad mouse input with tapping enabled
Summary: Delay on touchpad mouse input with tapping enabled
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: 1.5.0
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-24 17:57 UTC by main.haarp
Modified: 2016-12-21 17:54 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
evemu log with some movement and tapping (9.11 KB, application/x-xz)
2016-11-29 18:12 UTC, main.haarp
Details

Description main.haarp 2016-11-24 17:57:47 UTC
Hello,

I'm using libinput 1.5.0 on X11. My Synaptics touchpad works, but experiences a noticeable delay on cursor movement when tapping is enabled. This is reminiscient of #89206, which is marked as fixed.

This delay makes fine cursor movement very difficult for me. The synaptics driver which I've been using before does not exhibit this behavior. I wonder if it uses different algorithms or just uses more aggressive thresholds.

Decreasing DEFAULT_TAP_MOVE_THRESHOLD TP_MM_TO_DPI_NORMALIZED fixed this issue for me. I found that I need to lower it to at least 0.5 for the delay to become unnoticeable. 1 was not enough.

Are there any objections to making this the default? I doubt I'm the only one who experiences it. Or maybe it could be exposed as a property?

Thanks!
Comment 1 Peter Hutterer 2016-11-27 21:17:19 UTC
run the touchpad-edge-detector tool and attach the output here please, I wonder if the dimensions are out of whack. see:

https://wayland.freedesktop.org/libinput/doc/latest/reporting_bugs.html
Comment 2 main.haarp 2016-11-29 18:12:51 UTC
Created attachment 128272 [details]
evemu log with some movement and tapping

Thanks for your answer! Sorry, I didn't find the page you linked before. Some more info:

Lenovo Thinkpad W530 (dmi:bvnLENOVO:bvrG5ETA5WW(2.65):bd03/04/2016:svnLENOVO:pn2447GZ2:pvrThinkPadW530:rvnLENOVO:rn2447GZ2:rvrNotDefined:cvnLENOVO:ct10:cvrNotAvailable:)

Touchpad physical dimensions are roughly 75x45mm. It's a normal non-clickpad with two physical buttons.

P: /devices/platform/i8042/serio1/input/input16/event14
N: input/event14
S: input/by-path/platform-i8042-serio-1-event-mouse
E: DEVLINKS=/dev/input/by-path/platform-i8042-serio-1-event-mouse
E: DEVNAME=/dev/input/event14
E: DEVPATH=/devices/platform/i8042/serio1/input/input16/event14
E: ID_INPUT=1
E: ID_INPUT_HEIGHT_MM=36
E: ID_INPUT_TOUCHPAD=1
E: ID_INPUT_WIDTH_MM=66
E: ID_PATH=platform-i8042-serio-1
E: ID_PATH_TAG=platform-i8042-serio-1
E: ID_SERIAL=noserial
E: LIBINPUT_DEVICE_GROUP=11/2/7/1b1:isa0060/serio1
E: LIBINPUT_MODEL_JUMPING_SEMI_MT=1
E: MAJOR=13
E: MINOR=78
E: SUBSYSTEM=input
E: USEC_INITIALIZED=15304100



And finally, touchpad-edge-detector:
Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event14
Move one finger around the touchpad to detect the actual edges
Kernel says:	x [1472..5470], y [1408..4498]
Touchpad sends:	x [1250..5631], y [1197..4834] \^C

Touchpad size as listed by the kernel: 66x36mm
Calculate resolution as:
	x axis: 3998/<width in mm>
	y axis: 3090/<height in mm>
Comment 3 Peter Hutterer 2016-11-29 22:52:59 UTC
thanks, looks like we need an override here, you're out by almost a cm and that does affect movement quite a bit.


(In reply to main.haarp from comment #2)
> And finally, touchpad-edge-detector:
> Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event14
> Move one finger around the touchpad to detect the actual edges
> Kernel says:	x [1472..5470], y [1408..4498]
> Touchpad sends:	x [1250..5631], y [1197..4834] \^C
> 
> Touchpad size as listed by the kernel: 66x36mm
> Calculate resolution as:
> 	x axis: 3998/<width in mm>
> 	y axis: 3090/<height in mm>

did you cut this output off? there should be much more to it including the suggested udev rule.
Comment 4 main.haarp 2016-11-30 08:27:00 UTC
(In reply to Peter Hutterer from comment #3)
> thanks, looks like we need an override here, you're out by almost a cm and
> that does affect movement quite a bit.

Thanks. I see the discrepancy, but how does this affect tapping? I'm just wondering how it works, since the error is 15%, while I had to reduce DEFAULT_TAP_MOVE_THRESHOLD by a factor of 6.

> did you cut this output off? there should be much more to it including the
> suggested udev rule.

Yes, there was an udev rule. I figured it was redundant to post here, as the same information was already present in "Touchpad sends"

Suggested udev rule:
# <Laptop model description goes here>
evdev:name:SynPS/2 Synaptics TouchPad:dmi:bvnLENOVO:bvrG5ETA5WW(2.65):bd03/04/2016:svnLENOVO:pn2447GZ2:pvrThinkPadW530:rvnLENOVO:rn2447GZ2:rvrNotDefined:cvnLENOVO:ct10:cvrNotAvailable:*
 EVDEV_ABS_00=1250:5631:<x resolution>
 EVDEV_ABS_01=1205:4834:<y resolution>
 EVDEV_ABS_35=1250:5631:<x resolution>
 EVDEV_ABS_36=1205:4834:<y resolution>
Comment 5 Peter Hutterer 2016-12-01 00:40:38 UTC
copy the snippet below into /etc/udev/hwdb.d/99-touchpad-ranges.hwdb and
then follow the instructions here:
https://wayland.freedesktop.org/libinput/doc/latest/faq.html#faq_hwdb_changes
Make sure the properties show up in the test output and that evemu-describe
sees the new axis ranges.

Once done, reboot and test the whole thing again, the movement threshold
should be down to about 3mm now (which is the intended bit).

# Lenovo W530
evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*pvrThinkPadW530*
 EVDEV_ABS_00=1250:5631:59
 EVDEV_ABS_01=1205:4834:81
 EVDEV_ABS_35=1250:5631:59
 EVDEV_ABS_36=1205:4834:81
Comment 6 Peter Hutterer 2016-12-08 00:23:59 UTC
ping?
Comment 7 main.haarp 2016-12-08 07:35:18 UTC
(In reply to Peter Hutterer from comment #6)
> ping?

I don't reboot very often, this had to wait for a bit :) But here we go.

"Touchpad size as listed by the kernel: 74x44mm"

this looks about correct. axis ranges in evemu-describes are also correct. However it didn't make any noticeable difference. When my finger hits the touchpad, the cursor only starts moving after a delay.

The dimensions were out of whack by roughly 15%, so this couldn't have had a large impact. Reducing DEFAULT_TAP_MOVE_THRESHOLD from 3 to 0.5mm however nicely fixes this for me.
Comment 8 Peter Hutterer 2016-12-21 04:30:47 UTC
fwiw, those corrections have been merged into systemd's hwdb, and I just pushed a fix to reduce the threshold to the repo.

commit e80873ca6fad5aafb346982e7c2b66f10acd3d33
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Dec 2 11:45:44 2016 +1000

    touchpad: reduce the tap movement threshold to 1.3mm

See also the writeup here
https://who-t.blogspot.com.au/2016/12/libinput-touchpad-tap-analysis.html
but at least for your specific use-case: I don't want to go down below 1.3mm because data from multiple users shows that's the required range. Moving to 0.5mm may reduce the delay you're experiencing, but that doesn't apply to all users, so we can't go down by that much without having unreliable tapping.

However, we also just merged some pointer acceleration improvements for touchpads, so I hope the combination of those two is satisfactory enough.
Comment 9 main.haarp 2016-12-21 17:54:26 UTC
Alright, thanks a lot! I suppose I can live with 1.3mm, it's still a lot better than 3. I like how you actually went to the effort to record statistics to improve this! Very very nice.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.