
Linux touchpad like a MacBook Pro, May 2020 update - wbharding
https://bill.harding.blog/2020/04/26/linux-touchpad-like-a-macbook-pro-may-2020-update/
======
Kamshak
For those only reading comments, the author plans to hire a developer to
address touchpad issues. You can help:

\- Take the Linux Touchpad Experience Poll:
[https://www.gitclear.com/polls/linux_touchpad_experience](https://www.gitclear.com/polls/linux_touchpad_experience)

\- Become a sponsor on GitHub:
[https://github.com/gitclear/libinput](https://github.com/gitclear/libinput)
(GitHub matches every donation up to $5k, so your $5 can become $10)

\- Get paid $50/hr to work on libinput:
[http://archive.is/FGHTT](http://archive.is/FGHTT) (link to archive of the
original article ty danso)

~~~
dmayle
Touch on linux has always been a pet peeve of mine (I was the first to publish
two-finger right click patches[1] for the synaptics driver
[http://wikigentoo.ksiezyc.pl/Synaptics_Touchpad.htm](http://wikigentoo.ksiezyc.pl/Synaptics_Touchpad.htm)
). I've long thought about fixing the current drivers, but I can't prioritize
the time myself. I'll donate some cash.

Luckily, this should be relatively simple. Anyone who wants to make this
should be looking at the Chromium touchpad code (runs linux, and my Pixelbook
touchpad is as good as a macbook touchpad. For example, the touch input
filter:
[https://chromium.googlesource.com/chromiumos/platform/touch_...](https://chromium.googlesource.com/chromiumos/platform/touch_noise_filter/+/refs/heads/master)
)

I think you'd get most of the quality with a kalman filter (A really cool
filter that takes unstable input, and corrects it based on probabilities to
give very high quality output).

[1] [http://douglas.mayle.org/files/synaptics-two-finger-
click.di...](http://douglas.mayle.org/files/synaptics-two-finger-click.diff)

~~~
Ballas
On that note - does the synaptics driver not have all of the functionality the
author wants - as long as he is willing to do the tweaking to the synclient
settings?

(I have not used my touchpad since getting used to a trackpoint, but I vaguely
remember using the synaptics driver to get it usable)

Edit: NVM, I read another one of his blog posts where he addresses synaptics
and mtrack.

------
jeffomatic
I recently tried switching from an MBP to an X1 Carbon, in a yet another
attempt to switch to Linux as my daily driver. I ended up being thwarted, to
my surprise, by the touchpad support.

The big problem I encountered was poor palm detection: I learned through this
process that I have a tendency to use the touchpad with my right hand, while
my left hand is still in typing position. This means that the edge of my left
palm rests along the upper-left corner of the touchpad. This would result in
the driver sometimes detecting two touchpoints instead of one, and I would end
up scrolling when I meant to move the pointer.

The result of this was pretty amazing to me: after a few hours of use I found
that my wrists, shoulders, and neck hurt because I was subconsciously trying
to adjust my hands to avoid this. After a couple of days trying different
drivers and tweaking config files, I ended up conceding that it just wasn't
there yet.

It's too bad: I have lots of imposter syndrome about understanding my OS and
using Linux seems like a great cure. But after literally decades of trying,
what I've noticed is that hardware (or at least, my acclimating to new
hardware) always advances enough past Linux's capabilities that the switch is
difficult. In the past, it was about getting sound cards or WiFi working, and
nowadays it's about things like touchpads and high-resolution displays.

~~~
lliamander
I find that, with my Thinkpads that I don't use the touchpad at all. I find
the trackpoint a much more convenient pointing device as it keeps my hands a
home row.

~~~
jakear
Touchpad scrolling is nice. Yes keyboard shortcuts exist for scroll, but I for
whatever reason vastly prefer touch-based.

~~~
lliamander
On Thinkpads, there's also the thumb buttons below the space bar that act as
mouse buttons. The middle one allows you to scroll with the trackpoint. It's
very convenient.

------
3jckd
Could someone ELI5, why it is so difficult to make it right? And I do not mean
exclusively to Linux, because Windows has been horrible for years now too.

If the issue is hardware, then we'd blame OEMs.

If it's software, then we'd blame, say, Microsoft.

If it was a combination of these two, then we could say that Apple is the only
one that controls both... if it wasn't for the Surface series which still has
atrocious touchpad experience.

~~~
chrisseaton
If I was being uncharitable I'd say that the problem is that companies beside
Apple just don't _care_ about a good user experience. Maybe they could produce
the same product if they thought it mattered. With almost all non-Apple
laptops being flimsy, cheap-feeling plastic junk, stuffed full of ports and
bezels, I feel like they're miles away from being at the stage where it makes
sense to optimise the trackpad.

~~~
soperj
Like apple cares about a good keyboard?

~~~
the_hoser
They do care. Sure, they've made a few big mistakes, but they worked to
correct them.

PC laptop manufacturers? With a few exceptions their keyboards are just
garbage.

~~~
Daneel_
Lenovo probably does the best keyboards at this point. Their old 7-row
keyboards were even better though.

~~~
the_hoser
I really don't care for their keyboards now. They used to be the _best_ out
there, but now they're... just... mediocre.

------
ghostpepper
Count me among those who agree there is a vast gulf. Another thing I've
noticed recently is that on my X1 carbon (7th gen) there is a small but
noticeably distance when I first start dragging a finger before the cursor
moves that does not exist on a Mac trackpad with MacOS.

I also wonder what the experience is like using Linux on a Mac trackpad. Is it
closer to the experience on MacOS or closer to the experience with Linux on
commodity hardware? If the latter, maybe it makes sense to improve that first.

Maybe not though, if the synergy between hardware and software is the "secret
sauce" that's missing then maybe optimizing the mac trackpad for Linux would
be wasted effort.

~~~
harrygeez
Honestly, I don't think this is as difficult of a problem as we think. Has
anybody tried scrolling in Windows UWP/Modern/RT apps with a precision
touchpad? It's just as glorious. In fact, I've read many accounts of people
who use pre-Chromium Edge just for the scrolling experience. Microsoft also
ported this scrolling algorithm/profile to Chromium Edge, even if it's
slightly less responsive (probably limited by win32)

If you don't like the scrolling in UWP it probably has more to do with it's
acceleration graph than its capability. That, and macOS seem to just make
their UI animations way smoother than anything I've seen on Windows and Linux.
The Windows desktop switching and "expose" animation kills me every time it
janks.

I don't know what's stopping Microsoft from porting this scrolling behavior to
Win32, and to be fair it seem like they tried (scrolling in Explorer is
noticeably different on a precision touchpad even though not as smooth) but
probably they're held back by backward compatibility or that it's too much of
an effort to make that pig fly.

~~~
azinman2
I wouldn’t conflate someone else doing something you like with difficulty.

~~~
harrygeez
well most of the posts here somewhat suggests this is a difficult problem that
only Apple has the resources and desire to solve

~~~
azinman2
Microsoft is not lacking in resources or motivation. It’s still a hard problem
regardless.

------
i_am_proteus
Am I the only one who doesn't get this? Trackpads on Linux with various
Thinkpads have always seemed fine. I've used trackpads on various Mac laptops
(Pro and Air) and those have seemed fine also. To round things out, my
experience with trackpads on Windows (Thinkpads and XPS) has been that they
are fine.

Admittedly I have Linux set up for keyboard use with a TWM, but the trackpads,
when I used them, have been fine.

~~~
geon
I have no idea about linux, scrolling on windows is pretty much hardcoded to
use a early 2000s scroll wheel mouse.

Because of their low resolution, windows scrolling is done one text line at a
time, while macs scroll a pixel at a time.

This sounds superficial, but it is really not. With the higher resolution, you
get a very direct connection with the scrolled content. Without this almost
tactile feedback, inertial scrolling doesn’t work at all.

And since scrolling is like 90 % of what I use a trackpad for, I will not even
consider using windows with a trackpad until they have fixed it.

~~~
chapium
Is this why touchpad scrolling is so crazy in LibreOffice? On windows, mouse
and scrollwheel works fine in Libre. Using touchpad it shoots the document to
the moon each time scrolling gestures are applied.

There is not a similar effect in other applications.

~~~
geon
Probably. Google maps used to have huge problems with zooming (since it was
meant to use the scroll wheel), as did a lot of games that relied on the mouse
wheel to cycle through an inventory.

------
wbharding
Ugh: my web host is weak. If the page won't load for you, you can see its
native version at
[https://public.amplenote.com/LiTtaTWY3GfzzhF26Exu8tXx](https://public.amplenote.com/LiTtaTWY3GfzzhF26Exu8tXx)

~~~
seltzered_
Just wanted to apologize for prematurely sharing this last week. Was testing
the waters of linux again and happened to get curious about it.

------
danso
Someone made an archive.is snapshot that's accessible while the live site is
down: [http://archive.is/FGHTT](http://archive.is/FGHTT)

------
mschuster91
There are three things at play here that give Apple/OS X their unique
advantage:

1) Size. I have _huge_ hands. A 2015 MBP has a trackpad whose size I have yet
to see on any Windows/Linux laptop. I'm too clumsy for IBM's trackpad and the
tiny "touchpads" on usual laptops should rather be called "touchpadlets"
because they are so small that most I have experienced have had my fingers
awkwardly collide. I won't go back on non-Apple hardware until there is a
decently wide offering of decently sized touchpads.

2) Drivers. Back with my last Windows laptop it was some Elantech touchpad
with Elantech drivers. Installing some random drivers from some random other
laptop on a forum hint somewhere in the 30th Google result area suddenly gave
me a whole lot of gestures. Just... WTF? Why is this not a core OS component
in Windows and has it been possible over the last five years (since I
switched) to finally use gestures OOTB in Linux?!

3) OS primitives / integration. Windows and (IIRC, please correct me!) Linux
operate on the concept of "steps" with absolute scroll delta values, while OS
X (and iOS/Android) operates on ... I don't even know what, it simply feels
utterly smooth instead of janky. But I also assume that this is the most
difficult to fix :(

------
junker37
Am I the only one who prefers the red nubs on on Thinkpads? I find it very
hard to use any touchpads. When I used a mac, I would carry around a mouse. I
wish thinkpads would get rid of the touchpad. I'm perfectly happy with just
using the nub.

~~~
JuettnerDistrib
Are there any laptops with two nubs: one for the mouse, one for scrolling?
Then one could also put the keyboard in a more comfortable position right
where the touchpad is now.

~~~
lozf
With the Thinkpads there's just the one nub, but the middle mouse button is
easily reachable for scrolling.

------
nbrempel
It’s funny that people want this so badly that the site has been down for me
the whole time it’s been on the front page yet it’s still getting upvoted to
the top.

~~~
nickthemagicman
Same here. Linux trackpad as good as Mac is tech porn.

~~~
ntry
Hahaha, that's so true. I've heard of multiple people placing bounties on
making this a reality

~~~
thecureforzits
It seems to me, at least as someone on the outside of this debate looking in,
that people are having some trouble defining what "better" actually means. I
think if the difference could be quantified, it could be addressed.

~~~
nbrempel
Ken Kocienda talks about this in his book Creative Selection. While working at
Apple, they identified processes that needed to optimized with heuristics as
opposed to algorithms. Some things need to be tweaked by a person and cannot
be solved by applying an algorithm. He posits that this is the reason Apple
has traditionally had such a great user experience with the products.

------
bananicorn
I have these settings in my .xinitrc on my ThinkPad T420, but never had to do
anything terribly arcane to get it to work as I expect it to.

    
    
        exec xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Tap Action' 1 1 1 1 1 1 1 &
        exec xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Two-Finger Scrolling' 1 1 &
        exec xinput set-prop 'TPPS/2 IBM TrackPoint' 'libinput Accel Speed' -.3 &
        exec xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Coasting Speed' 0 0 &
    
    

Sure, it could be more fine-tuned, but it works just fine that way.

On other laptops I've had to reduce the "finger size" (I can't remember the
name of the setting), so I could use it even with a light touch, but that's
the biggest problem I've had with it so far.

~~~
BenjiWiebe
Are you actually using exec before each xinput command? If so, only your first
xinput command actually gets run. exec replaces the currently running process,
effectively making it run-this-and-exit.

~~~
madars
Looks like & saves the day by invoking the command in a subshell and then in
that subshell exec replaces the subshell with the xinput command. E.g. you can
test it by

    
    
        $ cat ./a.sh 
        #!/bin/sh
        exec /bin/echo foo &
        exec /bin/echo bar &
    

which outputs foo and bar. Seems like a special case, just like exec without a
command for file descriptor redirection.

------
floatboth
With
[https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1117](https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1117)
scrolling in GTK apps (including Firefox) is really smooth

~~~
josteink
Is this something one needs to enable?

And from what version of Gnome/GTK is this available?

~~~
floatboth
It's a patch that's not merged yet.

------
WesolyKubeczek
I have this to ask about this project:

1) how exactly are you planning to cooperate with upstream (meaning Peter
Hutterer, meaning Red Hat)? Suppose someone does the work, then what? libinput
has issues open for years, including issues that have patches, how are you
going to make sure yours is not going to get buried?

2) if there existed a programmer both capable and willing to pull this off,
wouldn’t it make sense for them to set up sponsorship themselves and cut the
middleman out?

