Live data from Hacker News

Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

gitclear.com

211–220 of 284 posts

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#211

Earlier quoted context omitted.

It isn't... You can see this in an open source JavaScript implementation of kinetic scrolling by Apple called PastryKit[3] using a magic number momentum * 0.9. The problem is, that on modern Linux environments, there is no clear responsibility for where scroll handling code belongs. Especially Kinetic / Inertial scrolling is handled way different than in macOS. There is libinput (for handling and redirecting input ev…

Worth mentioning that before libinput, the synapse driver handled kinetic scroll very well IMO, but AIU the developers removed the device-specific coefficients and other parameters because they said it couldn't be tested and became a mess or something. I remember looking at my Linux (Wayland, gnome3) notebook in anticipation of physical pain, at which point I switched to Mac OS permanently. To this date, I still don'…

While is may be true from a user perspective, this "kinetic scrolling simulation" was removed, because it could lead to unexpected behaviour.

Example: If you where scrolling in a window, the driver kept sending scroll events for a short time to simulate kinetic scrolling. Now, if you moved the cursor to another window, the other window started scrolling, because of the simulated events.

This is not the case on macOS. Changing window focus doesn't change the scrolling. So, while working from a user perspective (in my opionion this would have been better, than NO kinetic scrolling at all), technically, it is a bug / unsolvable behaviour :-), because this problem cannot be solved on the driver level - there is no reference to the current focussed "window" / active element.

That's probably the reason why they thought: This must be solved at App level, which was the worst decision they could make. Putting the effort on the shoulders of App developers instead of solving it at one place leads to so much wasted developer time, that could have been put into new features or solved issues. I was shocked about how nobody seemed to notice that.

However, they are not "hobby" at all. Peter Hutterer is awesome and he understands the problem very well - but as a single developer it's hard to convince a whole community, that partly does not even (want to) understand the problem. And he's responsible for libinput, not for the compositors - so it's clearly not his fault.

I think the problem lies in separated responsibilities. They are trying to keep the projects (driver, compositor, window manager) separated / independent, but in this case, the problem is spanning the whole stack.

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#212

Earlier quoted context omitted.

> I filed an issue[1] on cosmic in hope they'll get it right, but I don't have too high hopes that this is of much interest. That's insane but you're right. Firefox on Ubuntu had awful trackpad scrolling 10 years ago and it's still bad. How do you make an OS where the main pointing device on half of the market sucks and assign that low priority?

I've been using Firefox on Ubuntu from 2009 to 2022, 08.10 to 22.04, then switched to Debian, but I never noticed any problem. I always used X11, a laptop, touchpad and two finger scrolling. Maybe is it a Wayland thing? Or it is very subjective.

Noticing a problem and having smooth / improved scrolling are two different things. I think you can only notice the difference if you've ever used a macOS device with a trackpad for more than 2 weeks and then switched back to either Windows or Linux. It's just feels HORRIBILE for some people (like me).

The interesting thing: Some Distributions have smooth scrolling (or interial scrolling / kinetic scrolling) by default (Fedora, Ubuntu) and some don't. Those who have enabled it, have no speed setting, so most of the time it's way to fast. I tinkered around a very long time with libinput-config to get it right and now it's acceptable. But it is still waaay better on macOS.

It is NOT a hardware issue though. I tried "hackintosh" on my T460s, and the touchpad experience is nearly as good as on a MacBook, so it is mostly software / OS.

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#213
Maybe this will allow mouse to scroll like a trackpad? That would be nice.

Particularly spreadsheets with tall cells can be almost impossible to scroll with a mouse because mouse scrolling is on lines and you need half lines to comfortably view what’s at the bottom of a tall cell. But use the track pad and it’s fine.

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#214

Earlier quoted context omitted.

> I filed an issue[1] on cosmic in hope they'll get it right, but I don't have too high hopes that this is of much interest. That's insane but you're right. Firefox on Ubuntu had awful trackpad scrolling 10 years ago and it's still bad. How do you make an OS where the main pointing device on half of the market sucks and assign that low priority?

> How do you make an OS where the main pointing device on half of the market sucks and assign that low priority? Because Linux isn't "an OS". It's a kernel made by one set of developers, combined with a bunch of operating systems made by a second set of developers, which pick and choose compositors/window managers/etc. often made by a third set of developers. Each of these sets of developers are pretty good at solvin…

