News for hackers. Stuff that matters.
Re:Linux touchpad like a MacBook: April 2020 update by whatever1 on Friday May 01, 2020 @03:57AM (#23040008)
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.

Re:Linux touchpad like a MacBook: April 2020 update by Nursie on Friday May 01, 2020 @04:58AM (#23040287)
> 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.

Re:Linux touchpad like a MacBook: April 2020 update by kccqzy on Friday May 01, 2020 @05:15AM (#23040366)
> 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

Re:Linux touchpad like a MacBook: April 2020 update by Nursie on Friday May 01, 2020 @06:32AM (#23040742)
> 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).

Re:Linux touchpad like a MacBook: April 2020 update by Nursie on Friday May 01, 2020 @09:12AM (#23041647)
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.
Re:Linux touchpad like a MacBook: April 2020 update by gradstudent on Friday May 01, 2020 @09:02AM (#23041556)
I'm not sure if 1900x1200 counts as hidpi. I have a 4K screen and I find the experience at native resolutions awful. Please install Dia and tell me about your wonderful experiences with that program. Provided you can see any of the icons that is. Then tell me why the scaling isn't across the entire operating system but app specific.

For stuff like this, Linux is bullshit. For many desktop usecases, Linux is bullshit. After a Skype call I need to kill the app else the process takes my CPU usage to 100%. Why? God knows. Probably the same reason my lock screen sometimes shows a password prompt when I press 'Esc' or 'Enter' and sometimes it requires me to click the mouse. Did I mention I spent the last nine months without a working microphone because the drivers for my new Thinkpad hadn't made their way into any major distribution??

Don't get me wrong. I love Linux. I'd take its broken ass over Windows any day of the week. But fuck me if I don't miss macOS.

Re:Linux touchpad like a MacBook: April 2020 update by Nursie on Friday May 01, 2020 @09:11AM (#23041634)
> I'm not sure if 1080p counts as hidpi

Pretty sure it doesn't :) That '1200p' screen I have certainly isn't in need of scaling for usability, but I have scaled it to match the size of screen elements on my 4k screen next to it.

I've been going back and forth between MacOs and linux a lot lately, been using my Mac as my work laptop for the last couple of years, now that I'm working remotely 100% I figured I'd switch over to linux. Honestly not having much issue with it, bar the odd "Teams has decided it can't use your headset microphone, for reasons" error.

Never even heard of Dia, let alone had call to use it. Just installed it and yes, for unknown reasons it doesn't seem to scale does it? Which is odd given it's presumably a gtk3 app and others do scale just fine. Looks like GIMP is another one that's not onboard yet.

My daily use at the moment is IntelliJ, MS Teams, Skype, Firefox and Steam. I guess gedit, meld and a few other utilities. They all seem to be fine. Perhaps my relatively constrained set of requirements is why I'm happy with it.

Re:Linux touchpad like a MacBook: April 2020 update by kilroy123 on Friday May 01, 2020 @04:22AM (#23040119)
I too have thought for a long time there needs to be a for-profit company that focuses on a polished Linux distro. Sure there is Canonical but IMHO they're not doing such a great job on the polish side of things.

There is system76 with "Pop OS!" but I would like to see a company who's entire focus is on release a very slick OS _only_.

Re:Linux touchpad like a MacBook: April 2020 update by mcv on Friday May 01, 2020 @07:31AM (#23041016)
I think we really need the system76 approach. The only way to make a profit on a desktop Linux is to take the Apple approach of selling hardware with the OS preinstalled and tuned for that hardware.

By all means make the OS downloadable separately, share with the community and all that, but to make a profit, you need to sell hardware. And the hardware needs to be good.

Re:Linux touchpad like a MacBook: April 2020 update by dastx on Friday May 01, 2020 @08:02AM (#23041179)
> And the hardware needs to be good.

So I am about to start a new job, and the new workplace was about to send a new Macbook Pro out to me, which I didn't want. So I went to do some research for a laptop with any Linux distro preinstalled so that I could go back to them and tell them I'd rather have this.

I found out that there is no decent laptop with Linux preinstalled. System76 has some decent systems, but they didn't come close to what the likes of Dell and Lenovo offer with Windows. For now System76 seems to show most potential in this area though, so it will be interesting to see what they do going forward.

Re:Linux touchpad like a MacBook: April 2020 update by commoner on Friday May 01, 2020 @09:13AM (#23041659)
Dell's developer edition laptops have Ubuntu preinstalled and are well-received:

https://www.dell.com/linux

Lenovo's upcoming ThinkPad laptops include some models with preinstalled Fedora as an option:

https://news.ycombinator.com/item?id=22968280

Re:Linux touchpad like a MacBook: April 2020 update by dastx on Saturday May 02, 2020 @07:10AM (#23051044)
The Dell XPS developer edition is a great little laptop, however, my issue with it was that it only came in 13" size. My ex-collegue had one and played around with it for a bit, it was great except for the screen size.

The announcement regarding Lenovo's upcoming ThinkPad laptops coming with Fedora pre-installed came a literally 1 or 2 days after I'd already ordered the P1 Gen 2, which according to Canonical is certified[0] to run Linux correctly, and it's the reason I went for that. Regardless, the next generation would have left me without a laptop for the job.

[0] https://certification.ubuntu.com/hardware/201908-27280

Re:Linux touchpad like a MacBook: April 2020 update by endlos on Friday May 01, 2020 @05:47AM (#23040522)
My desktop scaling is set to 1.4 in Kubuntu, and it looks gorgeous.
Re:Linux touchpad like a MacBook: April 2020 update by Youden on Friday May 01, 2020 @05:08AM (#23040329)
> scrolling with precision mice

It's been years coming but it's getting there: https://gitlab.freedesktop.org/wayland/wayland/-/merge_reque...

Re:Linux touchpad like a MacBook: April 2020 update by teekert on Friday May 01, 2020 @04:19AM (#23040105)
Please try Ubuntu 20.04 for a month, report back here. I think it addresses most of your issues.
Re:Linux touchpad like a MacBook: April 2020 update by alias_neo on Friday May 01, 2020 @04:28AM (#23040150)
Ubuntu 20.04 (Gnome) is the first version of Ubuntu that's ever been able to scale different density monitors to different scales.

It always had the options there in previous versions, but it only ever honoured the value you set on a single monitor. Now, I can have my 4K monitor at 200% while I leave my laptop at 100% (1080p) and it works perfectly.

If only it handled Bluetooth audio devices better it'd be perfect; Currently, I can't connect a pair of truly-wireless earbuds and play audio out of them without using Blueman to mess around with the audio sink settings etc each time I connect them. On my desktop, with Manjaro (KDE) and an Intel AX200 WiFi/Bluetooth I can connect both the earbuds (with no additional tweaking) and for example an Xbox One S Bluetooth controller (with the minor tweak of disabling etrm), and they both work perfectly.

I'm not sure how much of that is related to Gnome/KDE but Ubuntu really could do with some better Bluetooth device handling, especially for audio devices.

Re:Linux touchpad like a MacBook: April 2020 update by vetinari on Friday May 01, 2020 @05:19AM (#23040389)
> Ubuntu 20.04 (Gnome) is the first version of Ubuntu that's ever been able to scale different density monitors to different scales.

Welcome to the world that Fedora users have been living in for years already. Ubuntu users can thank to Canonical's decision not to enable Wayland in 18.04 for that...

Re:Linux touchpad like a MacBook: April 2020 update by alias_neo on Friday May 01, 2020 @06:10AM (#23040636)
But I _was_ using Wayland in 18.04. So it wasn't just that Wayland wasn't the default, it didn't work even in Wayland on 18.04. I know Fedora works better, a friend/colleague of mine who uses Fedora repeatedly reminds me of it :D
Re:Linux touchpad like a MacBook: April 2020 update by teekert on Friday May 01, 2020 @05:30AM (#23040439)
That was mostly done not to create confusion regarding remote desktop/screen sharing solutions not working... different audiences I guess.
Re:Linux touchpad like a MacBook: April 2020 update by alias_neo on Friday May 01, 2020 @06:37AM (#23040761)
If it was intentional, it was a horrific UX fail. Every ounce of my being convinced me that the way it was presented, I should be able to scale my monitors differently, and the fact that it didn't was just a bug nobody cared to fix.

If it really was intentional, a small dialog or log that explains _why_ I couldn't scale monitors differently would have sufficed, or, simply moving the percentage adjustment control out of the settings for each display.

On that note, 20.04 is supposed to support fractional scaling, but if I try to turn the toggle on, it just fails silently, so are we back to square one, or did a developer somewhere decide some precondition means I can't _currently_ turn it on, but didn't feel it was worth telling me, the user, why?

Re:Linux touchpad like a MacBook: April 2020 update by vetinari on Friday May 01, 2020 @06:56AM (#23040850)
Are you trying to enable fractional scaling under X11 or Wayland session?

In the past, when it wasn't exposed in GUI, and worked for Wayland only, it was necessary to logout and login between enabling fractional scaling and setting the scale itself (the reason was, that Xwayland was started in different mode then; technicality, that doesn't matter no normal users, but then, the functionality was labeled experimental and enabled via gsettings anyway).

The X11 fractional scaling is a different beast; it uses xrandr scaling and requires cooperation from the graphic card (the output encoder, specifically - it sets up framebuffer at different size than the output to display). That also means, that it won't work on machines that do not have output encoder at all and assume framebuffer resolution is equal to output resolution, like remote sessions or virtual machine clients. Here I agree, that some error message would be appreciated. It was also brave from Canonical to enable it for LTS, without going through a testing cycle in a non-LTS release.

Re:Linux touchpad like a MacBook: April 2020 update by alias_neo on Friday May 01, 2020 @09:00AM (#23041541)
I'm in Wayland, I see the option in the display settings. "Fractional Scaling" but toggling it does nothing other than making the screen flash black for a second.
Re:Linux touchpad like a MacBook: April 2020 update by vetinari on Friday May 01, 2020 @05:47AM (#23040520)
Probably. It might have been a good call in that regard; as with everything, there are compromises.

With a hindsight, the remote desktop/screen sharing solutions caught up faster (except the closed source ones - they have no motivation when ubuntu works, so why bother) than figuring out how to handle several displays with different dpis under X11 so that legacy apps not using modern Gtk/Qt work.

Re:Linux touchpad like a MacBook: April 2020 update by Nursie on Friday May 01, 2020 @05:00AM (#23040293)
> Ubuntu 20.04 (Gnome) is the first version of Ubuntu that's ever been able to scale different density monitors to different scales.

You can do it on pretty much any modern X on linux using xrandr, FYI, it's just not easily done in a settings app. I've been doing this with xfce for a while.

Re:Linux touchpad like a MacBook: April 2020 update by alias_neo on Friday May 01, 2020 @05:14AM (#23040361)
Nice to know, thanks. You say X, does that mean not Wayland/X-Wayland?
Re:Linux touchpad like a MacBook: April 2020 update by Nursie on Friday May 01, 2020 @06:46AM (#23040797)
Pretty sure xrandr is just for X. Am on debian with Xfce, so not using wayland at present. AFAICT Wayland is the default option for Gnome sessions on debian, but I fell out with gnome around the 2->3 transition and have never looked back.

My xrandr line is not that easy to read but effectively, after I've set xfce hidpi support to double the size of screen elements, I increase the view window of the smaller screen by a factor of 1.8, and of the larger screen by a factor of 1.2, and put them next to each other -

xrandr --output HDMI-0 --mode 1920x1200 --pos 0x100 --scale 1.8x1.8 --output DP-2 --mode 3840x2160 --primary --scale 1.2x1.2 --pos 3456x-180

If Wayland can do that without so much messing around, great :)

Re:Linux touchpad like a MacBook: April 2020 update by vetinari on Friday May 01, 2020 @05:24AM (#23040412)
Wayland does that out of the box; unfortunately most people do not run Wayland, either because they prefer WM/DE that is X11 only (xfce, etc), or just because.

On X11, scaling of entire framebuffer (i.e. scaling macOS style) is a standard xrandr functionality, but it was never exposed to UI. It has some drawbacks that macOS never had to solve (how it behaves over remote x11/vnc/etc, or memory requirements for framebuffer, for example), that make it unsuitable as a general solution. It is basically one of the hacks complained in this threads.

Re:Linux touchpad like a MacBook: April 2020 update by alias_neo on Friday May 01, 2020 @06:15AM (#23040653)
I'm not sure what "Wayland does that out of the box" means; I ran 18.04 with Wayland since launch, it never gave me different scaling per monitor (not in the Gnome UI anyway).

Are you saying it would have worked had I used xrandr?

Re:Linux touchpad like a MacBook: April 2020 update by vetinari on Friday May 01, 2020 @06:27AM (#23040718)
xrandr is X11 only; it is X11 extension, after all.

Are you sure you were running Wayland? In Fedora under Wayland, you could pick a monitor and choose scaling for it in the setting applet.

Re:Linux touchpad like a MacBook: April 2020 update by alias_neo on Friday May 01, 2020 @09:03AM (#23041563)
I'm sure so far as when I login I select "Ubuntu on Wayland" and when I search through the output of top for "wayland" it's there. I'm not sure how else I prove I'm running Wayland. The machine I'm sending this from now is still running 18.04 on "Wayland" and I cannot set the DPI independently for each monitor, if I select my external monitor and set 200% and click "Done", I get 200% on all displays.
Re:Linux touchpad like a MacBook: April 2020 update by vetinari on Friday May 01, 2020 @02:55PM (#23045309)
You don't have to prove anything (but informatively, the way to detect wayland session is to check for XDG_SESSION_TYPE env variable). Also, just for curiosity, what GPU are you using?

It is quite possible that 18.04 has some bugs. I don't have 18.04 machine with hidpi monitor at hand, so I can't have a look myself, so I chalk it up that there is something weird happening.

Re:Linux touchpad like a MacBook: April 2020 update by alias_neo on Saturday May 02, 2020 @03:29AM (#23050070)
Thanks for the tip. The XPS 15 that I've tested this most on has a 1050.

I'm using the proprietary Nvidia driver.

My XPS 13 is using Intel from an 8th gen i7.

Re:Linux touchpad like a MacBook: April 2020 update by jack_pp on Friday May 01, 2020 @04:58AM (#23040283)
I've had trouble with bluetooth for the past 5 or so years since I started using Linux as my main OS but lately I've had very little problems, I can't remember a missed connection; only problem I still sometimes have is that the audio goes into low quality mode which is solved by a quick reconnect.

I own a pair of Master Dynamic MW07 and a UE BOOM speaker. As for my laptop, a Dell 7470 with Ubuntu 18.04.4

Re:Linux touchpad like a MacBook: April 2020 update by alias_neo on Friday May 01, 2020 @05:19AM (#23040388)
Interesting. Did you need to use Blueman or tweak anything?

I've found that without Blueman installed my earbuds will pair but are not even detected as being an audio device. I dislike having Blueman installed/running so I'd like to get it working without.

I'm running Ubuntu 20.04 upgraded from Ubuntu 19.10 on an XPS 13 (it has worked on neither). I'm tempted to test on my Ubuntu 18.04 laptop (XPS 15) to see if perhaps it was broken recently.

One thing of note perhaps, is that the XPS range use the horrid "Killer Wireless" card from the Alienware/Gaming range, their Linux driver performance has been generally horrid in the half a dozen of them I've experienced.

Re:Linux touchpad like a MacBook: April 2020 update by jack_pp on Friday May 01, 2020 @02:29PM (#23045048)
I use bluetoothctl and don't need to fiddle with any settings (anymore, don't remember having to make anything weird though)
Re:Linux touchpad like a MacBook: April 2020 update by alias_neo on Friday May 01, 2020 @09:05AM (#23041588)
So I tested this on my XPS 15 with Ubuntu 18.04. The earbuds paired perfectly, and after selecting them in sound I have output. If I put them back in their case, the sound switches back to the laptop speakers, and if I pull them out again, they reconnect and sound switches to them.

I must therefore conclude that something has been broken since 18.04 as it neither worked for me on 19.10 nor now on 20.04.