https://bugs.freedesktop.org/show_bug.cgi?id=101139

--- Comment #44 from Peter Hutterer <peter.hutte...@who-t.net> ---
Created attachment 138716
  --> https://bugs.freedesktop.org/attachment.cgi?id=138716&action=edit
synaptics-libinput-comparison.svg

Please keep this bug on-topic, the hysteresis issues are not for this bug.

Attaching my best efforts to compare synaptics and libinput for archival
purposes. The libinput curve is printed directly with the ptraccel-debug tool
(this is git master without the patches above). For the synaptics curve, I
created a uinput device that moves a touch from left to right at decreasing
time intervals and eventually gets to the maximum speeds shown. The various
values were printed as YAML to the xorg.log and extracted from there with
custom python scripts.

Since the server uses device coordinates everywhere, I divided the velocity for
synaptics values by the resolution I used in the uinput device. This should
give us mm.

The curves shown in the diagram are:
"synaptics" - the accelfct as returned from SynapticsAccelerationProfile for a
given speed. Notice how the curve isn't too dissimilar to the libinput curve in
shape, albeit the libinput curve includes the final accel factor.
"mult" - the multiplier used in the server's acceleratePointerPredictable(),
after taking constant deceleration and the synaptics acceleration factor into
account. This mult factor is then applied to the input deltas (these are in
device coordinates) and the closest match to the 'accel factor' that libinput
uses (but see below).
"libinput" - libinput accel factor applied to a delta at any given speed.

Constant deceleration in synaptics is 1/2.5 (0.4), and quite similar to the
MAGIC we use in libinput (0.37). That latter one was found by trial and error
but having those two similar indicates this is a good value.

I haven't even tried to change synaptics acceleration options, this makes it
even harder...

To the best of my knowledge, the curves are correct. But honestly, this is all
so convoluted that it's hard to be sure. And note that after applying the
acceleration factor, the device coordinates are scaled into screen coordinates
which depends on the screen resolution. IOW, different results for larger
screens (or screens with different aspect ratios). And for all I know, this may
change the curve significantly but this is even harder to test because the
rescaling will clip at screen edges and my testing approach hit those very
quickly.

Also, neither libinput nor synaptics are that simple, there is some analysis of
previous events to adjust the acceleration curve (e.g. on directional changes).

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
wayland-bugs mailing list
wayland-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs

Reply via email to