Live data from Hacker News

A few HiDPI tricks for Linux

blog.yossarian.net

31–40 of 192 posts

Re: A few HiDPI tricks for Linux

#31
post #16

Not related to HiDPI, but looking at the picture of his monitor setup: From an ergonomics standpoint (i.e. the health of your neck), the upper edge of your monitor shouldn't be higher than your eye level. Looking straight or looking down is fine. Thus the monitor on the left is probably not very ergonomic.

Author here: you’re absolutely right. My previous vertical monitor was a lot shorter; this one has definitely not been great for my neck. I’ll probably switch it back to horizontal at some point.

What size monitors are those? I use a pair of 24" 4K monitors in roughly the same configuration as yours. 27" would definitely be too tall.

I find having a vertical 24" monitor to be super useful, especially for reading typical PDF files as an entire page fits nicely on the screen.

My vertical monitor is a bit closer to the desk, and the horizontal monitor is much higher than yours, about 7.5" above the desk. The bottom edges are not aligned; the vertical monitor bottom edge is about 5" below the bottom of the horizontal monitor, and its top edge is about 3" above the top of the horizontal monitor.

The top of horizontal monitor is just below my eye height. So the top of the vertical one is a couple of inches above that, but this is not a problem as I don't spend much time looking at the very top of that monitor.

Each monitor is tilted separately. The horizontal one is tilted back only slightly; the vertical one tilted more. So the center of each monitor is perpendicular to my line of sight.

At the moment I'm using the two monitors with a Linux desktop, but sometimes I connect them both to a ThinkPad for a three-monitor setup with the ThinkPad's display and keyboard. When I do this, I raise the horizontal monitor up another inch so the ThinkPad display tucks in underneath it.

With your horizontal monitor sitting so close to the desk, I have to wonder if your seating position may be too low? Are your forearms horizontal when typing? (Forgive me if I'm being nosy or presumptuous, just curious.)

One related tip for anyone reading this, regardless of your monitor arrangement: if you wear glasses, do not use progressive lenses at your computer. Instead, get a pair of single vision lenses with a fairly tall aspect ratio so they let you see the entire screen(s) without tilting your head back. Don't ask your optometrist for a "reading" prescription - that tends to be about a 16" distance, and your monitors are probably farther from your eyes than that. Measure the distance from your eyes to the monitors and get single vision lenses made for that distance.

Re: A few HiDPI tricks for Linux

#32

The author brought up mouse acceleration, which reminded me of why I switched back from Linux to a Mac: the mouse curves were terrible IMHO, with seemingly no way to change it. The parameters you can tweak in X11 didn’t let me change the fundamental curve, and to me where so much worse than Apple’s it rendered the system frustrating to use. I don’t know if wayland suffers from the same issue or not, but certainly goo…

i managed (well, to make sensitivity low enough it was usable even at 400dpi .. ) by recompiling libinput. yea really

Seems like a patch others (ie:me) would like to see

Re: A few HiDPI tricks for Linux

#33
post #17

I am using Retina display on which everything looks tiny. I struggled with setting up QT scaling, GTK3.0 scaling, icon sizes, font DPI and resolutions. The problem is there is no single setting which all UI libraries follow and this makes your life hell. Even worse is when you connect an external monitor which is not HiDPI and now everything is bigger than usual. Instead scale the whole display and this works perfect…

The question is, how do we fix this? Is there a best setting to use, and if not, who will join the working group to define one?

Re: A few HiDPI tricks for Linux

#34

The author brought up mouse acceleration, which reminded me of why I switched back from Linux to a Mac: the mouse curves were terrible IMHO, with seemingly no way to change it. The parameters you can tweak in X11 didn’t let me change the fundamental curve, and to me where so much worse than Apple’s it rendered the system frustrating to use. I don’t know if wayland suffers from the same issue or not, but certainly goo…

i managed (well, to make sensitivity low enough it was usable even at 400dpi .. ) by recompiling libinput. yea really

Shouldn’t that be something that’s pulled into upstream? And if they refuse, fork libinput?

Re: A few HiDPI tricks for Linux

#35
Some other resources that may be helpful for anyone looking is (of course) the Arch wiki [0]. I also found it helpful to set somethings like DPI based on the machine (I share my dot files across my computers) which can be done pretty easily using e.g. the hostname [1]. (Note that GitHub doesn't perfectly render the org file, you'd want to see the raw file for details if interested in literal dotfiles.)

[0] https://wiki.archlinux.org/index.php/HiDPI

[1] https://github.com/podiki/dot.me/tree/master/x11

Re: A few HiDPI tricks for Linux

#36
post #24

Earlier quoted context omitted.

Except the author is using X11 as many people will. And what this shows is how many different environments / toolkits / settings there are out there. It would be nice if distributions would do a better job of handling this for you. I’ve run into the same issues myself, and it’s kind of hard to believe that I even had to figure out these configuration dpi settings in 2021.

He's using "i3 with a heavily customized userspace" which isn't exactly what most people would use. Gnome on X11 lets you (integer) scale monitors through a GUI at the very least.

Yeah but there’s a very good chance that won’t work with various hardware configurations. I was able to get per-monitor scaling to work only after giving up use of half my GPUs, and still there were problems with several apps. This was on stock Ubuntu; I didn’t get too crazy customizing because I just wanted to find a Linux desktop that worked.

Re: A few HiDPI tricks for Linux

#37
post #35

Some other resources that may be helpful for anyone looking is (of course) the Arch wiki [0]. I also found it helpful to set somethings like DPI based on the machine (I share my dot files across my computers) which can be done pretty easily using e.g. the hostname [1]. (Note that GitHub doesn't perfectly render the org file, you'd want to see the raw file for details if interested in literal dotfiles.) [0] https://wi…

Also, it is possible for most settings to be dynamic, which is useful on a laptop where you can plug screens, with XSETTINGS. That's what Gnome and XFCE are using. With Awesome WM, I am using a script [1] to update XSETTINGS (through xsettingsd configuration file). I explain more on my blog [2].

[1] https://github.com/vincentbernat/awesome-configuration/blob/... [2] https://vincent.bernat.ch/en/blog/2018-4k-hidpi-dual-screen-...

Re: A few HiDPI tricks for Linux

#38
post #17

I am using Retina display on which everything looks tiny. I struggled with setting up QT scaling, GTK3.0 scaling, icon sizes, font DPI and resolutions. The problem is there is no single setting which all UI libraries follow and this makes your life hell. Even worse is when you connect an external monitor which is not HiDPI and now everything is bigger than usual. Instead scale the whole display and this works perfect…

What if you want to display a pixel-perfect image? Perhaps this a rare use case, but it's important for some things, like dithering. Is there any way for you display an image where every pixel matches up to a display pixel?

Re: A few HiDPI tricks for Linux

#40
post #17

I am using Retina display on which everything looks tiny. I struggled with setting up QT scaling, GTK3.0 scaling, icon sizes, font DPI and resolutions. The problem is there is no single setting which all UI libraries follow and this makes your life hell. Even worse is when you connect an external monitor which is not HiDPI and now everything is bigger than usual. Instead scale the whole display and this works perfect…

The question is, how do we fix this? Is there a best setting to use, and if not, who will join the working group to define one?

It's fixed in Wayland.
Post reply on HN