Hacker News new | ask | show | jobs
Linux Touchpad like MacBook Update: 2022 progress and new poll (gitclear.com)
147 points by wbharding 1265 days ago
22 comments

I'm running Asahi Linux on my macbook, and the trackpad feels amazing there! Especially pixel perfect scrolling and gestures in mutter.

I only have two minor issues:

There doesn't seem to be a working stop scroll event when using kinetic scrolling in Firefox. On osx you can stop kinetic scrolling by just touching the trackpad, but on linux you have to scroll a little bit to slow it down.

And generally the kinetic scrolling isn't yet consistent across applications. Firefox has a nice implementation, but it feels quite different from Gnome apps, and then some like gnome-terminal don't have working kinetic scrolling yet.

This issue is the reason I switch to Chromium to read long articles.

The fix seems to unfortunately be gated by Firefox migrating to GTK4 https://bugzilla.mozilla.org/show_bug.cgi?id=1568722

How's the battery life and CPU usage on Asahi? Is it substantially worse than on macOS?
I'm running Firefox nightly on a Framework under Ubuntu, and kinetic scrolling stops with single finger tap on the trackpad. You have to do a tap, not just touch the trackpad, so it's a bit different than on Mac.
Ha, interesting, the scroll stopping is pretty much my only complaint, too. I suppose I've gotten used to it by briefly counter-scrolling at the end, but it'd be great not to have to do that.
In regards to gnome-terminal, you can try gnome-console instead which correctly supports kinetic scrolling. It's missing a lot of the settings that gnome-terminal has, so it may not meet your needs, but if you just want a simple terminal emulator it works well.
I did a lot of research and Fedora on my Lenovo T480s with glass touchpad feels a lot like macOS now, with some minor details... thanks for the huge effort. Here are my experiences:

# Precision

The precision on short movements is not as good. On macOS I can move from "minimize" to "close" without a hazzle, on Fedora it is slightly off. I don't know if macOS handles short movements differently, but it feels still more natural.

# Kinetic scrolling

I don't know where kinetic scrolling is (and should be) implemented exactly (libinput, mutter or in every app), but on macOS it seems like it just works everywhere while on Fedora some apps don't support kinetic scrolling att all and where it is supported (e.g. Firefox) the scroll speed was WAY to fast (maybe because of WQHD). There was no way to fix this with on board / gnome settings, I had to use a special hook daemon for this (https://gitlab.com/warningnonpotablewater/libinput-config.gi...).

# Gestures

Gestures do work, but at some places there are fiddly to use or just don't work because of in app overrides (e.g. if you use remmina and are logged in to another system, the gestures are not working as expected). On macOS everything works seamlessly, even in Microsoft RDP app or VNC connections.

That's my feedback for now, but I'm a happy Fedora user - there is no way back to macOS ;)