------
Dunedan
Duplicate of
[https://news.ycombinator.com/item?id=23039515](https://news.ycombinator.com/item?id=23039515),
although the author apparently changed the title of the blog post.

~~~
Brakenshire
It was posted there while it was a draft on his blog, before it was actually
finished. The links which were the purpose of the post hadn’t been setup yet.

> I presume nobody is randomly visiting pages on bill.harding.blog, so you
> aren't seeing this.

------
brandon_edens
Part of the Apple touch story is this:
[https://en.wikipedia.org/wiki/FingerWorks](https://en.wikipedia.org/wiki/FingerWorks)

------
tw04
For whatever it's worth/if it helps with this journey - the trackpad on the
surface book/surface laptops is the closest I've seen to the mac trackpads.
I'm assuming it's some combination of hardware and software. From stricly a
tracking/responsiveness perspective, I would say they're dead even. I like the
multi-finger click options better on MacOS - I'm sure it would be trivial for
Microsoft to implement if they wanted to.

------
jamil7
A few years ago I was dual booting Arch on a 2013 Macbook Pro and couldn't for
the life of me get the trackpad working nicely as it would on MacOS. Up until
then I'd made the assumption that Apple trackpads felt the way they did mostly
due to hardware. When writing code I'm using vim and am keyboard focused but
I've become really used to browsing websites and docs using the trackpad on
MacOS.

Edit: some formatting

------
q92z8oeif
with my work enforced MBP most of the time i want to right click i end up
clicking and triggering an unintended consequence just because i have my two
fingers too close. On linux i never had this happen even on the cheapest
touchpads.

~~~
nerdjon
That surprises me, I just tried very hard to smash my fingers together to make
it think I was using one finger (I was using the Magic Trackpad, but I also
tried on my 16" MBP) and it always registered a right click.

I actually can't think of the last time I misclicked a right click on Mac.

~~~
q92z8oeif
2015 15" if that makes any difference, but last models (2012 i think) had the
same problem.

Maybe they optimize to the wrong finger size to the point you can't even if
you try, and i trigger the bug too often.

------
yewenjie
Am I just the minority who finds touchpad on my GNU/Linux system reasonably
functional and bug-free?

With a tool like Fusumu
([https://github.com/iberianpig/fusuma](https://github.com/iberianpig/fusuma))
I am using three finger and four finger gestures just fine!

~~~
ghostpepper
The experience is not terrible, it's just that when compared side by side it's
clearly inferior.

------
therealmarv
Can we also talk about pinch and zoom (e.g. image viewer or browser)? It seems
that gesture is totally artificial for desktop Linux (we have it on Android
though) and there are not even API interfaces existing for that trackpad
gesture.

Hoping all Linux input libraries will get a lot more attention and funding in
the future :)

------
lonelappde
No way this is just a matter of paying a freelancer $50K. If that was it then
System76 would have done it and someone would be rich from selling a closed
source driver already.

And software doesn't even touch the problem that most of what's wrong with
non-Mac touchpads is the universally lousy hardware.

------
guenthert
This is a solved problem, isn't it? On my Dell M6800 with Ubuntu 16.04, the
touchpad experience is very poor, I avoid using it. On my (Linux based after
all) Chromebook Pixel (anno 2013) it's fine, never been tempted to connect a
mouse.

Perhaps I should clarify: the difference is also a difference in usage: on the
Chromebook I use the trackpad almost exclusively to select the current window
or scroll its content, rarely set the cursor or highlight some text to be
copied (the latter is already more challenging than with a mouse, I'd say). I
haven't attempted to use a CAD program using the touch pad yet. So the
touchpad works mostly fine for what a Chromebook is useful for, it's no
replacement for a mouse on a workstation.

------
Keyframe
Hardware-wise, I'm extremely satisfied with Blade Stealth late 2019 one.
However, (on popOS) there's a slight issue with palm rejection. I occasionally
activate it with my palm. Is there a way to make rejection more aggressive?

------
naringas
I have a pretty decent trackpad experience on linux. grated it has been a
little glitchy but not as much anymore..

in any case I blame propietary vendors for preventing better open source
support.

------
wbharding
If anyone is curious to see what people think about Linux touchpads currently,
here are some of the preliminary results with 9000 responses counted thus far:

[https://public.amplenote.com/HbcoZf/touchpad-results-
prelim](https://public.amplenote.com/HbcoZf/touchpad-results-prelim)

Average satisfaction looks to be around 2 of 5. People are excited about
multi-touch, especially the double finger right click.

------
bodhibyte
A few comments here have mentioned that MacBook touchpad development is tied
to iPhone touchscreen R&D. This might be stating the obvious, but could a
similar effort be made by leveraging Android touchscreen R&D and code for
Linux? [1]

[1] [https://source.android.com/devices/input/touch-
devices](https://source.android.com/devices/input/touch-devices)

------
Mikeb85
I'm just curious what exactly the deficiency is on touchpads with Linux? I
have a fairly commodity Acer laptop (Swift 3 w/ Ryzen APU), and the touchpad
is accurate, sensitive (no noticeable lag at all), two finger scrolling works,
tap to click works with one, two and three fingers, etc... I haven't changed
any settings except sensitivity and whatnot in the standard Ubuntu settings
GUI.

~~~
jamil7
Whatever you think of Apple, for some reason there is a huge gap in their
trackpads and basically everything else I've tried. There is the way the
physical trackpad feels and doesn't "stick" as well as the responsiveness and
accuracy of the drivers.

~~~
Mikeb85
That's not a real answer though. What objective difference is there? From some
replies it might be software in the OS that changes the acceleration of the
cursor, so that'd be an answer if true.

Personally, I hate the feel of MacOS. The cursor seems unnaturally slow and
when you crank up the speed has some weird behaviour.

~~~
jamil7
Appologies the answer was a bit flakey and yes you have a point it might be
that I'm just very used to it and to me it feels better, as to you it feels
worse. I mentioned in another comment on here that I wasn't able to get
anything close to the feeling of the MacOS trackpad from using the same
hardware on linux. I suppose the person who wrote this article feels the same
way that I do about it.

~~~
Mikeb85
Fair enough. I guess I don't get a lot of the complaints when people talk
about 'feel' because I've never like the MacOS 'feel'. Linux touchpads are
plenty accurate and precise IMO so I've never understood why people say
they're 'bad'. There doesn't seem to be any actual deficiency, just a lack of
features that Apple bakes into the OS.

------
slipheen
Since the site is slow, here's a direct link to the Github page to Sponsor the
project.

They want to hire a developer to fix the issues identified by the survey.

[https://github.com/sponsors/gitclear](https://github.com/sponsors/gitclear)

------
_prototype_
Given how much developer-contempt there is for the new touchpads, its amazing
to me that the opposite of this has not been tried by hardware hackers already
(as far as I know).

That is, hacking in an old tactile (non-touchpad) keyboard into the top
section of the latest Macbook Pros.

------
WesolyKubeczek
Some research done on the subject: [https://pavelfatin.com/scrolling-with-
pleasure/](https://pavelfatin.com/scrolling-with-pleasure/)

------
throwaway55554
On a related note, what are some decent external touch pads? I would love to
have one to give my mouse hand a break sometimes while at my desktop.

~~~
nerdjon
Personally I use the Apple Magic Trackpad. It's just a giant slab on my desk
and it's great (Don't even use a mouse). But I use that with a Mac, so it
depends on what you are using.

~~~
throwaway55554
I have a Mac, but I also have a Linux machine. I go back and forth depending.

------
nemoniac
I disable my Touchpad, not because of any shortcomings it might have, but
because one of the selling points of a ThinkPad for me is the Trackpoint. I
can operate it fine without moving my hands from the home typing position with
my thumb's on the mouse buttons.

~~~
_emacsomancer_
I just physically unplug the touchpad and fingerprint reader on mine.

------
fartcannon
The comments on this post make me think of that scene in American Psycho with
the business cards.