That's what I think is the problem. And exactly the reason I thought cosmic could get this right. There is a lot of promising decisions in this project, but maybe it'll take a while to work as expected :-)

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#215

Earlier quoted context omitted.

It isn't... You can see this in an open source JavaScript implementation of kinetic scrolling by Apple called PastryKit[3] using a magic number momentum * 0.9. The problem is, that on modern Linux environments, there is no clear responsibility for where scroll handling code belongs. Especially Kinetic / Inertial scrolling is handled way different than in macOS. There is libinput (for handling and redirecting input ev…

Slight correction: macOS handles the kinetic scrolling, but rubber banding is handled by the app itself.

Oh, that was new to me. Thanks...

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#216

Earlier quoted context omitted.

Doesn't putting 3 fingers on a track pad already feel so damn awkward? I have to position my wrist so oddly to do something like that.

Personally, I find 3-finger drag to be a dream. I have spent many hours happily using a MacBook this way, and can’t imagine how I’d want it to change.

Three finger drag is a dream. I have switched to Linux and I'm missing it sorely. Linux is lagging behind, but there are hacks. https://github.com/marsqing/libinput-three-finger-drag

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#217

Earlier quoted context omitted.

It isn't... You can see this in an open source JavaScript implementation of kinetic scrolling by Apple called PastryKit[3] using a magic number momentum * 0.9. The problem is, that on modern Linux environments, there is no clear responsibility for where scroll handling code belongs. Especially Kinetic / Inertial scrolling is handled way different than in macOS. There is libinput (for handling and redirecting input ev…

> There is the display server > There is the compositor > There is the window manager What kind of Schrodinger Way11 world is that? X11 has display server and window manager (and window manager doesn't deal with mouse movement), and Wayland has a compositor.

I just meant to point out the complexity of the transition Linux has gone through... The transition from X11 to Wayland is still a thing and most Environments / Window Managers still use code from both technologies.

However, you are right, there is no such thing like display server AND compositor.

> and window manager doesn't deal with mouse movement

And that's causing one of the problems I described above, when changing window focus while scrolling. The driver just sends scrolling events, regardless of the window focus, so it keeps scrolling, when you trying to "simulate" kinetic scrolling.

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#218

Why does this seem like such a hard problem to solve for everyone that isn’t Apple, when Apple seemingly solved the Trackpad over a decade ago? Is this it? An unknown ROI? >the highly uncertain ROI for trying to align touchpad acceleration has prevented us from proposing a system change to the default Linux settings. I can only speak for myself, but I gave up using trackpads on anything that isn’t a MacBook many year…

I think the reason is that "a good trackpad" as well as "a good keyboard" is not something that can be measured. Let's say that the cost of a good trackpad is equivalent to the cost of, let's say, 16 more Gb of RAM. Does the user given the same price choose to by the laptop with written on the box "32Gb of RAM" or the one that says 16? The first, because 32 is better than 16! Apple is different because they have a pr…

It is NOT a hardware issue. I used Hackintosh on my T460s and the macOS experience was nearly as good as on a MacBook Pro (hardly noticable difference). Switching back to Linux / Windows was the usual "meh" experience.

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#219
post #121

Earlier quoted context omitted.

Try accessibility settings and then 3 finger drag (switching spaces will become 4 fingers). It works really great and makes working in design tools feasible.

Doesn't putting 3 fingers on a track pad already feel so damn awkward? I have to position my wrist so oddly to do something like that.

Are you positioning your wrist differently for three fingers than for one to place your fingers at a particular angle on the trackpad? Or just to reach further into the trackpad to make room for the other fingers? If it’s the former, you don’t need to do that, it will work at whatever angle feels comfortable to you.

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#220
post #8

Earlier quoted context omitted.

It's not just the software. I have Ubuntu on a 2017 MBP and the touch pad experience is so much better than linux on anything else.

I've connected an Apple Magic Trackpad (external bluetooth trackpad that sits on your desk) to an ubuntu machine and it's wonderful. There are still some software things to solve to get the acceleration perfect and things like scrolling working, but having trackpad hardware that isn't trash goes a really long way.

I tried doing this with a Thinkpad but the BT connection would cut out periodically and I gave up. Did you have to do anything special to get it working?
Post reply on HN