by acabal · 6y ago · 0 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.
I just timed myself doing it on a fresh vagrant VM, and it took me less than two minutes. One full minute was downloading and installing build dependencies, and that would normally be a few seconds as most people already have gcc.
The steps I took were:
sudo apt build-dep libinput
sudo apt install fakeroot
apt source libinput
cd libinput-1.12.6/
grep -r tp_detect
vim src/evdev-mt-touchpad.c
dpkg-buildpackage -b
sudo dpkg -i -O ../libinput*.deb
Oh and I'm tempted to argue that this is, in fact, a user experience we deserve. ThinkPads are used by many developers worldwide. Most of my friends at Red Hat have it. Last time I could check (2011), Google gave developers ThinkPads with Linux as one of the options. Any single one of us could have fixed this bug in one day, and then spend maybe another full day communicating with Peter to get the fix in shape and merged. Yet it still isn't fixed.Free software often is free as in beer, but the real point is that we can, and we should, participate. Throwing money through GitHub Sponsors is one option, but often the best way is to just roll your sleeves up and do the work.
Without the reference you've provided here I would estimate about three hours for me to do all of that, and that might be pretty optimistic. From figuring out what to search for, to understanding the code that needs to change, to making the change, to building it, to determining what's ~~best practice~~ at least not worst practice for installing it.
And I'm someone who's fairly confident in my abilities, has been using linux for about 15 years, and is comfortable in C and familiar with other packaging systems.
I'm sure I could come up with at least a dozen exercises like this that would take me under a minute but would take the average HN reader hours if not days to complete.
My point is that it's incredibly unfair to take something with which you're obviously quite familiar with and claim it takes less time than buying an app online, just because with experience you can do it that fast.
I thought that there were like a billion ways to do this -- pbuilder, debootstrap, fakeroot, sbuild, ./debian/rules, probably a few others I'm forgetting. Every time I've interacted with this over the last decade it's given me a headache.
In 2020, is `dpkg-buildpackage` the official way to do this? It seems very easy!
Just to provide one anecdotal example, I have a Asus Zenbook Windows 10 laptop (OEM installed), where the touchpad just randomly breaks after some Windows updates every few years.
Right now my laptop isn't recognizing any multi touch gestures, which makes scrolling a pain in the ass.
I can't exactly remember what I did to fix it the last time, but it involved downloading some drivers from the touchpad manufacturers website (not the laptop vendor), which looked really dodgy. A non-technical user would have zero chance of getting it to work.
For a technical user such as myself, it would be much easier to recompile libinput with some patch I grabbed from their issue tracker.
As a bonus, there's less chance of getting malware from the latter than going to some Asian hardware manufacturer's poorly translated website in search of a compatible driver download.
(I'm referring to "Press the lower right corner of the touchpad to right-click" box. The Dells that the school I teach at has are near unusable with this clicked, but improve significantly with it off and using two-fingers to right click instead).
See this discussion: libinput's bus factor is 1, https://news.ycombinator.com/item?id=23254871
My best guess is that it just isn't annoying enough to most people. Another way to understand this is to imagine what happens when you put someone with bad visual acuity in charge of font rendering: they'll think it's good enough, and you can't blame them. It _is_ good enough, as far as they can see (pun intended).
In any case, a non-kernel developer fixing it in a day of coding is IMHO wildly unrealistic. While I have 20 years of programming experience, I have zero experience with kernel development--which some of the most complex software in existence--let alone input stack development. I don't even have the domain vocabulary to describe the problem. A lumberjack might know how to cut wood, but that doesn't automatically make him a carpenter.
Likewise, there's no established, dependable, working-at-all way to sell something like this. You can sell things like BetterTouchTool on macOS (a small utility that makes the Touchbar more configurable), because closed-source is fine on mac and people are ready to open their wallets in exchange for a better UX. That's simply not possible on Linux, everything meaningful must be open source and free as in beer (and, for drivers, probably free in all other ways, too), or it either can't work structurally or won't because the philosophy behind Linux and its ecosystem is incompatible with that sort of thing. Hence, it won't happen unless someone really enjoys doing this, or does it for their own needs and gives it away and maybe even supports it long-term despite of the negative experience that can be (entitled people etc.)
As for companies with employees using Linux, I guess quite a few shops would probably be kinda happy if the UX got so crappy it became unusable, because office IT for an an all-Windows shop is easier and cheaper to run – network printing just works for everyone, ActiveDirectory works for everyone out of the box, IT can ensure everyone is on the latest Windows update, security solutions run everywhere, everyone can use all productivity tools you could ever buy and you can roll them out easily using policies, no weird graphics issues that prevent people from presenting, no expensive "exactly this laptop with exactly that configuration" hardware purchases, one-size-fits-all tech support, etc. pp. This is also one of the reasons why WSL2 is such a clever move – make Windows the best (corporate) Linux around and get another large swath of developers to use Windows. It's also probably going to solve a lot of the Linux UX issues, but not in a way that benefits Linux in the least.
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?
Sure windows has better gesture support but I've always felt them sluggish and controlling sway through the keyboard is lightning fast so I really have not missed gestures much. However for browser etc 2-finger swipe to go back would be nice to see
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.