[PATCH libinput 2/2] evdev-mt-touchpad: Switch to smooth simple acceleration code from filter.c

Hans de Goede hdegoede at redhat.com
Tue Jul 1 05:32:56 PDT 2014


On 07/01/2014 06:33 AM, Peter Hutterer wrote:


> The idea is interesting. Indeed on the T440 with a relatively large and
> square-ish touchpad, this is much better now. On the x220 with a small
> 16:10 ratio touchpad it's better but not yet good. It feels like the pointer
> acceleration kicks in too quickly and too strongly, so there is no middle
> ground: movement is either slow and precise or it overshoots the target.
> Both have the same scaling factor (0.24) but due to the resolution, the
> values are oviously quite different. I played with adjusting the
> accel/threshold parameters on both and both touchpads can be made to feel
> good by adjusting the threshold a bit.

Which thresholds did you come up with for either ? Did you do:
"xset m 1 10" before testing ? Talking about that a few days ago you send
me a private mail with some lines to add to xf86-input-libinput to make it
disable X own's accel automatically, but I've already deleted that mail
before actually putting the 2 lines to use, can you give me those 2
lines again ?

> That doesn't bode well for the idea of "small touchpads should move the
> pointer move", but I don't know how to measure this generically or even
> objectively.

I think the best we can do is just try to come up with something which feels
ok to us with the default accel settings (note we may use different default
accel settings for touchpads) everywhere. There is no hard science involved
here, only lots of handwaving.

I'm going to the local hackerspace tonight, I'm currently preparing a
usb disk with rawhide + libinput + xf86-input-libinput on there, and I'll
try to test the new accel code on as much different model laptops as

> how did you come up with 1200 for DEFAULT_SIZE_ACCEL_NUMERATOR?

I went with a value which felt good on the 2 machines I've been testing on

> I found a
> value of 800 to be good enough by default on both, but that's
> going to change with every touchpad. What touchpads did you test this on?

On the T440s (large synaptics touchpad) and a Latitude E6430 (medium size
alps). I mostly fine tuned the value on the alps, since that one is the
hardest to get right (the touchpad is not the best in the world, so its
more sensitive to these kinda things).

> What about using the resolution to normalize movements based on physical
> movement where possible and falling back to this method where the resolution
> is set?

I think that that is a good idea, I'm not sure about the extra speed for
small touchpad things myself either, this will just give us a constant
speed per cm moved on touchpads advertising a resolution, which seems like
a good starting point.

> Talking about the patch:
> What's confusing about the comment is that you talk about leaving resolution
> out, right after we calculate the scaling coefficients based on the
> resolution. Which of course only serves to correct uneven resolutions, but
> still, it confused me. I'd like to see this reworded somehow.

Since we're switching to using resolution by default I'm going to completely
axe the comment in question and put in a much simpler comment instead.

I'll send a v2 of this patch soon-ish.



More information about the wayland-devel mailing list