This project (along with many Gnome improvements over the past 2 years) was pivotal in making me switch from a MacBook to a more ergonomic travel setup (https://www.reddit.com/r/ErgoMobileComputers/comments/vzs8mm... )

Thanks again!

Oh that's a fascinating setup! Thanks for posting.
In related news, libinput is almost ready to merge customizable pointer acceleration curves: https://gitlab.freedesktop.org/libinput/libinput/-/issues/35...
Since 2018, Linux Touchpad landscape has changed drastically. I remember how bad the situation was before 2018, no gestures, no accurate precision, pretty inferior.

After Touchegg came, everything kinda changed. Gnome and KDE introduced native gestures and it has boosted the adoption of Linux on laptops.

I hope we also get zoom capabilities in Chromium and Firefox and smooth scroll capabilities. Other than that, I do not miss anything from Windows or MacOS, it's all great!

PS: I have Touchegg config files readily available for better gestures on Linux:

https://github.com/NayamAmarshe/ZorinGestures

https://github.com/NayamAmarshe/ToucheggKDE

I recently I stalled the latest version of Linux Mint on an 2013 macbook pro.

The touchpad feeling is slightly off, choppy I would say (it gets kind of "stuck") . I also tried to setup 3 and 4 finger gestures to switch desktops similar to OSX. There are two linux libraries that achieve that. One didn't work AT ALL and the other kind of works: it sends the signal, but for some reason it takes some time to change desktop. While doing the ctrl+alt+arrow works smoothly.

I use it OK but I am sad that's the state of the art I 2023.

Are you on x11 or Wayland? All animations will be choppy on x11; it's not your Trackpad's fault, but your window server.

If you have compatible hardware, try a Wayland-based system and see if that fixes the smoothness for you. It's completely possible to get 60fps 1:1 touchpad gestures on most laptops that have come out in the past decade.

Maybe the MacBook drivers are not great? I use it on an HP laptop and I have no complaints.
As a linux user in 2022, I think the touchpad is as good as the Mac one. It's different for sure, but my Thinkpad has an excellent touchpad with great buttons. I don't even agree with the premise that there's a problem in the software.
it is quite likely that the cause is because of this project.

Linux touchpads were quite bad, even being worse than the same hardware on Windows (thanks Synaptic!) - but I agree; I haven't had any issues with linux trackpads since 2018.

Granted though, I had an excellent linux laptop (Precision 5520) and it could also be because trackpad hardware is getting better too.

This is not my experience. My first Linux laptop was a HP nc8430 from 2006. I used it for two years with Windows and then reinstalled with Ubuntu 8.04. The touchpad was much better in Linux. I only used the touchpad to move the pointer and scroll, no gestures, no clock. I used the three physical buttons to click. My current laptop is a ZBook from 2014. I never used it with Windows but it's been good with all the Ubuntu LTS I used it with, all of them every second year, and with Debian 11. Again, I never clicked with the touchpad not used gestures. I always used X11. Probably the basics were always good enough on that hardware.
I suspect that one issue is that you can buy REALLY cheap and terrible laptops and run Linux on them. You can't buy cheap Apple products. Therefore people compare the crappy touchpad from a $300 laptop with that of a $1,5000 MacBook or whatever they cost now. Obviously, that makes the Linux one look bad.

But the high-quality laptops that e.g. most devs on Linux use have had great touchpads for a long time.

Not sure what you mean by "long time" but five or six years ago I bought a fairly expensive 17" laptop from System76 and the touchpad was atrocious. It was basically unusable, cursor jumped all over the place.
Not sure.

Ive had:

* Acer Aspire 5500G (cheap as hell)

* Thinkpad T400

* Thinkpad x200

* Thinkpad x201 and its “s” varient.

* HP Elitebook 8440

* HP Zbook G3

not cheap laptops really (save the first) and a bit dated by todays standards, but my experience comes from this context.

Your HP hardware is one of two generations newer than what I used. The big difference between our experiences could be that I never used gestures and tap to click. If I had, maybe I wouldn't be happy with them.

I expand the rationale of my choices.

No tap to click: all the touchpads I used since late 90s used to move the pointer a little when I tapped. This is really bad in image editing programs. One could argue that I should use a mouse there and that is correct, but I don't use those programs much so I never have a mouse close to my desk. I think I never tested tap to click on this laptop I've been using since 2014.

No gestures: I use keyboard shortcuts and hotkeys. Learning gestures to replace them would probably save me very little time if any at all, so I never investigated them. The only one I can think to be useful is multifinger zoom, but ctrl + and - are good enough in most cases. I don't use them every month.

Anyway, I'm glad that they are working on those features. It helps the ecosystem and it could attract users. Unfortunately there are no workarounds for shitty hardware.

It really depends on driver support. The Synaptic touch pads I've used have always worked great with gestures and such (under Wayland, which is still too buggy on my current hardware, sadly). Precision and responsiveness have always been great.

On a friends laptop, the touchpad was absolutely atrocious. Also a Synaptic touchpad, which worked just as well on Windows, but on Linux it seemingly had defaulted back to a virtual PS/2 touchpad without even two finger support, let alone normal multi touch.

This project is definitely helping applications and compatible hardware get better, but I think the biggest issue is still the lack of proper driver support from major manufacturers like Synaptic. Another issue is the fact that X11 and multi touch just don't mix, the protocol isn't good for it. I firmly believe the future is Wayland but I'm currently stuck with X and probably will be for a while because my problems are caused by Nvidia drivers combined with a laptop mux chip, two famously hard to solve problems as an end user.

In which case, huge applause to the project :)
Yeah, on Wayland I've got pretty much everything I had on MacOS (besides Force Touch, which I never used anyhow). Using a Magic Trackpad on my Linux desktop feels very intuitive now, I gotta hand it to the people contributing input handling/gesture code.
I'm on Wayland too, maybe that's it.
I have a Samsung Galaxy book with Manjaro and wayland. The touchpad works. Multi touch, gestures, and everything. But it isn't great. I blame the hardware for this. It's a generic cheap synaptic thing in a cheap laptop. So, my expectations were kind of low for this.

On the software front, there is basically no way to configure this thing in a sane way either. At least not in Gnome. So, the software has lots of room to be fixed. Some kind of simple UI to dial in responsiveness and configure things like gestures would be nice. But you can't make mediocre hardware great with just software. I also had some issues with Firefox until I figured out that I needed to fiddle with some settings to make it not scroll super fast. After that it was usable. But I bought a wireless mouse because it is just not a great experience using it for extended periods of time.

