News for hackers. Stuff that matters.
Re:Cosmic Skies of a Colorado July by ugh123 on Friday July 14, 2023 @03:36PM (#36728881)
One thing i've seen desktop Linux struggle with, or rather the kernel or some other subsystem/drivers, is mouse and trackpad handling.

On OSX (and possibly Windows although its been a long time), its soooooo silky smooth. But on multiple Linux distros i've used, including Pop and Ubuntu, it just doesn't feel right even after adjusting all sorts of settings.

This is one thing thats kept me from full time Linux DE usage :(

Re:Cosmic Skies of a Colorado July by vladvasiliu on Friday July 14, 2023 @03:50PM (#36729023)
Right now, at least on my machines, Linux/X11 is better than Windows.

I think that on macOS, the hardware is also miles ahead of what you can get on a pc. This isn't to downplay the software because I remember my MBP's touchpad being wonky under windows a few years back.

But things have improved. My HP EliteBook 845 G8 is fine under Linux/X11. Still somewhat worse than the 2013 MBP, but not nearly as horrible as the HP two generations back. I'd rate it as comparable to my 2012 unibody MBP.

Under windows, it's fine, too, but it has a weird lag if you pay attention.

Re:Cosmic Skies of a Colorado July by dmz73 on Friday July 14, 2023 @04:33PM (#36729519)
Mac trackpad keeps getting mentioned as something that is leagues above the rest. I recently had to use MacBook air M2 and the trackpad was horrible. It was big but hard to use and it couldn't handle simple click and drag style of gesture that works on both windows and Linux. The buzzing feedback was random and confusing. I had to get a mouse after a few minutes struggling with it. For me experience on 15yo Dell with trackpad 1/4 the size feels superior to Mac.
Re:Cosmic Skies of a Colorado July by jwells89 on Friday July 14, 2023 @04:48PM (#36729723)
Where are you encountering buzzing feedback? I don't think I've experienced that in any Mac laptop I've used in the past 20 years. There's the haptic feedback from clicking but that's singular, distinct, and non-repeating.
Re:Cosmic Skies of a Colorado July by kroltan on Friday July 14, 2023 @08:23PM (#36731800)
Could be the electrical nature of the case? When I used a Macbook for work, if it was plugged in (original charger and cable and all) then dragging my finger over the chassi or trackpad could be described as a "haptic buzz", it felt like there were ridges on it, like corrugated cardboard. When unplugged and on battery, it would feel smooth.
Re:Cosmic Skies of a Colorado July by gooseyman on Saturday July 15, 2023 @12:30AM (#36733502)
I too experienced this with my MBP. Some thought I was crazy, others felt. My surface pro 2 did this as well!
Re:Cosmic Skies of a Colorado July by vladvasiliu on Saturday July 15, 2023 @04:40AM (#36734840)
Yep, that's probably because the power adapter wasn't grounded.

Here in Europe, at least in 2013, the adapter had two ways of plugging into an outlet: a cable and a plug that could be clipped on. The plug only had two prongs, while the cable had a ground connector. I'd get the "buzz" if the adapter wasn't grounded.

This also happens with my HP laptop if I plug it into an ungrounded usb-c adapter, so I'd expect the same thing to happen to iPads.

Re:Cosmic Skies of a Colorado July by klooney on Friday July 14, 2023 @06:10PM (#36730632)
It's all about what you're used to, they're all fine until you switch.
Re:Cosmic Skies of a Colorado July by maleldil on Friday July 14, 2023 @09:04PM (#36732065)
Nah. I was used to Dell trackpads for years, but I immediately felt the Macbook's was superior immediately.

We have many Windows laptops in the family, and everyone uses mice most of the time. I only use a mouse on my Macbook when it's hooked up to an external display. Even then, I sometimes wish I had a Magic Trackpad.

Re:Cosmic Skies of a Colorado July by vladvasiliu on Saturday July 15, 2023 @04:57AM (#36734925)
> We have many Windows laptops in the family, and everyone uses mice most of the time.

Yup, at work we have "high end" enterprise HP Elitebooks. We've had a general refresh 1.5-2 years ago. Basically, everyone lugs around a mouse. And they're not "nice" mice, either, so it's not like they're getting any extra fancy ergonomics or what not. Hell, generally they're the basic 3 button Logitech, without even a back button (don't know how people can go without this today).

Re:Cosmic Skies of a Colorado July by qumpis on Friday July 14, 2023 @08:07PM (#36731690)
To me the acceleration of the touchpad of macbooks feels unnatural, even after prolonged used. And this is coming from a linux user on an XPS. It's so rare to find this opinion being shared though.
Re:Cosmic Skies of a Colorado July by vladvasiliu on Saturday July 15, 2023 @04:42AM (#36734851)
I actually like the acceleration, and when I switched from the mac to linux, I spent a long time trying to reproduce it. Never quite got there, though.
Re:Cosmic Skies of a Colorado July by epolanski on Saturday July 15, 2023 @02:18PM (#36739556)
Drag and drop is awful on the trackpad indeed.
Re:Cosmic Skies of a Colorado July by babypuncher on Friday July 14, 2023 @05:00PM (#36729866)
I've never had a problem getting good mouse performance on Windows, under what circumstances are you noticing any lag?

Windows, like X11, uses a hardware mouse cursor. It sends a sprite to the GPU along with coordinates and it is drawn by the GPU outside your compositor's pipeline.

Re:Cosmic Skies of a Colorado July by vladvasiliu on Saturday July 15, 2023 @04:51AM (#36734896)
My wired mouse always worked as expected. Ditto for my wireless mice when using their own adapters. My MX Master 3s had some very noticeable lag at one point, but it got fixed by some windows and/or Bluetooth driver update.

The touchpad, though, has a bit of lag that's noticeable when making sudden changes. For "regular" use it's not much of a problem and not really noticeable if you don't pay attention. But I only rarely use Windows, so whenever I do, I see it for a few minutes at first. It's a bit like moving to a Bluetooth mouse after using a wired one.

My main gripe with the touchpad under windows, though, is that I can't get the "tap and hold" behavior of macOS/Linux. Meaning that if a double tap and drag, say to select text, it will "hold the tap" for a short time if I lift my finger. Since the touchpad is of the hinged variety, it's impractical to actually press on it and move the finger while pressed. Bonus points for pressing near the top not exactly doing anything.

I think there is a setting to tap and hold, but that'll hold the tap indefinitely (or at least very long) until you tap again.

Re:Cosmic Skies of a Colorado July by beebeepka on Friday July 14, 2023 @03:56PM (#36729096)
What are you complaining about? It's one thing to like MacBook trackpads but what exactly is wrong with trackpad/mouse handling in Linux?

I use the same mouse on Mac, Linux, and windows. It feels exactly the same on each OS when configured to the same dpi/speed/accell and polling rate

Re:Cosmic Skies of a Colorado July by windthrown on Friday July 14, 2023 @04:04PM (#36729216)
I may just not be as picky as others but I have felt my System76 laptop's trackpad with PopOS is quite smooth. Improved from when I previously just installed Ubuntu on random Dell laptops.
Re:Cosmic Skies of a Colorado July by gdelfino01 on Friday July 14, 2023 @08:13PM (#36731728)
My System76 laptop's trackpad is also very smooth. The only moment when the mouse freezes for a while (sometimes) is when using the default screenshot application.
Re:Cosmic Skies of a Colorado July by serf on Friday July 14, 2023 @04:05PM (#36729224)
>it just doesn't feel right even after adjusting all sorts of settings.

personal opinion: have you looked at the sheer number of options exposed for a modern trackpad in linux?

it's insane; I don't really have any problem understanding the difficulty in achieving a good set of defaults -- there were like 200 exposed parameters the last time I tried to get it 'just right'. (a modern synaptics' touchpad on a new dell XPS.)

if I was on some quest to make it feel like Windows or OSX i'd probably have to give up -- not that those two feel better to me, but the sheer granularity is intimidating.

NOTE: this isn't to say that I dislike how the trackpad feels in Linux; I usually always get to a nice set of parameters that feels good to me, they just aren't the same as Windows or OSX, although I have little doubt that the granularity is there for someone to get it right.

Re:Cosmic Skies of a Colorado July by jwells89 on Friday July 14, 2023 @04:05PM (#36729225)
This is partially due to hardware.

Trackpads are anything but standardized. For example those Apple's been using for quite a while now are built with the same touch controllers they use in iPhones (essentially making them iPhone screens sans screen panel), and on the extreme opposite end you've got cheap ones like is built into a Logitech media center combo board I bought several years ago which emulates a mouse instead of presenting itself to the connected device as a trackpad (and as you might expect, is terrible to use).

Re:Cosmic Skies of a Colorado July by wffurr on Friday July 14, 2023 @04:10PM (#36729278)
There was a project to address this but it’s been slow going: https://www.gitclear.com/blog/linux_touchpad_update_january_...
Re:Cosmic Skies of a Colorado July by aorth on Saturday July 15, 2023 @02:29AM (#36734147)
I've been sponsoring the project since the beginning. They have to add support at all layers of the stack, and in Linux that's a lot of (moving) targets! Wayland, libinput, Firefox, Chrome, GNOME, KDE, etc... it's open source. We can't just sit around and complain.

For what it's worth, I've been using an Apple Magic Trackpad 2 for five+ years via USB and Bluetooth and it works well. Pinch to zoom, two-finger swipe for forward/backward in the browser, and others.

Re:Cosmic Skies of a Colorado July by kccqzy on Friday July 14, 2023 @04:34PM (#36729547)
I'm also using an Apple trackpad on Linux (over both Bluetooth and USB) and it works absolutely fine. I didn't need to adjust any settings. It feels native. No difference whatsoever that I can perceive between this trackpad on Linux and on macOS.
Re:Cosmic Skies of a Colorado July by mark_l_watson on Friday July 14, 2023 @04:38PM (#36729598)
I agree about the trackpad. I have two old Max Laptops running Ubuntu and the trackpad experience is perfect.

That said, I have a style involving sometimes using both index fingers on my System76 trackpad and the experience is really good, but to be honest it always takes me a minute to get in a groove with it.

Re:Cosmic Skies of a Colorado July by babypuncher on Friday July 14, 2023 @04:55PM (#36729824)
Apple's Magic Trackpad has a disappointingly low polling rate. It feels bad even on my Mac when using it with a 120hz display. The built-in trackpad on the other hand feels great. Is it possible this is your problem?
Re:Cosmic Skies of a Colorado July by ComputerGuru on Friday July 14, 2023 @05:01PM (#36729874)
I've shared my opinion before on why mouse/trackpad handling is terrible on most Linux distributions [0], thanks to a misguided obsession w/ rewriting the entire stack and throwing away vendor-provided acceleration curves in order to provide gesture support, instead of just building it on top of the correct, working solution.

More importantly, there is a solution for fixing this and I've done my part by open sourcing a multi-touch gesture solution (userland daemon) that's driver-agnostic and runs on top of the vendor-provided drivers w/ their correct acceleration curves [1].

(But TBH I don't know if this applies to Apple's trackpad because I don't know if there are any first-party drivers w/ proper acceleration curves for Linux or if they've all been – unfortunately poorly – reverse engineered.)

[0]: https://neosmart.net/blog/multi-touch-gestures-on-linux/

[1]: https://github.com/mqudsi/syngesture/

Re:Cosmic Skies of a Colorado July by tannhaeuser on Friday July 14, 2023 @06:20PM (#36730726)
Interesting. I came to accept the rewrite for libinput, considering it's being developed by the same developer as synaptics, and he/she who codes gets to decide whether to maintain something he/she considers a mess of course. However, the only possible reaction from my side was to leave behind what was causing physical pain for me and return to Mac OS. From past discussions ([1], [2]), it appears I'm far from the only one. I hope the extant desktop devs at Red Hat and elsewhere enjoy their big refactorings for the sake of it as a hobby (wayland, gnome, libinput, systemd) but man does it suck. It's such a regression I've given up any hope and think desktop Linux has already peaked around 2016-18.

[1]: https://news.ycombinator.com/item?id=35313903

[2]: https://news.ycombinator.com/item?id=35428847

Re:Cosmic Skies of a Colorado July by ComputerGuru on Friday July 14, 2023 @06:35PM (#36730849)
You’re not the only one to express this sentiment; a lot of people grappling with the discontinuities in the X11 to Wayland migration (and the gnome 2 to gnome 3 to gnome 4) have been saying the same thing. And that’s just for cases where the same developers have decided to move on to a new approach and the community has begrudgingly agreed to march along.
Re:Cosmic Skies of a Colorado July by abdullahkhalids on Friday July 14, 2023 @07:34PM (#36731419)
Very cool. I am trying to compare the gesture support for syngesture and MacOS [0], which I have never used. In syngesture, it seems you can swipe left/right/up/down with 1-5 fingers.

In MacOS, there are additional things you can do.

* Spread or bring closer 2-4 fingers.

* Swipe from the edge to do a different action than swiping in the bulk of the pad.

Are there any system limitations on linux that prevent the implementation of such gestures?

[0] https://support.apple.com/en-ca/HT204895

Re:Cosmic Skies of a Colorado July by ComputerGuru on Friday July 14, 2023 @07:59PM (#36731628)
Thanks for looking. There is no such fundamental limitation and the code was written to support such gestures in the future. However I don’t use those other gestures myself and had no motivation to write in support for them. (They might also not be particularly in demand by users as I’ve never been asked to add them.)

(Also, syngestures separately recognizes and supports both taps and swipes, and it supports both/either with anywhere from 1 to 5 fingers.)

Re:Cosmic Skies of a Colorado July by abdullahkhalids on Friday July 14, 2023 @09:05PM (#36732071)
Oh, I hardly doubt anyone needs that many gestures. But just for the sake of fun math. The MacOS page lists 15 gestures.

With syngestures, we can

* Tap with 1-5 fingers. (5 actions)

* Swipe with one finger (just the mouse) (1 action)

* Swipe with two fingers either horizontally or vertically (usually scroll) (2 actions)

* Swipe with 3,4,5 fingers either up/down/left/right (3x4=12 actions)

Total is 20 actions. So actually there are more possibilities with syngestures.

Re:Cosmic Skies of a Colorado July by ComputerGuru on Friday July 14, 2023 @09:16PM (#36732135)
Hahaha I never thought of it like that! But to admit it myself and to my own detriment, having seen people so accustomed to their phones try to “pinch and zoom” in real life makes me think that no number of additional gestures will make up for not supporting the ones macOS/iOS does.
Re:Cosmic Skies of a Colorado July by xeonmc on Friday July 14, 2023 @10:54PM (#36732753)
Is it possible to have Three-Finger Drag so that you don't need to click down on the pad?
Re:Cosmic Skies of a Colorado July by ComputerGuru on Friday July 14, 2023 @11:16PM (#36732918)
Good question. There is no technical barrier since it is possible to generate a mouse down event separate from a mouse up event however currently events are generated after the gesture is complete (meaning mouse location has been lost).

It’s easy to separate that into pre- and post- hooks, but the most reliable method I found for counting fingers in a gesture is “the maximum number of fingers during the gesture at any point” as it allows for variations in timing, location, direction, etc of first, second, subsequent fingers for a multi-finger gesture (you can’t assume they’re all present from the very start or that one finger won’t accidentally be raised mid-gesture). I’d have to change that to “detect number of fingers within xx ms of start of gesture” but that is somewhat problematic because the cursor position actually changes in response to touch between when your fist finger touched the trackpad and the time when (in your example) the third finger was finally added to the gesture (even if that all takes place in “a split second”). So it can be done but you might need to be intentional about being more careful with your three-finger swipe-to-drag to ensure the cursor remains within the desired click area until your third finger has made contact with the trackpad and hover there a brief moment to allow the daemon to determine you’re not going to add a fourth finger to the mix (changing it to another gesture altogether).

It would be entirely possible to retroactively generate a mouse down event at the original gesture start (with the first finger) when the third finger is added and no fourth finger is added, but that might be jarring from a UX perspective (cursor moves out of the bounding rectangle then the drag starts some ms later).

Re:Cosmic Skies of a Colorado July by EsportToys on Friday July 14, 2023 @11:32PM (#36733068)
I had written a Windows script for adding three-finger drag[0] that I use daily, perhaps it could provide some inspiration.

Basically, it is an independent subscriber to RawInput messages that only keeps track of whether or not to send three-finger drag, and posts emulated mouse messages using SendInput. I have a few other scripts that each run as independent userland processes that only monitors their own trigger and nothing else.

Tangentially, my TPMouse[1] script implemented inertia in a framerate-independent way so that it uses very little resource while having perfect simulation stability.

A previous discussion where I explained the analytic derivation for this low-resource exact-solution damped inertia can be seen in [10]

[0] https://github.com/EsportToys/PrecisionThreeFingerDrag/blob/...

[1] https://github.com/EsportToys/TPMouse

[10] https://old.reddit.com/r/Trackballs/comments/ym9q2t/tpmouse_...

Re:Cosmic Skies of a Colorado July by 16bitvoid on Friday July 14, 2023 @10:56PM (#36732765)
I just want to add 3-finger drag-and-drop to the list. It's so useful and much easier than the double tap or holding down the button to move things or rectangle select, especially the latter because I don't like tap-to-click. I don't know why Apple moved it from the trackpad settings to the accessibility settings.
Re:Cosmic Skies of a Colorado July by dreday on Saturday July 15, 2023 @09:08AM (#36736344)
Same! Drives me crazy every time I have to set up a new Mac for myself (I'm a contractor and clients sometimes insist i use their hardware). I have to Google it every time.
Re:Cosmic Skies of a Colorado July by ComputerGuru on Saturday July 15, 2023 @05:22PM (#36741064)
Just fyi I replied to that here: https://news.ycombinator.com/item?id=36732918
Re:Cosmic Skies of a Colorado July by askvictor on Friday July 14, 2023 @11:47PM (#36733166)
Nice; I've been looking for a way to do two-finger-swipe -> Browser back/forward in Ubuntu/Pop for a few years now, and still haven't found a solution. Hoping this is it!
Re:Cosmic Skies of a Colorado July by pantalaimon on Saturday July 15, 2023 @01:36AM (#36733892)
I think Firefox supports this natively, but it’s hidden behind a config option (dom.w3c_touch_events.enabled) and you need to enable XInput2 by setting the MOZ_USE_XINPUT2=1 environment variable
Re:Cosmic Skies of a Colorado July by ComputerGuru on Saturday July 15, 2023 @05:05PM (#36740939)
That was my own motivation and this should work for you out of the box. (just that the default/sample config file is for three finger swipe, not two.)
Re:Cosmic Skies of a Colorado July by sebastiandb on Friday July 14, 2023 @05:01PM (#36729878)
I'm using a Dell laptop, but I'm running vanilla GNOME on EndeavourOS (took out the distro-specific customizations in the installer), and its trackpad support seems perfect on mine. Everything is as smooth as I've seen on Windows or MacOS. The settings menu for it is nice. I especially like how it comes with a three-finger swipe left or right to switch workspaces/desktops, or a three-finger swipe up to get an overview of your current desktop. It all feels natural, and it gives me a sense of control; if I swipe slowly, it switches slowly, rather than just make the transition deterministically after I've swiped in some direction (something I've experienced elsewhere on Linux).

I also like that you can use two-fingers to zoom in on a webpage with Firefox, just as on Windows.

GNOME is the first DE I've tried where all of this touchpad support was implemented so well, although I haven't tried that many, to be fair.

Sorry if I sound like an advertisement; I just wanted to be specific about what I like about GNOME's trackpad support as opposed to just saying that it "works fine for me."

Re:Cosmic Skies of a Colorado July by seabrookmx on Saturday July 15, 2023 @01:54AM (#36733985)
I'm running stock Fedora (which uses GNOME) on a Framework laptop and it's the same for me. It's the first time I've had Mac level trackpad support and UI responsiveness out of any non-Mac.. windows or Linux.
Re:Cosmic Skies of a Colorado July by smoldesu on Friday July 14, 2023 @05:12PM (#36730001)
I'm using a Magic Trackpad 2; my experience has been just about perfect on KDE Wayland. GNOME's implementation is good too, but KDE's feels slightly more intuitive to me.

KDE gives you more granular trackpad settings than MacOS offers out-of-box, and the Wayland session has more gestures than you can shake a stick at. I think you owe yourself another visit :)

Re:Cosmic Skies of a Colorado July by tryptophan on Friday July 14, 2023 @05:14PM (#36730015)
I'm using a razor basilisk and it just feels so awful to use on linux. The best part of the mouse is the great scroll wheel(very similar to the mx master but better) and this part does not work at all on linux. Scrolling in general is just a total mess in linux and it frustrates me so much that I went back to windows. The mouse movements also feel so janky for reasons I can't really put my finger on.
Re:Cosmic Skies of a Colorado July by littlestymaar on Friday July 14, 2023 @05:49PM (#36730399)
I got forced by my employer to use a mac two years ago, and I had the exact opposite experience: the trackpad was so far from what I was used to (from reversed scroll motion, to the many accidental and undiscoverable multi-touch or smart gesture shennanigans) that I just hated it, and I soon plugged a mouse.

UX is a very subjective thing, and it depends a lot on your background: you're never going to feel instantly home when switching platform no matter how “polished” it is supposed to be.

Re:Cosmic Skies of a Colorado July by SoftTalker on Friday July 14, 2023 @11:22PM (#36732983)
The reverse scrolling is something I have to disable on any Mac I use. It feels natural on a phone but backwards on a touchpad. Weird.
Re:Cosmic Skies of a Colorado July by sangriafria on Saturday July 15, 2023 @05:44PM (#36741235)
The only unexpected gesture I had was the swipe back/forward a page (I've had the same issue on mobile as well) but I just disable this particular gesture. Which gestures did you find that you accidentally triggered?
Re:Cosmic Skies of a Colorado July by pjerem on Friday July 14, 2023 @06:27PM (#36730774)
There have been incredible improvements on this precise topic during 2022.

You should give your Apple Trackpad a new try on the latest Gnome on Wayland.

Re:Cosmic Skies of a Colorado July by LoganDark on Friday July 14, 2023 @09:38PM (#36732297)
GNOME Wayland supports Apple trackpads extremely well, based on my experience using a Magic Trackpad 2 with Fedora Silverblue.
Re:Cosmic Skies of a Colorado July by inamberclad on Saturday July 15, 2023 @12:36AM (#36733561)
Seconded. On the rare times when I boot into the Windows partition on my laptop, the touchpad feels noticably better. Linux doesn't even handle all the quirks of my touchpad correctly so occasionally it'll get extremely slow and laggy, bordering on unusable! It's a Dell XPS-15 9510 and I haven't been able to solve this despite the laptop being out for almost two years. I've upgraded the touchpad firmware and the BIOS multiple times.
Re:Cosmic Skies of a Colorado July by ekianjo on Saturday July 15, 2023 @12:38AM (#36733577)
I have never understood why people want so much from a trackpad. Keyboard shortcuts will do most things much faster and more reliably.
Re:Cosmic Skies of a Colorado July by phendrenad2 on Sunday July 16, 2023 @07:28PM (#36752449)
More reliably, but not as efficient. If you're navigating around using a touchpad, you can do gestures without leaving the touchpad.
Re:Cosmic Skies of a Colorado July by flippinburgers on Saturday July 15, 2023 @04:17AM (#36734699)
I use pop os and for some nearly insanity level reason highlighting is VERY janky. It often looses focus, switches the start point, completely becomes unavailable, and generally has nearly driven me to go insane.

Maybe it is my mouse but I kinda doubt it.

Re:Cosmic Skies of a Colorado July by maxloh on Saturday July 15, 2023 @10:03AM (#36736855)
The missing piece seems to be mouse acceleration.

Linux have it but the acceleration curve is quite different from Windows' offering.

> A mouse acceleration feature accelerates the motion of your pointer. It enables users to move their pointer faster and cover more on-screen distance with merely a faster mouse movement rather than the physical distance the mouse covers.

https://www.makeuseof.com/windows-10-disable-mouse-accelerat...