Bug 46617 - [regression:2603ad69] edge-scrolling one pixel equals one full scroll on Alps pad
Summary: [regression:2603ad69] edge-scrolling one pixel equals one full scroll on Alps...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/synaptics (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Peter Hutterer
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-25 08:36 UTC by JR
Modified: 2012-04-26 16:01 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
synclient output, evemu device description and event recording (11.33 KB, application/x-gzip)
2012-02-28 08:03 UTC, JR
no flags Details
0001-Fix-scoll-increment-for-non-smooth-scrolling-46617.patch (1.52 KB, patch)
2012-02-29 22:28 UTC, Peter Hutterer
no flags Details | Splinter Review
Xorg log including backtraces from server stall (63.60 KB, text/plain)
2012-03-25 12:53 UTC, Giuseppe Bilotta
no flags Details
synclient -l log (after setting the scrolling deltas to 10) (2.17 KB, text/plain)
2012-03-25 12:59 UTC, Giuseppe Bilotta
no flags Details
evemu output for scrolling on my touchpad (3.52 KB, application/zip)
2012-03-25 23:41 UTC, Giuseppe Bilotta
no flags Details

Description JR 2012-02-25 08:36:20 UTC
Kubuntu 11.10 amd64 running on a Dell Precision E6520. xinput reports the touchpad as being an Alps. xf86-input-synaptics is from git, and xorg is otherwise from the xorg-edgers ppa. Full package version is 2:1.11.2.902+git20111209+server-1.11-branch.0ca8869e-0ubuntu0sarvatt~oneiric. The linux kernel is version 3.3.0rc4.

Since starting to use the Synaptics driver from git, edge-scrolling has become unusably sensitive. One pixel's worth of finger movement translates to one scroll "tick" (about ~3 lines of console text).

I bisected it to commit 2603ad69 (Oct 18 2011); "Use the scroll distances as increment for scrolling valuator axes". The bug goes away if I build the commit previous (4f46057a).

I'd be more than happy to provide more debugging information (dumps etc), but before receiving instructions I don't know what would help.

If of any interest whatsoever, alps is mentioned in dmesg as follows;
>[   11.137622] alps.c: E6 report: 00 00 64
>[   11.160525] alps.c: E7 report: 73 02 64
>[   11.608841] alps.c: E6 report: 00 00 64
>[   11.627972] alps.c: E7 report: 73 02 64
>[   11.744804] alps.c: trackstick E7 report: 42 02 3c
Comment 1 Peter Hutterer 2012-02-27 18:59:15 UTC
what is the output of synclient -l and can you please record such a motion with evemu.

sudo evemu-describe /dev/input/eventXX > touchpad.desc
sudo evemu-record /dev/input/eventXX > touchpad.events

Where XX should be the event number of your touchpad (see /proc/bus/input/devices). During evemu-record, perform the input needed to reproduce the issue. Then attach both files here. You _must_ VT-switch away from the X server before running evemu-record.
Comment 2 JR 2012-02-28 08:03:09 UTC
Created attachment 57772 [details]
synclient output, evemu device description and event recording

Tarball attached.

For the recording I did three full edge scrolls (bottom to top and back).
Comment 3 Peter Hutterer 2012-02-29 22:28:25 UTC
Created attachment 57845 [details] [review]
0001-Fix-scoll-increment-for-non-smooth-scrolling-46617.patch

quickpatch, but it should fix it, can you pleas test it?
Comment 4 whitequark 2012-03-01 17:03:57 UTC
The patch works for me (Elantech PS/2 touchpad, v3; like Synaptics).
Comment 5 Peter Hutterer 2012-03-04 18:10:40 UTC
commit cddab79c408db3b13905a2be72aff4f7bf1406f8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Mar 1 16:27:01 2012 +1000

    Fix scoll increment for non-smooth scrolling (#46617)
Comment 6 Giuseppe Bilotta 2012-03-21 10:21:31 UTC
I'm afraid this fix actually broke support for my device: with the default Scrolling Distance of 100 I now need a full finger swipe, from top to bottom, just to get a single notch in scrolling. Setting the Scrolling Distance to something like 10 makes it usable again.

Excerpt from Xorg.0.log:

[    87.572] (--) synaptics: SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5472
[    87.572] (--) synaptics: SynPS/2 Synaptics TouchPad: y-axis range 1408 - 4448
[    87.572] (--) synaptics: SynPS/2 Synaptics TouchPad: pressure range 0 - 255
[    87.572] (--) synaptics: SynPS/2 Synaptics TouchPad: finger width range 0 - 15
[    87.572] (--) synaptics: SynPS/2 Synaptics TouchPad: buttons: left right
[    87.572] (--) synaptics: SynPS/2 Synaptics TouchPad: Vendor 0x2 Product 0x7
[    87.572] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found

in dmesg the device is identified as

[    8.486101] psmouse serio1: synaptics: Touchpad model: 1, fw: 6.5, id: 0x1c0b1, caps: 0xa04751/0xa00000/0x0
Comment 7 Peter Hutterer 2012-03-21 20:37:55 UTC
Can I have your full log please and the output of synclient -l?
Are we talking edge scrolling here or twofinger scrolling?

Does the speed of swiping the finger matter?
Comment 8 Giuseppe Bilotta 2012-03-25 12:51:10 UTC
Further information: I'm running Debian unstable. The issue presents itself both with the official Debian package and with latest synaptics driver compiled with git. Furthermore, some times (I have not been able to find out if it's just a matter of time, or it depends on some other factor) the X server locks up due to too many events received. This is an old touchpad that doesn't support two-finger detection, so it's an edge scroll. I'm attaching a complete Xorg log, including the backtraces corresponding to the X server lockup. After the second lockup, even if control goes back to the server, I cannot do anything but forcefully terminate the server (I cannot change window, nor with the keyboard nor with mouse, etc).
Comment 9 Giuseppe Bilotta 2012-03-25 12:53:45 UTC
Created attachment 59025 [details]
Xorg log including backtraces from server stall

This was produced with self-built driver from git version 4a80c0dc38ea4dafcb112191c2dd7e0082193263 (tag xf86-input-synaptics-1.5.99.902)
Comment 10 Giuseppe Bilotta 2012-03-25 12:55:41 UTC
Forgot to reply about the speed of swipe: with the default settings, I only get _one_ scroll event if I sweep the finger very fast from top to bottom of the edge.
Comment 11 Giuseppe Bilotta 2012-03-25 12:59:04 UTC
Created attachment 59026 [details]
synclient -l log (after setting the scrolling deltas to 10)

synclient -l output. This is after setting the scrolling deltas to 10 as opposed to the default value 100.
Comment 12 Peter Hutterer 2012-03-25 22:07:49 UTC
I noticed that your Hysteresis settings are higher than my defaults here (8, not 25). This may have an effect. Other than that, I'm not sure but it's worth trying what difference this makes.

Either way, I think I need to reproduce this bug, can you please run evemu against the device and record both the device and one event sequence of edge scrolling.

http://people.freedesktop.org/~whot/evemu/
Comment 13 Giuseppe Bilotta 2012-03-25 23:41:40 UTC
Created attachment 59048 [details]
evemu output for scrolling on my touchpad

The zip contains three files: synps2.desc produced by evemu-describe, and .events and .events2 from evemu-record. The difference between events and events2 is the speed of the edge motion: with events, no scrolling would be produced, with events2 a (small amount of) scrolling would be produced; both motions cover the whole edge (top to bottom).
Comment 14 Giuseppe Bilotta 2012-03-25 23:47:00 UTC
You might be onto something with the Hysteresis thing. I'm noticing that I sometimes get a scrolling even with slower motions, esp. while I'm already scrolling; also, the amount of scrolling doesn't seem to be consistent: the same amount of motion may give me different amounts of scrolling at different times (initial motion, while already scrolling, etc).

(By the way, aside from the annoyance of changing the delta settings, my biggest problem with this driver version is the sporadic lockups that tend to force me to kill the server to regain control.)
Comment 15 Giuseppe Bilotta 2012-03-25 23:54:40 UTC
Ok, I tried setting "Synaptics Noise Cancellation" to 0 0. The situation has improved some, but: (1) the scrolling still feels sluggish, as if stuck in molasses (2) smaller motions that used to generate scrolling still don't work. Setting the scrolling distance to something much lower than 100 (in the orders of the 10s or 20s) while keeping the noise cancellation at the default 25 still provides the best (for me) experience. At least between one lockup and the next.
Comment 16 philcolbourn 2012-04-23 03:38:58 UTC
I'm new to this. I recently got synaptics-1.5.99-902-1. 

It two-finger scrolled poorly. 

Adjusting VertScrollDelta to a small number (5-10) helped.

Previously I had 1.5.0-2 which worked fine.

I git-bisected this scrolling behaviour and it seems to occur with this patch related to this bug.

Two-finger scrolling seems very sensitive/fast before this patch which I guess is a different issue.

I hope I have run git bisect, and interpreted its output, correctly.

This is what was displayed on the last run:

phil@min:~/Development/synaptics.git$ git bisect good

cddab79c408db3b13905a2be72aff4f7bf1406f8 is the first bad commit
commit cddab79c408db3b13905a2be72aff4f7bf1406f8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Mar 1 16:27:01 2012 +1000

    Fix scoll increment for non-smooth scrolling (#46617)
    
    Introduced in 2603ad69b997c999404ecc441e0d64ea2cc22018. Previously, the
    delta was incremented by (actual delta/scroll dist), button clicks where
    then sent while (delta-- >= 1).
    
    After 2603ad69b997c999404ecc441e0d64ea2cc22018, the delta was incremented by
    the delta only, scroll dist was used as increment in the smooth scrolling
    information. On non-smooth-scrolling servers, the driver would now send
    too many events. Restore the old behaviour by dividing by the scroll
    distance before entering the button click loop.
    
    X.Org Bug 46617 <http://bugs.freedesktop.org/show_bug.cgi?id=46617>
    
    Tested-by: Peter Zotov <whitequark@whitequark.org>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

:040000 040000 2949f0ddca5e3b158adcf9044eb6c5e3f0bff990 0958387eee6136a5aacdff9db87bbad7cddcdd98 M	src
Comment 17 Peter Hutterer 2012-04-25 18:01:18 UTC
(In reply to comment #8)
> Furthermore, some times (I have not been able to find out if it's
> just a matter of time, or it depends on some other factor) the X server locks
> up due to too many events received. 

fwiw 1c155f644824133315ac5b3dac9076db71430eb6 should have fixed this part.
Comment 18 Peter Hutterer 2012-04-25 20:08:18 UTC
http://patchwork.freedesktop.org/patch/10087/
Comment 19 Giuseppe Bilotta 2012-04-26 01:46:59 UTC
I tried the current git and the scrolling seems to be fixed indeed: the touchpad is again usable without any customization of the input values.

I do not know if the X server lock / too many events errors is fixed too yet, since I just started using the new version and the problem was not reproducible consistently. I believe we can mark this issue as fixed though. If I happen to come across the "Too many events" error and lockup, I will reopen it.
Comment 20 Peter Hutterer 2012-04-26 16:01:17 UTC
issue demonstrated with the evemu log fixed with

commit 1a76d9f00e1e54ba912a47aa665968e0cfe1b8a0
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Apr 26 11:47:19 2012 +1000

    Don't unconditionally divide by scroll_dist_vert (#46617)


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.