
Linux touchpad like a MacBook: April 2020 update - seltzered_
https://bill.harding.blog/2020/04/26/linux-touchpad-like-a-macbook-pro-april-2020-update/
======
pcr910303
I personally find the Linux desktop to be never as polished as macOS because
it’s hacks over hacks.

One of the problems in inertia scrolling is that in Linux, it’s implemented in
the driver level — which means that while scrolling by inertia, if I close the
window, the window below will scroll. This is basically a hack because of
backwards compatibility with the legacy APIs that only concern mouse events.

The proper way to do this (which is implemented in macOS) is to do this
inertia scrolling in the GUI toolkit, which in macOS is AppKit. (macOS
implements this in NSScrollView.)

Fixing this in Linux will be hard, since it needs coordinated effort between
at least GTK, Qt, libinput, and the harware vendors — it’s an artifact of the
fragmented ecosystem of Linux.

~~~
mcv
At this moment I'm just generally frustrated with the state of desktop OSs in
general. I used a Mac for a decade, and was generally happy with it, but not
so happy with Apple's direction and recent poorer hardware. I recently
installed Windows on a couple of machines, and that's just a horrific
experience, and below the shinier surface, the OS is still as clunky as ever.

I've been putting my hope on Linux, but what the world really needs, is for
someone to create a unified vision for a Linux/BSD/open source based OS and
hardware that basically takes the Apple approach, or at least the approach
Apple had 15 years ago.

It's amazing how little progress there has been in this field. If I had money
and some expertise in this area, I'd start my own company making better
laptops with a Unix-like OS that's not afraid of breaking compatibility with
old Linux ideas like this that are holding us back. But that's never going to
be more than a dream.

~~~
cassianoleal
> making better laptops with a Unix-like OS that's not afraid of breaking
> compatibility with old Linux ideas

That's what OS X did, only for BSD rather than Linux.

~~~
mcv
That's why I loved OS X 15 years ago. But it's not open source, and it feels
like it's getting less open with every new version. But worse is their
hardware: I can't access it anymore. In a way, I think they peaked with the
2011 unibody design.

------
whatever1
Thanks for the contributions!

Unfortunately the state of Linux as a desktop OS in the past decade has missed
entirely the hardware developments. No proper support for scaling for hidpi
monitors, scrolling with precision mice/touch pads, no touch UI, UI is that
still not deep enough and casually requires the user to spawn a terminal,
graphics drivers that are still not stable and do not support the latest
standards like hdr.

I wish there was a for profit company that would focus on making a polished
desktop linux distro. There is only that much that the oss community can
provide for free, but it is simply not enough.

~~~
Nursie
> No proper support for scaling for hidpi monitors

I'm sitting here with a 4k 32" monitor and a 1920x1200 24 inch side by side,
scaled perfectly so both are pretty and readable, in xfce, and when moving
things between screens nothing changes size, or re-renders weirdly, or can't
be resized due to invisible boundaries, or ...

It's better than windows or MacOS can manage with the same setup.

I'm not sure what you count as 'proper', and yes I had to write a two-line
script with xrandr commands so ease of use isn't massively present. But the
underlying system absolutely has great scaling support.

Graphics drivers are also fine these days, I've not had any problems with my
mouse either. Hardware in general "just works" better than windows these days,
with older devices supported and no drivers to hunt down on the web.

I'm not trying to claim it's better for _you_ , only you can decide that. But
it works great for a lot of people.

~~~
kccqzy
> I'm sitting here with a 4k 32" monitor and a 1920x1200 24 inch

You didn't understand the problem mentioned by GP. Neither of your monitors
requires HiDPI scaling. Your first monitor has approximately 138 dpi and the
second a paltry 94 dpi.

