Summary: | Lenovo Yoga 11S touchpad is jittery | ||
---|---|---|---|
Product: | Wayland | Reporter: | Daniel van Vugt <daniel.van.vugt> |
Component: | libinput | Assignee: | Wayland bug list <wayland-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | low | CC: | Hi-Angel, michael, peter.hutterer, tomi |
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
See Also: | https://launchpad.net/bugs/1749689 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | 105202, 105303 | ||
Bug Blocks: | 104828 | ||
Attachments: |
yoga11s_one_finger_still.txt (evemu recording)
0001-touchpad-use-the-fuzz-value-if-any-for-the-hysteresi.patch 0001-evdev-change-hysteresis-to-work-across-both-axes.patch |
Created attachment 137490 [details] [review] 0001-touchpad-use-the-fuzz-value-if-any-for-the-hysteresi.patch Give this one a try please. synaptics was using the fuzz value, so that probably explains the better response. Will do. Although, will that fix keep working after hysteresis turns off? Or would it stop hysteresis from turning off? it's unrelated, it just changes how the hysteresis behaves when it's enabled but it doesn't affect when/how it is enabled/disabled. ideally, it should make the touchpad more responsive even when the hysteresis is needed. Sounds like a good idea, but also like something I can't test unless I add some hacks to stop hysteresis from quickly turning off, right? Also, even if that worked the patch mentions this bug as if it's a fix. But clearly it would not be a fix for this bug if hysteresis is still turning off. It sounds like the patch needs changing before I even test it. At least to not mention this bug. Later I guess, if we are lucky enough to find that fuzz solves lots of problems with hysteresis then maybe we could consider never turning it off(!). Then that would be a real fix for this one and other bugs. just comment out the tp_maybe_disable_hysteresis() call for testing. and yes, if that fixes the issue with wobbly pointers but gives reasonable responsiveness, then that's one way to just completely avoid the hysteresis enabling/disabling option. Confirmed on two machines (Yoga 11S and X1 Carbon gen 5) that using fuzz is a better idea than resolution/2. Just still not as good as completely disabling hysteresis (the cursor still visibly moves in squares, just smaller squares now). Caveats: 1. That patch mentions this bug when it shouldn't. It's not a fix for this bug. 2. That patch assumes fuzz==0 means unknown fuzz. But I suspect for some devices, fuzz=0 is the correct fuzz to use (equivalent to never enabling hysteresis at all). I can't find documentation confirming this theory though. 'moves in squares' when you actually move the cursor, right? Does it wobble? 1) fwiw, a bug link is not always a signal that the bug is fixed, but rather a reference to some other documentation so in a year's time we know where we got a patch idea from. 2) fuzz of 0 as "no hysteresis" is used by the synaptics driver, but tbh I'm doubtful that's a correct approach. Devices have a tendency to be outright wrong and 0 is the only default value here. Which means 0 is shared by devices that don't have fuzz and by devices that simply don't fill it in. Having said that, might be worth just seeing how long it takes for someone to complain :) The wobble is gone because hysteresis is always enabled (I hardcoded it to enabled). That's not a change introduced by the patch though. Moving in squares (when the finger moves in circles) is the same old problem with the hysteresis algorithm, not a problem with the hysteresis magnitude. That all said, I support the idea of committing attachment 137490 [details] [review]. Just remember to not close this bug. Once we're using fuzz, perhaps it will be possible to tweak the fuzz (hence tweak the hysteresis) for each touchpad externally, like libinput-model-quirks? it's already doable, the EV_ABS lines in 60-evdev.hwdb support fuzz and flat as well (order is x:y:resolution:fuzz:flat). But before we do that we need a tool to measure what the fuzz would be. Having users just submit entries they think are correct to the system-wide hwdb is bound to be painful in the long run. Oh, and that tool needs to reset fuzz to 0 to make sure the kernel doesn't get in the way of the measurements. Sounds like a plan: 1. Start using fuzz if available. 2. Never disable hysteresis; and 3. Submit proper measurements and fuzz tweaks per-model. And maybe in parallel: Reassess the feasibility of making hysteresis omnidirectional so that circles with the finger don't equate to squares with the cursor. Created attachment 137524 [details] [review] 0001-evdev-change-hysteresis-to-work-across-both-axes.patch > Reassess the feasibility of making hysteresis omnidirectional so that circles > with the finger don't equate to squares with the cursor. I had a patch for this a year or so ago, but it didn't get any testing or positive test results, can't remember. Attaching here so it's public at least. should apply on 1.9.0 but probably not on master Alright, https://github.com/whot/libinput/tree/wip/hysteresis-wobbles is the compiled branch for all the current hysteresis fixes. Please give it a test. This includes: * reducing to the fuzz * enabling hysteresis where fuzz != 0 * wobble detection from Hi-Angel [slightly modified by me, but the functionality is the same] * hysteresis fixes to work across both axes simultaneously The last one I'm not 100% sure about, I just finished the code and there may be a massive thinko. Tests and sanity-checks appreciated. FWIW, the 1.10 release was a huge improvement for my Lenovo Flex 5-1470 laptop. Unfortunately, I have a Dell Inspiron 15-3531 that has a similar jittery/wobble issue with libinput 1.10 (Fedora). I built/installed your wip/hystersis branch, and it's a huge improvement over 1.10 on my Dell. However, it seems to wobble if I leave my finger down after moving the pointer. If it's useful, I can make some recordings and post it here (or make a new bug). Thanks. A new bug would be best since this one is explicitly for the Yoga 11S. Tested 'wip/hysteresis-wobbles' on Yoga 11S. It seems more broken than any other branch so far. The cursor actually wobbles in directions that the finger isn't going in. When I say "wobbles", I mean the problems with 'wip/hysteresis-wobbles' are bigger than the problems with 1.10 that I originally called "jitter". I think the way forward here is: 1. Use fuzz as the hysteresis threshold(s). 2. Modify hysteresis to be omnidirectional (test if raw (dx,dy) is within the ellipse defined by the hysteresis thresholds (hx,hy)). 3. Hysteresis always on. > 1. Use fuzz as the hysteresis threshold(s). yep, already part of that patchset > 2. Modify hysteresis to be omnidirectional the commit introducing that feature seems to trigger the wobble/jitter/..., see see https://bugs.freedesktop.org/show_bug.cgi?id=104828#c35 And as pointed out in that comment, I'm out of ideas on having an omnidirectional hysteresis that doesn't add the same issues that we've seen before (circle -> square movement) > 3. Hysteresis always on. That's already part of the patchset, provided fuzz is nonzero. (In reply to Peter Hutterer from comment #1) > Created attachment 137490 [details] [review] [review] > 0001-touchpad-use-the-fuzz-value-if-any-for-the-hysteresi.patch > > Give this one a try please. synaptics was using the fuzz value, so that > probably explains the better response. Just curious, what hysteresis algo synaptics been using? Was it the same that libinput have now? I've never looked into the synaptics algorithm. However good news: I got omnidirectional (elliptical) hysteresis working yesterday. I will formalise it into a patch today... > what hysteresis algo synaptics been using? Was it the same
> that libinput have now?
yeah, should be the same. The synaptics defaults are fuzz or if fuzz is 0, the 0.5% of the touchpad diagonal. No accommodation for different resolutions.
The functions are the same, see src/synaptics.c hysteresis() and in libinput the evdev_hysteresis() function. Look different, but return the same values.
See bug 105306. It's a separate bug because that enhancement alone doesn't fix the other bugs already open. However once combined with: - smaller margins (fuzz); and - hysteresis always on then I think we will have a complete fix for this bug and others. I think with the series from https://lists.freedesktop.org/archives/wayland-devel/2018-March/037297.html, this should be it for this bug? Confirmed the bug is fixed (just OK) using both patches 1 & 2: https://lists.freedesktop.org/archives/wayland-devel/2018-March/037297.html https://lists.freedesktop.org/archives/wayland-devel/2018-March/037298.html BUT it feels surprisingly numb, as if fuzz amount is wrong. Then adding patch 3 does feel better: https://lists.freedesktop.org/archives/wayland-devel/2018-March/037299.html P.S. The patches don't apply cleanly and the 3rd one has a minor conflict. thanks for testing, merged and pushed commit ea7498ef971350454db9c78b9ba160e7d6bb455b Author: Peter Hutterer <> Date: Wed Feb 21 13:41:31 2018 +1000 touchpad: use the fuzz value (if any) for the hysteresis margin commit 1b64888a2248af2a287365598cf520e4e2be33fd Author: Peter Hutterer <> Date: Fri Feb 23 11:44:23 2018 +1000 touchpad: enable hysteresis based on a 0 fuzz value commit 1523d8bb2e066bec297f7a03ce4a0d8cada8f383 Author: Peter Hutterer <> Date: Mon Mar 5 13:17:43 2018 +1000 Extract and reset the abs fuzz value for the x/y axes *** Bug 105675 has been marked as a duplicate of this bug. *** |
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.
Created attachment 137371 [details] yoga11s_one_finger_still.txt (evemu recording) Lenovo Yoga 11S touchpad is jittery. The cursor moves a little even when I try to keep my finger still. This is noticeable after hysteresis has turned off, but libinput hysteresis was definitely not helping since it made the touchpad unusably numb and unresponsive. So the jitter problem I'm talking about here in libinput 1.10 is much better than how it was previously :) The same jitter happens with the synaptics driver if I turn off hysteresis there. Although synaptics with hysteresis provides a nice experience... seems to be a dramatically lower hysteresis threshold.