I actually connected my Apple magic keyboard and trackpad 2 at some point and that worked great. Still no way to configure the trackpad properly but it got recognized and it felt as responsive and usable as I'm used to on a mac. It's great on Linux as well. If Asahi keeps on improving, I might install it on a mac. I use the M1 macbook pro for work and it's a great piece of hardware. None of the PC vendors come even close to how good that is.

What I'd like is to have some sort of exportable hardware training and configuration. I use a few different laptops (and desktops), and I want the touchpad to feel the same between each of them.
Copy your dotfiles?
Goldmine. We could profile and fingerprint users strictly based on touchpad usage and sell it. Would you pay $5/mo for it?
Id be interested
That's the SV spirit I was looking for.
I have a Framework laptop and I think on Fedora the touchpad is no worse than on my MBP. The only annoyance is that AFAICT there's no way to change the speed of 2 finger scrolling, and it's a bit faster than I'd prefer (maybe that's a Gnome problem?)
The Framework touchpad is top-hinged and the click effort varies widely depending on how close to the top you press.
Honestly, this doesn't really bother me as much as it does for other people. Don't get me wrong, haptic trackpads are nice (I bought the Magic TP2), but a properly-accurate multitouch button-based trackpad can still feel great to use.
With Win 11 Pro on my frame.work (DIY Intel 12th gen) it's ... OK.

Quite a few expected gestures just work, several more can be mapped for gesture-friendliness between Win11 and MacOS.

But the basics are off: clicking, dragging, scrolling, all are just a bit fiddly, with click needing a very deliberate click on upper half of touch pad while works better the lower you go. ... Learned from sibling comment here why that is.

I agree several of the speeds are off, and built in controls don't get me there. Haven't tried any third party tools, only Win11 + frame.work drivers.

The other thing I miss is the sheer real estate of the current M1 Pros.

