419 points · by wbharding · 6y ago · 136 comments
Like you stated, the big problem is very fine movements just don't work in libinput. On X11/synaptics I can make movements as fine as rolling my fingertip in place on the touchpad, or drawing a minuscule circle, and it will pick it up. Libinput on the same touchpad does nothing, it's like it's stuck in molasses. And libinput has almost no configuration options so there's nothing I can even tweak.
I really hope they address this soon, or I'll be stuck on X11 forever!
Edit: I'm using a Thinkpad P1 Gen2, a top-tier recent-gen workstation laptop, and this is a big enough problem where it's forcing me to use X11 on Ubuntu 20.04.
See this discussion: libinput's bus factor is 1, https://news.ycombinator.com/item?id=23254871
I'm also on a P1gen2. I just added support for the Trackpoint/Thinkpad through the more advanced RMI4 interface in the kernel, instead of going through PS/2 emulation mode:
https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.g... https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.g...
This will be in Linux 5.10 and should improve things quite a bit.
Also you said Trackpoint/Thinkpad. Did you mean Trackpoint/Trackpad?
Just tried that on my Dell XPS on sway (wayland, thus libinput), and rolling the tip of my finger on the touchpad allows me to move the cursor in single-pixel increments on an unscaled 4k display. :/
Maybe this is a libinput issue specific to your touchpad type?
You may want to experiment with your desktop environment's mouse settings, and if that doesn't help, you should consider providing a detailed report to the libinput folks and see if they can address it.
I suspect this is more a hardware issue than software.
I would've assumed this was a hardware issue - what else do we have set up differently?
Tried it on the integrated 13" FHD screen as well as on an external 24" FHD screen. I can move the cursors easily along the branches of the Y in page header.
I believe there is also a tweaks dB to set better values for known hardware.
Holy shit, you're right! I never noticed! There goes my plan to play old FPS games (like Wolfenstein: Enemy Territory) on Linux without any major hassle…
† N=1, but it worked fine before libinput (using 'xset m 1 0').
Summary for those interested:
- flat profile didn't actually work on touchpads.
- a fix was merged into master on 2020-05-27. [0]
- judging by the merge date and tag dates, the fix is included in libinput 1.15.6 (released 2020-06-18) [1]
- Ubuntu 20.04 reports libinput 1.15.5. I hope they upgrade it so I can use Ubuntu on my laptop.
- My Arch install reports libinput 1.16.2
[0] https://gitlab.freedesktop.org/libinput/libinput/-/commit/03...
[1] https://gitlab.freedesktop.org/libinput/libinput/-/tags/1.15...
Glad to see movement about this. Was just considering converting my XPS 9560 into a full Linux machine next week (I will miss fingerprint sensor support, which brings up another point about just upgrading to a model that supports it). Going to use it as a testing ground for switching over my main rig to Linux and seeing progress like this is really encouraging that I’m making the right decision.
I will gladly install these test packages and help out.
As a resident of a non-USD country, my bank shafts me for foreign currency payments, which is partly a fixed fee and partly driven by the total amount. Therefore lots of small payments ends up paying a much larger portion to the bank, money that I'd otherwise prefer the project got!
I'm Povilas, the developer from the linked blog post.
If the donation is less than $100 you could setup a monthly donation on GitHub and then cancel it after the first payment.
Otherwise, you can contact me at "povilas@radix.lt". To verify the authenticity of this email address you can view my GitHub profile at https://github.com/p12tic, or check out https://github.com/p12tic/xorg-xorgproto/tree/p12-gestures branch and verify the author email of the last commit in the branch.
I'm serious. It sounds crazy because it is crazy.
Full details: https://news.ycombinator.com/item?id=24006703
You can simply start a monthly plan, then cancel it once the first payment is gone. It's a bit more overhead, but if you believe in it, it's worth it. (edit: never mind, this is not possible apparently, GitHub charges you for a whole year)
Also, slightly off-topic, and this entirely depends on where you live. Regarding your bank, you may be able to look into start up banks (also called Neo banks), they often have zero foreign currency fees and exchange at the Master Card or Visa base exchange rate. This has in the past saved me a huge amount, mostly for travel to foreign countries, but also for purchases, however, receiving money is the same.
As examples, in the UK we have Starling, Monzo and some others that all give you zero foreign exchange transaction fees. In many European countries Revolut is available (also in the UK), but I closed my account with them for ethical reasons. There is undoubtedly more neo banks available especially in the development world but you will need to do research for your country.
I always got decent multitouch on linux (when the touchpad is even recognized, but that's another problem).
Raise funds, basically.
Getting too specific about their development plans would interfere with that. People spend money based on emotion and shiny things. Yes, even Linux users.
As evidenced by the fact that they've basically just resorted to doing tons of retrofit to bring benefits that already exist in Wayland to a legacy, deprecated, aging stack. (literally every single change listed). Also, it's no longer just about improving the touchpad (since libinput is already pushing the envelope there), and instead ... X11 Gestures? Okay? (Good luck to those brave enough to install a patched X11 from a PPA!)
I feel sorry for the people who thought there was enough substance to donate. How this project progresses with increasingly less clarity and continues to be celebrated here deeply confuses me.
The reasons why we chose the current path were explained in detail in the blog posts.
Touchpad gestures was the most popular feature to implement. In order to do that we needed a good reason why all the other project maintainers would want to spend time discussing a feature with us. Wayland is the future, yes, but currently a lot of users are still on X which makes our argument much less convincing. Now we can say that touchpad gestures will soon be available everywhere and get their attention this way.
I agree that X is legacy platform. Unfortunately it may still be used for quite some time. Core functionality such as screenshots and input record/replay is not universally available on Wayland. So X will still be used for significant amount of time.
Please tell me what else I could explain to increase the transparency of the project and I'll try my best to do so. Thanks!
A total waste because the latest Pixelbook Go is both really cheap and high quality.
Apple got it right a long time ago, ChromeOS is good, and Windows is too. What's different about Linux?
That's the difference.
Linux hasn't got it right because there is still no unified api, even if there was, all apps must implement it to be useful.
This is where OP push comes in. To make all of this possible through donations. You should read his older blog posts. They're worth a read.
frankly even in 2020 I have yet to find one non-mac-hardware which is 50% as good as the apple touchpad experience
This seems like great progress. I'll be donating a bit!
I assume you'd get more donations if you had regular updates like this.
I would love for them to progress enough so this extension is no longer necessary. Making great progress!
There's plenty of work just implementing the basic handling of touchpad gestures, not even talking about any kind of polish. So at this moment we just assume that libinput handles touchpad gestures well and don't test at all. Once the basic parts are done we'll start polishing and this is when we'll test on as much hardware as possible.
[1]: https://bill.harding.blog/2020/06/22/linux-touchpad-project-...
I wonder about this though. To me it seems this is very important to get to work for alternative Linux-based smartphone OSes such as SFOS, pmOS, UT, PureOS, etc etc.
############################################################################### # You can set a timeout on gestures from start to end. The default is # the value commented below. It can be any value in float secs >= 0. # 0 = no timeout. E.g. set it to 2 secs with "timeout 2". timeout 0
IMHO the most egregious offender is libinput because everyone and their pet fish seem to be in a massive hurry to drop the proprietary synaptics driver and replace it with libinput; you're not allowed to ask for synaptics support because all distro and project maintainers will lecture you about "upgrading" to libinput which has "superior" touch and multitouch support... except libinput absolutely does not, even if it is theoretically architectured in a way that would enable superior touch/multitouch support someday.
The biggest problem is that the acceleration curves libinput uses are vastly inferior to those that ship out-of-the-box with other operating systems or the proprietary solutions from the manufacturers. When you read about the TrackPoint and the research that went into developing acceleration curves/profiles for input devices [0], it is hubris to think you can throw it all away and expect to still have a superior product.
Anyway, long story short, if you're using a synaptics or synaptics-compatible trackpad, the old synaptics drivers have the best (by far) acceleration profiles and feel the most natural to use, but they are not supported by multitouch plugins for the desktop environments. That's not to say the drivers don't have multitouch support: they do, and they accurately report all motions, but only as raw events.
I wrote this simple program to read the raw input from the synaptics driver and recognize two-, three-, four-, and five-finger tap and swipe gestures from the raw event stream generated by the synaptics driver per the kernel multi-touch protocol [1]. I initially wrote it in an evening after studying the protocol to get just simple back/forward swipe navigations working with the only actually good touchpad drivers for Linux I could find (the synaptics one), and intended to clean it up before throwing it on GitHub for anyone else that might find it interesting but realized I wasn't sufficiently motivated to clean it up anytime soon so decided to just upload it as-is.
sygesture [2] is written in rust and processes the raw MT protocol events generated by the trackpad in real-time to recognize multitouch gestures. Currently it spawns an `evtest` instance rather than opening the input device directly, that was a hack to not have to deal with translating the binary protocol but adds a dependency on the `evtest` utility (should be in your package manager). The path to device is also hard-coded in `main.rs` (and currently it only supports a single input device), but all that is separated from the actual parsing logic because I planned on making that modular from the start, but never got around to it. The mapping of gesture to action is also hard-coded in `main.rs` and isn't currently configurable. (It's all very easy to change even if you don't know rust, as all it does is spawn a program with certain arguments in response to each motion.) I'll throw an MIT license in the repo as soon as I get a chance.
The utility is pretty bulletproof, even though the heuristic is fairly simple (the rationale behind the consensus algorithm is documented in the comments). It's extremely fast (don't have a reliable way to measure lag, but I'm extremely sensitive to it and don't detect any) and has low memory usage (CPU usage is basically zero except for the duration of a gesture, if you're polling at a high-enough frequency to pick up on that).
Something not accounted for at all in the code is support for non-swipe gestures such as pinch-to-zoom and (has anyone ever used it?) "circle gesture" that can be apparently be used for weird things.
[0]: https://www.microsoft.com/buxtoncollection/detail.aspx?id=60
[1]: https://www.kernel.org/doc/html/v4.18/input/multi-touch-prot...
In what way is it proprietary? xf86-input-synaptics is MIT and the kernel driver is GPL.
I updated my PopOS packages today. My touchpad accel changed, my two-finger scroll broke, and I am left with a bunch of debugging to do and an urge to switch to Guix full-time. I came back to this HN thread and was delighted to find your post.
> Also please consider posting this on relevant mailing lists.
I’m beginning to accept that I’m terrible when it comes to evangelizing. Suggestions?
Today I restarted my, decidedly small, contribution. Even if I'm frustrated with the amount of work there is to do, I'd rather the project be thorough and really attempt to be a unifying solution to this problem.
Indeed this is a valid point, thanks. On the X server applications will get touchpad gestures regardless of whether one is running Plasma or GNOME. However, workspace-wide gestures are not implemented in either on X yet.
On Wayland the display server is the one which handles workspace-wide gestures. Additionally, all events go through it to the applications. Perfect touchpad gesture support needs support in both. As far as I know Mutter (GNOME) handles both parts already and KWin (Plasma) currently handles neither.
Implementing touchpad gestures on Plasma would fall within this initiative, I will most likely work on that at some point in the future. Please vote in the poll so that we know this is important to you.
The poll: :)
This is why the web has won. Chrome on Linux is the same as Chrome on Windows.