Bug 105472

Summary: Hysteresis inappropriately turned back on for my hardware after being off for months
Product: Wayland Reporter: Nate Graham <nate>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: medium CC: peter.hutterer, tomi
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: evemu-record

Description Nate Graham 2018-03-13 03:12:38 UTC
Created attachment 138055 [details]
evemu-record

I last built libinput about 3 weeks ago. After rebuilding it again today, I am finding that hysteresis is inappropriately turned on for my touchpad hardware. I can see the exact moment shortly after login: if I continuously make small circles with the cursor, there is a specific moment a few seconds in where hysteresis turns back on and I can no longer do it.

I've attached an evemu-record of me holding my finger perfectly still on my touchpad for a few seconds, which I would expect to turn off hysteresis. It doesn't.
Comment 1 Nate Graham 2018-03-13 03:34:33 UTC
git-bisect shows that the culprit was e43bd4ae3a75f72b45c6bab6168bd859ab4a01b3 (plus e8dffbd73a1b3c17716f972f210e420de94028c2, obviously).
Comment 2 Nate Graham 2018-03-13 03:43:55 UTC
I can't help but notice that a simple on/off switch would probably have been a heck of a lot simpler: less code, higher reliability, and no regressions for anyone, instead of this push-pull between people with good hardware who don't want hysteresis, and those with crappy hardware who do. We'd probably have had this issue solved long ago, rather than playing whack-a-mole with it into the foreseeable future.

And now I promise that will be my last comment on the subject in this bug report. :)
Comment 3 Peter Hutterer 2018-03-13 06:36:33 UTC
Except not really that much simpler. On/off isn't enough, you'll need to provide some hysteresis range. Oh, now you need it per-axis because some devices jitter on the y axis only. Oh, and you cannot ever switch away from the hysteresis to something better because you promised that the configuration exists. You cannot change the hysteresis algorithm, because config settings are written in stone. Want to change from physical units to device units? Oops, cannot do that without adding another option. And making sure you are compatible between the two.

You also have to expose the config option, write a GUI for every desktop. Deal with the corner-cases of toggling the config option at the 'wrong' time.

Then you have to teach users that that option exists. Where it is, in every desktop and how to set it. In 3 years time, the ubuntu forums are full of posts suggesting random config options that may not even exist anymore. 

And AFAICT neither windows or macos have that setting, so they're smart enough to figure this out. Oh, and having the toggle to turn it off also stops us from thinking about the correct solution.

An on/off switch makes things easy for the moment, for that one user that wants it. It makes life a lot more difficult for maintainers. So please, let's stop the talk of "just add a config option" because yes, for you it would've been easier (right now). For me and a lot of others, it's just a long-term waste of time.
Comment 4 Nate Graham 2018-03-13 16:15:46 UTC
I understand. It's just frustrating to still be wrestling with this issue a year and a half later, after the herculean effort you've put in to make it work. Hysteresis is just so frustrating with my hardware that it makes me want to chuck the computer out a window.

Anyway, I'm done grousing and am ready to help! :)
Comment 5 Peter Hutterer 2018-03-14 00:10:29 UTC
> if I continuously make small circles with the cursor

Is this a real use-case? You can trick the code (it's a result of how simple it is) but I haven't been able to trigger this during normal interaction.
Comment 6 Nate Graham 2018-03-14 02:16:58 UTC
> Is this a real use-case?

No, it's just the best way to quickly tell if hysteresis is on or off.
Comment 7 Peter Hutterer 2018-03-14 02:35:05 UTC
Your device should have the hysteresis disabled by default. So by doing that you're tricking the code into thinking you have pointer jitter and the wobble detection code *enables* the hysteresis. You're defeating yourself here :)

Let me know if the hysteresis enables during a real-world use-case, because that's something worth investigating.
Comment 8 Nate Graham 2018-03-14 02:36:28 UTC
Um, how do I turn it off then? It turned on quite before I did the small circles routine; I only did that to illustrate the issue. I really don't like how easy it is to accidentally turn this on.
Comment 9 Peter Hutterer 2018-03-19 03:13:46 UTC
There's no toggle to turn it off right now. Best solution may be to keep monitoring the touchpad and build up heuristics to make the guess whether it wobbles or not more reliable. E.g. restore the old "not wobbling" check together with the new "this is wobbling" check and then pitch the two against each other.
Comment 10 Nate Graham 2018-03-19 04:28:18 UTC
It turned off again and hasn't turned back on, so maybe I was overthinking things. I'll open a new bug if I find that it's turned on inappropriately during normal use.

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.