Live data from Hacker News

A few HiDPI tricks for Linux

blog.yossarian.net

21–30 of 192 posts

Re: A few HiDPI tricks for Linux

#21

I have a 2013 Chrome Pixel, with 240 dpi, and I’ve also found that the Xft.dpi setting takes care of nearly everything, although there are some interface elements in some applications that still display tiny type. The author seems to be suggesting that 163 DPI is high resolution; is it commonly understood to be so? Because that would look a bit fuzzy to me.

Every screen’s density of pixels are different.

Re: A few HiDPI tricks for Linux

#22
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 googling around the many places were people similarly complained weren’t answered by a magic Wayland config. Does anyone know if it’s possible to get an Apple-like mouse curve in Linux?

Re: A few HiDPI tricks for Linux

#23

I have a 2013 Chrome Pixel, with 240 dpi, and I’ve also found that the Xft.dpi setting takes care of nearly everything, although there are some interface elements in some applications that still display tiny type. The author seems to be suggesting that 163 DPI is high resolution; is it commonly understood to be so? Because that would look a bit fuzzy to me.

Every screen’s density of pixels are different.

No, I once saw two that were the same.

Re: A few HiDPI tricks for Linux

#24
post #19

This article makes it seem like these steps are necessary for most Linux setups, when in reality you can do per monitor fractional scaling from a GUI as long as you're using GNOME on Wayland. No need to fiddle with per app settings, it works transparently.

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.

Re: A few HiDPI tricks for Linux

#25

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

Re: A few HiDPI tricks for Linux

#27
I have synced dotfiles across my various machines and I run i3 across these. My configs for DPI consist entirely of the following:

Xresources:

    Xft.dpi:120
    st.font: monospace:size=14
xsession:

    # haven't had time to dig into this, some systems need
    # DPI set twice
    xSetDpi () { xrandr --dpi "$1"; xrandr --dpi "$1"; }
That function is called in a case statement for other machine-specific startup config, but it's just a matter of xSetDpi 144;.

emacs.d/init.el:

    (set-face-attribute 'default nil :height xxx)
Again this is per-host, but it's a simple COND expression.

qutebrowser/config.py:

    # even with DPI set, I typically find web text too small
    c.zoom.default = '175%'
I promise you that this does not feel like any significant effort for me. It's ~10 lines across a few config files, each of which I would be maintaining anyway - none of these configs were born for the express purpose of handling DPI or zoom or anything like that.

I value having a system that is configured exactly to my preferences. I recognize that having multiple configs is a turnoff for some. I can't debate personal preference.

I have spent much more time trying to get something like Gnome to behave in a way I want than I have on all of my current config. XFCE is a pretty good experience for a DE and configuring scaling through system settings.

Machines:

1. 11" HD, OpenBSD current

2. 12" FHD, Artix Linux

3. 2x27" WQHD, Artix Linux

Re: A few HiDPI tricks for Linux

#28

Earlier quoted context omitted.

Every screen’s density of pixels are different.

No, I once saw two that were the same.

This is not true. Your pixel density is a function of your resolution and dimensions. “HiDPI” is a nebulous term that refers to high resolution screens that are also relatively small.

Re: A few HiDPI tricks for Linux

#29

Earlier quoted context omitted.

No, I once saw two that were the same.

This is not true. Your pixel density is a function of your resolution and dimensions. “HiDPI” is a nebulous term that refers to high resolution screens that are also relatively small.

If DPI means “dots per inch”, then how can the size of the screen come into it?

And what is “not true”?

Re: A few HiDPI tricks for Linux

#30
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.

This is the recommended default, and I assume it is for good reason, but I would caution against adopting this on faith. If you feel pain, try different positions out. I had the setup you recommend for many years. At first I started getting shoulder pain, and realized that I was stopping over to accommodate when looking down. I forced myself (at regular intervals, and modest cost to productivity) to have better posture, and to tilt my neck downward instead. It fixed the shoulder pain but my neck was uncomfortable. Not in pain, but constantly uncomfortable. I kept with it because I knew this was the "proper" ergonomics.

Then I realized: I spend most of my time staring at the bottom half, to bottom edge, of the screen. Typing in a terminal, adding functions at the bottom of a file, etc. I moved my monitor such that my eyes are almost dead-center, vertically, and haven't had any issues since, neither neck nor shoulders. I kept the improved posture too, so I'm sure that ultimately helped too.

I'm sure the recommended is recommended for a reason, and works for most, but hopefully my experience is useful to some.

Post reply on HN