Bug 99239 - erratic edge scrolling with ALPS touchpad
Summary: erratic edge scrolling with ALPS touchpad
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-01 10:32 UTC by Brett Kerwin
Modified: 2017-01-05 00:32 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
evemu recording when edge scrolling with Xorg+synaptics (45.56 KB, text/plain)
2017-01-01 10:46 UTC, Brett Kerwin
Details
evemu recording when edge scrolling with Wayland, successful attempt (45.00 KB, text/plain)
2017-01-01 10:47 UTC, Brett Kerwin
Details
evemu recording when edge scrolling with Wayland, failed attempt (121.03 KB, text/plain)
2017-01-01 10:48 UTC, Brett Kerwin
Details

Description Brett Kerwin 2017-01-01 10:32:29 UTC
I am using an ALPS touchpad on a Dell Latitude E6320 (when using Xorg+synaptics, the touchpad is reported as 'AlpsPS/2 ALPS DualPoint TouchPad' by xinput).
Edge scrolling does not work well under Wayland, for two reasons:

1) the main reason is that it works unreliably (sometimes you have to try scrolling three or four times before it recognizes you are trying to scroll),

2) also, the scrolling speed seems a bit too high.

With synaptics it worked like a charm.
Comment 1 Brett Kerwin 2017-01-01 10:46:58 UTC
Created attachment 128699 [details]
evemu recording when edge scrolling with Xorg+synaptics
Comment 2 Brett Kerwin 2017-01-01 10:47:50 UTC
Created attachment 128700 [details]
evemu recording when edge scrolling with Wayland, successful attempt
Comment 3 Brett Kerwin 2017-01-01 10:48:25 UTC
Created attachment 128701 [details]
evemu recording when edge scrolling with Wayland, failed attempt
Comment 4 Peter Hutterer 2017-01-03 01:17:27 UTC
looks like the edges on the touchpad are out. Please run the touchpad-edge-detector tool (part of libevdev) and follow the instructions there.
Comment 5 Brett Kerwin 2017-01-03 09:32:11 UTC
It gives me this:

Touchpad AlpsPS/2 ALPS DualPoint TouchPad on /dev/input/event6
Move one finger around the touchpad to detect the actual edges
Kernel says:	x [0..2000], y [0..1400]
Touchpad sends:	x [97..1823], y [177..1299] |
^C

Touchpad has no resolution, size unknown
User-specified touchpad size: 80x40mm
Calculated ranges: 1726/1122

Suggested udev rule:
# <Laptop model description goes here>
evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:bvnDellInc.:bvrA19:bd11/14/2013:svnDellInc.:pnLatitudeE6320:pvr01:rvnDellInc.:rn0GJF11:rvrA01:cvnDellInc.:ct9:cvr:*
 EVDEV_ABS_00=97:1823:22
 EVDEV_ABS_01=177:1299:28
 EVDEV_ABS_35=97:1823:22
 EVDEV_ABS_36=177:1299:28

Another time I got this:
Touchpad sends:	x [73..1806], y [166..1307]
Comment 6 Peter Hutterer 2017-01-03 09:59:02 UTC
if you get different values, run your finger around the touchpad a number of times until the numbers stop changing. There's a clear discrepancy between the announced range and the effective range, that causes your edge scrolling to be too far in the middle to be detected. We don't have to be super precise but getting to the nearest millimeter is necessary.
Comment 7 Brett Kerwin 2017-01-04 19:14:07 UTC
Running the finger around the touchpad until the figures don't change any more does not provide the same values consistently.

The maximum/minimum values that I am typically able to obtain after trying really really hard are "x [79..1841], y [140..1325]".

Once, I was able to get "x [0..1825], y [102..1320]" but I am completely unable to reproduce this.  More generally, to get any value below 80 for the x coordinate, I have to center the finger off the touchpad, so that only the side of the finger brushes the touchpad.

Typical values that I get by keeping the finger on the touchpad and going as far as I can (trying hard) in every direction are "x [87..1928], y [166..1316]" or "x [87..1832], y [170..1311]".  I've just done this twice and the figures come out different, after stabilizing; that's how it is.
Comment 8 Peter Hutterer 2017-01-04 22:02:57 UTC
ok, let's go with the typical data in comment 7. PR submitted to systemd

https://github.com/systemd/systemd/pull/5022

Until this ends up in your distro you'll need a local override. The top of 60-evdev.hwdb has instructions on how to do this. See also https://wayland.freedesktop.org/libinput/doc/latest/faq.html#faq_hwdb_changes

I'm closing this as fixed in the hope that it resolves the issue. Please re-open if the ranges don't get applied correctly (typo or something) or if the scrolling is still eratic afterwards. Though in the latter case it's probably better if you just open a new bug and indicate there that we already fixed the ranges here.
Comment 9 Brett Kerwin 2017-01-04 22:30:10 UTC
I confirm this solves the problem with Wayland, thank you, though of course it breaks the currently correct behaviour of Xorg+synaptics, which probably had a specific workaround in its source code.  It would make sense to locate this workaround and to see if there are other similar workarounds in the same place, instead of having to rediscover them on a case-by-case basis.
Comment 10 Peter Hutterer 2017-01-05 00:03:11 UTC
synaptics should detect this model as alps and pick the right-most 15%. That's probably larger than what libinput picks, so I'm surprised it's broken now.
Comment 11 Brett Kerwin 2017-01-05 00:32:01 UTC
In fact, I meant "broken" in the sense that the scrolling area seemed abnormally large.  It may be somewhat larger than 15%, but if 15% is the normal area, I was probably just being biased by the habit of broken kernel values anyway, sorry.


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.