Compare that to a 2012 MacBook Pro that has a 15.4-inch display with a
2880x1800 resolution. That's 221 dpi. The hallmark of a HiDPI is that its DPI
is so high that you need to render UI elements at 2x or more (though sometimes
1.5x also works), so that originally a one-pixel line becomes two pixels wide.
This requires support not just in drivers and the OS, but the application.
ArchLinux has an entire wiki page discussing application support:
[https://wiki.archlinux.org/index.php/HiDPI](https://wiki.archlinux.org/index.php/HiDPI)

~~~
Nursie
> Neither of your monitors requires HiDPI scaling

I beg to differ, 4k/32 does need scaling to my eyes. I don't want things to be
that tiny.

Not every application needs to support scaling, so long as the GUI framework
they use does, and the window manager does (XFCE has support, which I have
activated) that makes the 4K screen more usable to me (while allowing the full
res to be used for smooth rendering), then I use xrandr to scale the lower-dpi
screen back down so elements are the same size across both. Sure, there are a
few apps that don't behave brilliantly, but they aren't things I use much.

Like I said, it works better for me than MacOS or Windows (I have both, and a
2103 Retina MBP I still use).

~~~
Nursie
Of course I meant a 2013 rMBP, I'm not a time traveller :) I'm still impressed
that it can do its scaling stuff on a 4K screen, using onboard intel iris
graphics. It's been a great investment that little machine.

------
seltzered_
Noticed an update to this project. Here's some of the earlier posts by
wbharding:

Linux touchpad like a Macbook: progress and a call for help (Mar 2019)
[https://news.ycombinator.com/item?id=19485178](https://news.ycombinator.com/item?id=19485178)

Linux touchpad like a Macbook: goal worth pursuing? (2018)
[https://news.ycombinator.com/item?id=17547817](https://news.ycombinator.com/item?id=17547817)

NOTE: I should've read the 'WIP' comment at the top before posting this. Sorry
if I shared this early!

------
gitgud
> Are you a developer interested in working for $50/hour to improve life for a
> bunch of Linux touchpad users? Here are the job requirements:

> \- Has access to a modern Linux laptop

> \- At least a couple years experience with C/C++

> \- Proven track record of delivering projects on schedule (please provide
> examples)

> \- Strong English skills

> \- Self-starter, able to make progress toward high level goals with minimal
> oversight

> \- Positive, solution-oriented collaborator

> \- (Preferred) Has personally struggled with Linux touchpads.

These requirements are _much much lower_ than majority of programming job
descriptions out there...

~~~
toohotatopic
You are talking more about the usual job descriptions, but has he missed
something important? Which other requirements should be added?

------
bokchoi
[http://archive.is/9AnoX](http://archive.is/9AnoX)

~~~
cpach
Good old hug o’ death :-p

------
syntaxing
Interesting, does this mean that a macbook's "superior" touchpad is actually
software driven? I always thought it was a hardware issue vs software issue.

~~~
WesolyKubeczek
It pretty much is. Speaking from experience of dual booting macOS and Linux on
a MacBook Pro.

Oh, and also from booting the same Dell XPS laptop in Linux and macOS, guess
which trackpad experience is superior.

~~~
syntaxing
How hard is it to load Hackintosh on a XPS? Do you recommend a certain model?
I hear the 9360 is preferred because something about the graphics card?

~~~
icefo
Somehow I never imagined an xps hackintosh but I want to try with mine now.

If it works reliably you could have great hardware with a good OS and a decent
price.

------
WesolyKubeczek
There’s one thing that’s bothering me about this “project”. How is it supposed
to work with the upstream? Is this supposed to be a rivaling fork? How am I
supposed to have it on my system?

Also, it rubs me the wrong way that the blog author is seeking a person to do
all the dirty work — even for compensation — and then what? Have all the
credit? Basically, act as a glorified Forward button?

If I felt up to the task enough, I’d slap a sponsorship button onto my github
on my own. And here’s the difference: prior to asking for the money, I’d have
something to show to prove I’m not a phony.

The upstream is not without its problem as well. Right now it’s being
maintained by Peter Hutterer from Red Hat, and judging by his LinkedIn, it’s
pretty much his job description. Recently he did a talk about how overloaded
he is with libinput[1], and how someone volunteering to comb through pull
requests and issues would easily become his “number two”. Which also is
striking me as odd.

libinput, given its importance for Linux ecosystem as such in general, and Red
Hat ecosystem in particular (especially since they bet on Wayland as the
future, and there libinput is the only choice), is important enough that Red
Hat better make sure it’s well maintained. It’s Red Hat/IBM, really, who
should be interested in making sure the bus factor of libinput is > 1\. Thus
the problem should be raised within Red Hat’s management, and they should
_hire_ additional people for fair buck to help. Otherwise it looks as if
someone who’s paid for X input stack maintenance is seeking free labor to help
him.

If I asked someone to help me do my paid job for free, open source or not, I
don’t think it would even be ethical.

[1] [http://who-t.blogspot.com/2019/10/libinputs-bus-factor-
is-1....](http://who-t.blogspot.com/2019/10/libinputs-bus-factor-is-1.html)

------
montebicyclelo
Having used a Macbook for the last 10 years, I can confirm that the trackpad
feels better than trackpads on windows laptops, Chromebooks, and Macbooks with
Linux installed (IMO, that I've tried).

However, I think the tracking may change slightly with major MacOs releases.
So which version do we prefer..?

------
wldlyinaccurate
The touchpad on my current gen Dell XPS 13 is superb on a stock Ubuntu
install. I'd love to know how much of the "bad touchpad" reputation that Linux
has is down to low quality hardware versus software support.

~~~
brabel
Have you tried a Mac touchpad? I use both a Dell XPS13 (Ubuntu from factory)
at home, and a MacBook Pro at work. The Mac's touchpad is miles ahead... and
that's even after I spent a couple of days messing with libinput settings to
make the Dell's touchpad more acceptable (it's fine now, just not really close
to the precision of the Mac's touchpad).

~~~
notechback
In what ways is it ahead? I'm quite satisfied with the touchpad on Linux, so
really wondering what I'm missing.

On the other hand _touchscreen_ is really disappointing on Linux (Ubuntu),
just not a smooth experience at all for me.

~~~
pmx
It's really quite difficult to quantify what's actually different. It feels
really precise without being "flicky", using it feels very natural and you
sort of forget about the touchpad and just will the cursor on the screen to do
as you wish.

~~~
filleduchaos
I've always struggled to articulate why I prefer the MacBook's trackpad to
every other trackpad I've used, and I think you've hit on something with that
last sentence. It _feels_ so natural that I really just don't ever think about
it, my brain skips straight to the actual interface I'm using it to
manipulate.

I get the same feeling with high vs low quality touchscreens (e.g. my phone vs
some ATMs), and especially with gaming controllers. With a good, ergonomic
controller I sort of forget about the shape and weight of the controller in my
hands after a while; my entire sense of it narrows down to the
buttons/triggers/joysticks.

------
ht85
Can people who work on both platform comment on the biggest issues for them?

Nowadays I work mostly at my desk, but for several years I've worked 90% of
the time on my laptop keyboard. Synaptics with a bit of customization
(Area*Edge size for palm detection, single and double tap timings) worked
extremely well, and I consider myself very picky.

Edit: this seems to be about libinput, in which case I understand, as the two
times I've used libinput I gave up after a few hours of intense frustration

~~~
riquito
I use a mac at work and a Thinkpad with Linux (Fedora) at home. Personally I
can't notice any difference (on the other hand the Thinkpad keyboard is
glorius). I wonder if people refer to gestures, which I don't use.

~~~
pcr910303
It’s about cursor acceleration — macOS uses an acceleration scheme so that you
can get from one’s end to the other in one swipe if it’s fast enough — if the
swipe is slow, the cursor becomes more precise and slower.

I’m not due how it is in Linux, but last time I tried running Ubuntu on my
2017 MBP, It wasn’t possible to move from edge to edge in one swipe.

~~~
ubercow13
Every OS uses cursor acceleration by default

~~~
pcr910303
It’s just my experience — it might be that Linux’s cursor acceleration isn’t
as sophisticated and comfortable as macOS.

------
josteink
> Since I don't regularly use a Linux laptop and haven't in a couple years

I’m in the opposite camp. I’ve been using a Linux laptop at home (by choice,
obviously) for the last 5-10 years and have finally been able to setup a
Linux-powered workstation at work.

It feels so refreshing and liberating. I can’t imagine ever going back.

------
mikekchar
It's funny... I have never touched a MacBook. I'm actually very happy with the
Linux touchpad drivers. I went to the article hoping to get a clear idea what
the author likes about the MacBook drivers that are absent in the Linux
drivers... But he doesn't say. Instead there was a poll asking _me_ what I
thought was wrong (which is nothing)... The parts about multi-touch were
interesting because I _really_ like the way multi-touch works in the current
driver. So I think I'm missing something.

So for those of you frustrated with the Linux touchpad driver... what is the
problem? Or is it just that it's not the same (which is a completely valid
complaint, IMHO)?

~~~
ancarda
From using Linux on my MacBook, I remember poor palm rejection being one
frustration. Also, I think multi-touch - such as scrolling with two fingers -
didn't work.

Just all round it wasn't very pleasant to work with. Perhaps if you have been
using trackpads on Linux all your life, you are used to moving your hands away
from the trackpad when not in use -- and so accidental presses are maybe never
an issue for you.

~~~
alias_neo
I've only ever used a MB once or twice; usually little more than trolling
someone who's left their machine unlocked in the office, but I did find the
touchpad intuitive.

As an exclusively Linux user, my only real issue with touch pads is palm
rejection, I feel like it has never worked so I end up in all sorts of awkward
hand positions trying not to tap it by accident.

As a 6ft4in male (with the large hands to go with it) it becomes painful when
trying to do this for any period on my XPS 13. On the XPS 15 it's easier
because there are large enough spaces either side of the touchpad to rest my
palms.

~~~
garmaine
I have repetitive strain injuries, so I simply cannot use Linux. The way I
have to twist my wrists so the touchpad doesn’t mistakenly register a palm
print is obnoxious and pain inducing.

------
mstaoru
I was very surprised to find out that XPS 15 touchpad cannot report pressure
on Linux, felt so contrary to everything else I can adjust and tinker with
under Linux. But touchpad tap is just tap / no tap and there is no middle
ground. I'm coming from Linux->Windows->Mac->Linux background, and I can
certainly feel the pain coming back to Linux from Mac (2014 models with the
sane touchpad size). Palm rejection and tap sensitivity are two major issues,
but you learn to live with it. Two-finger browser "back" gesture is something
I also miss direly, and no amount of experiments with funky Ruby (!?) based
gesture libs could fix that.

------
wayneftw
I'm sitting here at my dual 24" 1080p monitor, natural keyboard, vertical
5-button mouse, 32GB/500GB Linux (XFCE) desktop and I couldn't be happier.

Fuck touch pads and hidpi monitors. They're honestly dumb. Who wants to work
all day on a laptop? People who optimize their equipment for working in
meetings or working on the move are doing it wrong.

No wonder Silicon Valley is a bubble of Mac users. They're concerned with all
the wrong things, just like the Mac OS UI or any other OS that has been
tainted by its influence.

~~~
Doctor_Fegg
I work 90% of the day on a desktop. That doesn't mean that I want my 10%
laptop time to be an exercise in frustration. Linux touchpads are exactly
that. (It's the main reason I abandoned my short experiment with a Linuxified
Chromebook and reverted to a MacBook.)

~~~
JoeAltmaier
Understandable. I was initially confused - moving from Linux to MacBook? But
'touchpad' explains it.

My frustration with MacOs is, mousing around to all four corners of the screen
constantly. They've separated everything into the corners. But with a
touchpad, less frustrating.

------
gitgud
Does Linux on a MacBook make the touchpad feel worse?

~~~
wavee
yes

------
Brakenshire
Looks like this has been posted before the guy has even got his sponsorship
links ready, seems unfair to leave it up.

~~~
RasmusWL
Yep. I went to sponsor him with a few bucks, but as you say, it wasn't set up.

Think the best we can do for now is to give a star to
[https://github.com/gitclear/libinput](https://github.com/gitclear/libinput)
although it doesn't feel very significant.

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

FeelsBadMan.

------
londons_explore
From a technical approach, is it even possible?

How many touchpads expose the raw touch data (ie. A bitmap of capacitance
data) necessary to replicate macos gestures? Things like palm detection
absolutely require that.

Is the project worth it if it only works on one model of hardware?

~~~
oaiey
Microsoft "enforces" nowadays a generic touchpad interface they call Precision
Touchpad. When your notebook has one of these, the Windows generic driver
kicks in and the experience is MUCH better. I never owned a MacBook but I
never again will accept a Windows laptop without a precision Touchpad.

So, I have good hope that Linux users will enjoy this experience also one day.
Microsoft forces the vendors in it.

~~~
wtallis
I have an HP laptop that supports the Precision Touchpad drivers, but it takes
considerable effort to use them. By default, Synaptics drivers will be
downloaded by Windows Update and override the Windows built-in drivers. It
doesn't make much difference to the cursor motion that I have noticed, but the
Synaptics configuration UI is just as bad as it was 20+ years ago and doesn't
seem to offer the same range of options as the Windows settings page it
disables.

~~~
oaiey
This download is strange. Because synaptics was the role model for th e
interface. Probably HP messed this up.

------
smacktoward
With big OEMs like Dell and Lenovo finally offering laptops with Linux
preinstalled, is there any chance one of them could put in the investment
required to solve this once and for all?

~~~
ilmiont
My XPS 13 has a wonderful touchpad out-of-the-box, one config line and natural
scroll works (think you can enable it in settings on a stock Ubuntu install
though).

~~~
dsego
Thinkpad is also adequate for me for basic pointing and two-finger scrolling.
But I still miss the pinch to zoom feature. Also, natural scroll is nice, but
it turns on for everything and it shouldn't imho. For example with natural
scrolling enabled the gnome speaker icon requires scrolling up to decrease
volume and down to increase, which doesn't really make sense to me.

------
macintux
Does Linux offer tap to click? Of all the many things I love about trackpads
on the Mac, tap to click is very close to the top. Such a tremendous reduction
of friction.

~~~
spiderfarmer
It's not default behaviour on MacOS. So many people are missing out.

~~~
macintux
Not only not default, but at least pre-Catalina it’s buried in accessibility.
Haven’t run Catalina yet so don’t know whether that’s changed.

~~~
satysin
In Mojave and Catalina it is an option in Trackpad preferences rather than
accessibility.

[https://i.imgur.com/d0EeOG7.png](https://i.imgur.com/d0EeOG7.png)

~~~
LeoNatan25
I think this has been there for a very long time, but my mind could be playing
tricks on me.

~~~
macintux
Actually, I just remembered it’s the 3-finger drag that’s well hidden inside
accessibility. Mea culpa.

~~~
satysin
Ah yes the three-finger drag is still hidden away in accessibility. It is one
of the few options I enable there, such a great option I am kind of surprised
it isn't the default as once you use it it becomes so natural.

------
konschubert
I could not see the sponsor button on the linked github project. Has it been
removed?

------
modzu
the hug of death says it all: we wish!!!

------
ThePowerOfFuet
>so you aren't seeing this.

I beg to differ, Bill.