TL;DR: The current frame.work laptop touchpad hardware is good enough to be usable by a MacOS user in Win11 (haven't tried yet in Linux).

Lack of force-touch is also a bit annoying.
If like me you have struggled with your big hands's palms getting the cursor to jump around for no reason, what worked for me me was programmatically reducing the area of the touchpad like this :

http://tuxdiary.com/2014/12/16/reduce-effective-area-touchpa...

Another thing you may not be aware is some touchpads have a scroll function that works with only one finger on the right edge of the touchpad and it is not always marked clearly so on the touchpad. I know that made the problem even worse. I don't quite remember the setting to deactivate though.

Only works for Synaptic and overall not a great thing to do (see link for details).
So 2023 will be the perennial Year of the Linux Touchpad?

I don't know the details of this but it seems like we're touching on some fundamental architectural problems with Linux here. Please correct me if I'm wrong but it seems like a combination of:

1. The Linux device driver model is fundamentally flawed. Namly, device drivers live in the kernel (I'm including modules here) and there's no stable ABI to isolate device drivers;

2. This seems to be another example where X is showing its age and the fact that it was designed to do things people care less about.

A lot of engineers like to use Macs for development because its Unix-like and has a nice and responsive UI and hardware. There are technical problems with OSX but they don't seem to matter.

High DPI didsplay were a problem for Linux for the longest time where it quickly became just a scaling setting in OSX. OSX seems to benefit for complete vertical integration in a big way here.

To be fair, touchpads are (IMHO) a big problem on Windows too. This just seems to be an area that Apple completely nails (hardware and software). It's kind of weird that a decade+ later Windows and Linux are still playing catch up, even with Mac hardware.

Maybe I'm unlucky with my popOS distro but I don't understand everyone here saying their linux trackpad is as good as a mac one.

When I two finger scroll on a mac, the content smoothly matches the movement of my finger. When I two finger scroll on linux it scrolls, but emulates a notched mouse wheel, with definite steps and no momentum. Some window management gestures worked on gnome, but as I noticed when trying to get four finger virtual desktop switching, you do the gesture then a command is run. On Mac the gesture animation starts as soon as your fingers start doing it, matching your speed and movement.

It's cool that I can map any gesture to whatever command I want, but it is very far from a smooth and responsive touchpad experience. My uneducated guess is that certain things in the linux UI stack only operate in mouse actions and have no mechanism for passing on multitouch gestures?

PopOS doesn't use Wayland yet, so it can't benefit from any silky-smooth 1:1 trackpad gestures (yet). It's on the roadmap probably, but only GNOME and KDE-based systems have implimented 'complete' gesture support.
> This seems to be another example where X is showing its age

This is 95% of the problem, and frankly it's not even an insurmountable one; Touchegg was a solution that would buffer both touchpad gestures and the animations, giving you "smooth" but not 1:1 gestures on x11. It was... okay, but clearly a different model was required to make it work.

> High DPI didsplay were a problem for Linux for the longest time where it quickly became just a scaling setting in OSX. OSX seems to benefit for complete vertical integration in a big way here.

I completely don't understand what you're talking about here. Linux can also do display scaling like MacOS, it's just horribly ugly and blurry on most systems. The current goal is switching to a more Windows-like model where the actual UI libraries can be scaled instead of pointlessly doubling pixels like they do on Mac: https://apple.stackexchange.com/questions/421858/how-does-di...

> It's kind of weird that a decade+ later Windows and Linux are still playing catch up

Really? Having used all three operating systems, I don't know what you're pointing to here. Linux is far-and-away my preferred Unix-like operating system now that it has gesture support, and even Windows is frankly not that bad in comparison to MacOS. Both OSes second-guess your authority and relentlessly push you ads, honestly I have no preference between MacOS and Windows anymore.

I don't see how in-kernel vs out of tree drivers is at all relevant. There's no problem getting the raw sensor data out of the device and delivering it to userspace. The main problems are at the opposite end of the software stack: the applications and the GUI toolkits they use. Mac OS pretty much has one GUI toolkit and window system, with good multitouch support throughout. Linux is a menagerie, and as a result getting features like multitouch or accessibility features implemented uniformly is a Herculean (Sisyphean?) task. X vs Wayland differences can make this a bit easier or harder, but cannot remove the need to implement multitouch support in GTK, Qt, etc.
So, for all of this posturing and dono collection for 2+ years, afaict most of what all of this has resulted in is:

- https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/401

- https://cgit.freedesktop.org/libreoffice/core/commit/?id=474...

and as far as I can tell the rest is "already done for Wayland upstream" or "still not done yet" trending towards "likely to not be done as more and more folks realize why Wayland is the replacement of X11".

Every time, I arrive at this conclusion and feel like a jerk, but even just comparing this update with the Dec 2021 update, I feel like I'm not far off.

And here I am sitting with a HP ZBook and the touchpad doesn't even work. At all. I tried everything I could find on Google. No luck.

(It only works if I disable nvidia drivers, but that's not really useful.)

I am writing this from KDE neon on an HP Zbook.

The touchpad does work but it has a very annoying issue: accidental palm clicks.

I haven't been able to solve it yet.

I've tried many different combination

- KDE X11 on NVidia

- KDE X11 on integrated GPU

- KDE Wayland (it only works on integrated GPU, plasmashell doesn't start on NVidia)

- Gnome X11

- Gnome Wayland

Note that this narrow definition of Linux leaves out the leading touchpad implementation: ChromeOS. If you wanted mac-like touchpad performance and Linux, you could have had it for many years now.
It's not really a narrow definition of Linux. When the vast majority of technically-oriented people say Linux, they mean Linux with some sort of GNU userspace like with Debian or Ubuntu. It's even hard to install Linux on some Chromebooks...it's hardly a Linux experience out of the box.
It doesn’t sound like you’ve ever used it.
One weird issue I have is that sometimes but not always, Firefox launches with touchpad support disabled. I think it mainly happens when Firefox gets launched as my default browser to handle clicking a link in another application. This happens despite me setting `MOZ_ENABLE_WAYLAND=1` globally and even verifying that it's set in `/proc/[PID]/environ`.
One thing about the Firefox gesture support is that it seems to be hardcoded gestures rather than using browser.gesture.swipe.* prefs like it does on macOS. I would love to map swipe-down to close tab and the back swipe to also close tabs if they are at the start of the history. However they seem to use some other non-configurable system.
Good to see they are still working on this. I supported the project for the first year, then moved on to support others. I've just re-sponsored on GitHub Sponsors. If someone is willing and able to do the dirty work all across the Linux stack, no to mention pull requests, mailing lists, etc, then the least I can do is give them $5!
Two questions:

Is this the reason that scrolling left and right in firefox now goes back and forth in history? Or is this something firefox on its own thought would be a great idea?

And why is sway listed in this? Isn't the whole point of using sway to do most, if not everything with the keyboard?

This is great news. Now they need to make the touchpads as big as on the mac on these other laptops.
Wish Windows had an external touchpad with a similar quality to the Apple magic trackpad.

I really think I find myself better with trackpads than mouses for everything than copy pasting between editor/browser/chat/whatever.

You can buy external Apple touchpads. Not sure how they behave under windows though.
I was able to use one with the right drivers under Windows 10

https://github.com/imbushuo/mac-precision-touchpad

Would "An Update to Macbook-like touchpad for Linux" be a good way of describing this?