[TRACKING] State of HiDPI on Linux

Is that right? So If I am running UHD and scale 2x then run a full screen app at another resolution its guaranteed to return to the correct resolution? If that is the case then “its a solved problem”. As far as I have tested only macos seems to be able to seamlessly handle scaling. Every other implementation I have tried (even Windows) fails in one case or another.

First, you should run your display at full resolution. Then, assuming you have Xfce, just go into Appearance and set the exact DPI of your screen. This will adapt almost all of the display to your high DPI and the remaining bits are trivial.

The only caveat is, I suspect all screens will share this one DPI setting. I haven’t personally used both HiDPI and normal DPI screens with one Linux machine. But on HiDPI your fonts will be sharp: at 250 dpi they will have 2.5 times the pixels vertically and horizontally as they have at 100 dpi.

1 Like

If they just announced “There will be coming a {2880x1920 , 3000x2000} panel” I’d go all in with out hesitation.

Have anyone seen any type of response from the Framework team on this topic?

edit: What would the ideal resolution be for 2x scaling on a 13.5" panel anyhow?

2 Likes

KDE 5.26 to improve some of the blurry app scaling issues in KDE Plasma desktop:

Here is a full run down of scaling on Linux based operating systems. Note that I will be focusing on the Gnome desktop.

  1. Xorg: Only capable to use with the Ubuntu patch.
  2. Wayland: Fractional scaling is universally allowed. It is still considered “experimental”. use the
gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"

command then reboot. Fractional scaling options will be available in display settings
However, Wayland applications, apps that do not support the wayland standard and must be run using the compatibility later, will look blurry.

Solution: Increase font scaling.
This is a “good enough” solution that will make most UI elements bigger while preventing any blurry images or windows.
You can change font scaling on Gnome-Tweaks.

This is defulat size.

125% fractional scaling

100% scaling with 1.25 font scaling


Notice how the UI elements are just as large when using 125% scaling, but the text from VSCode is not blurry.

1 Like

FYI it’s quite straightforward to fix the blur. you just need to add the following two lines to ~/.config/code-flags.conf:

--enable-features=UseOzonePlatform
--ozone-platform=wayland

also you should set the “title bar style” to custom to spare some pixels from the title bar.

it is a bit annoying that one needs to do it this way (i had to edit files for several apps) but in the end it works. ultimately this behaviour looks better than 100% with 1.25x font scaling.

That only works for electron apps, though. It doesn’t work for other Xwayland stuff (e.g. emacs).

the post was only referring to vscode. there are a few other apps that don’t run well with fractional scaling. emacs isn’t one of them, on arch linux it’s enough to install emacs-gcc-wayland-devel-bin and it works just fine.

again, would be good that all of this were supported out of the box in the standard packages, but hey, better than nothing.

That is very much specific to arch, though…that’s just not a thing on most distros. And the point is that with anything that uses Xwayland, fractional scaling will result in blurry fonts. Some of them have beta Wayland implementations (like Electron-based stuff or apparently emacs), while others don’t.

like i said, the post i commented on was referring to vscode only. emacs’ solution is not arch specific, i posted an arch-related solution because that is the distribution i use, i’m sure others will have similar things.

most gaming is done via xwayland and with explicit resolution setting there is no upscaling, which eliminates another big annoyance.

the overarching argument is that wayland on intel gfx is fine. there used to be crippling issues (e.g. screen sharing not working), most of which have been fixed, and things like “blurry fonts on several apps”, most of which to my experience have been fixed, with the notable exception of jetbrains apps, but i guess that will come soon.

They don’t, though. Even something like Debian sid or experimental (which is what I use) doesn’t allow easy installation of the development emacs branch, and that is the norm. My point was that there are (in my experience) quite a few Xwayland programs still that haven’t been updated, and these flags only work for Electron-based stuff (which is still useful and applies to a lot of common software).

I just wanted to make that clear since this thread is about HiDPI on Linux more generally, not just dealing with Electron-based software. I wasn’t disagreeing with you, just adding more context :slight_smile:

that is the norm for debian, yes. which is why ubuntu has PPAs and so on.

this is mildly off-topic maybe, but: i have been using debian for almost 20 years on several devices (some which i still use). it’s good for servers that can rely on docker. i used to use it on desktops too, it used to be my go-to distribution for pretty much everything.

the problem that you mentioned, though, is crippling in the long run, and it gives people the false sense of generality that “xyz doesn’t work really well on linux”, while the truth is that once it works somewhere, 99% of the times it’s a debian-related issue. personally, laptops and gaming setups should stick to distributions with more cutting-edge features, especially since reverting mistakes is often a matter of a couple of commands, meaning that the gain from “stability” of outdated software is negligible – and even more so if one runs debian unstable.

to sum it up, i stick to my previous comment: much as most of this is still WIP, wayland on intel graphics is fine for most common use cases.

Yes, I would know ― I use Debian sid with Wayland and most things just work! Hell, if you don’t need fractional scaling, then even Xwayland stuff is fine, and most software at this point is at least Wayland-compatible (or has an implementation in the works).

I also wouldn’t say this is “crippling” since it’s very much my current system and Debian sid/experimental usually has new-enough stuff (I’d rather not alpha-test software, so it doesn’t usually cause any issues that I can’t easily pull nightlies from git repos and integrate them with my package manager). It’s just a difference in philosophies, that’s all :wink: And Xwayland stuff notwithstanding, Wayland is mostly there for most of my (personal) use-cases, though I’ve had issues with screen sharing over Zoom (that’s probably because I use sway rather than Gnome, though…stupid Zoom).

As perhaps some extra data points:

  • Zoom on wayland has completely broken screen sharing. Under modern gnome, you have to flick a switch for it to at least nominally work, and even then it will only share content from XWayland apps.
    There is a work-around by using obs to set up screen share as a second camera feed, which you can then select as “screen share”. The obs part is surprisingly easy but the whole thing is byzantine. I understand that using the zoom browser client instead may give better results (since, e.g. chrome does know how to share screen on wayland)
  • Wayland’d big plus is that scaling factors can be set per monitor. So a 1.5x scaling on the native screen with a 1x on a 1080p external monitor works just fine. Indeed, anything XWayland has some blurriness issues, but since I upgraded to FC36 this seems to be quite a bit better. Perhaps the interpolation has been refined? I’m in a situation where I don’t often need XWayland software (and in things like zoom it doesn’t matter, because things end up blurred for other reasons there regardless), so for me Wayland fractional scaling ends up a net win.

Just a quick note on Zoom: Have to use it constantly for work; I gave up on it as an actual app on Fedora/Wayland a while (as in 1-2 years) ago. Strictly browser-based Zoom user now, with the redirector extension making sure it doesn’t try to start the app on me. Video, screensharing work without issues. Only thing it doesn’t support is the custom backgrounds, but I can do without just fine.

1 Like

@Paul_Kim thank you for your solution offered. On Fedora 37, I couldn’t find any other acceptable solution but this one, now my apps that had blurred text look a ton better, on my crazy high resolution monitor.

I cannot speak for others, however, I use distros and desktop environments that work well with 2k or 4k displays.

I use two, 2k displays. I use Wayland because I’d like to actually be able to control my scaling in Gnome.

My configuration:

  • One 12th Gen Framework.turn off diplassy

  • 2x 2k displays.

  • I connect using one HDMI expansion card and one DP expansion card, No docks, adapters or other entry points of frustration for my displays.

  • Because I’m pushing two displays, I am connected to power using the provided wall adapter.

Google has killed of PIN to login on first boot, but you can use PIN to unlock at any point after that I believe.

Yeah - I think if a device has the Titan C chip it will work and if not it requires full login. Even a TPM is not sufficient (or at least the TPMs that Lenovos have). My Framework Chromebook works just fine :slight_smile:

:: Feedback from the internet on Framework’s Linux incompatible HiDPI display ::

Currently, Framework only offers a Linux-incompatible HiDPI display for its
laptops. If instead Framework offered a Linux friendly normal DPI display,
they could greatly improve the user experience for every Linux user.

OP: I’m starting to worry that I’m going to find the screen almost unusable
due to tiny graphics and text.
Comment: I have it on 125% in wayland, so some apps are fuzzy.
Comment: some … apps are … blurry (ex: Discord and Spotify).
— 2022-07-29, https://www.reddit.com/r/framework/comments/wayz1c/display_resolution_concerns/

The Framework laptop resolution (2256px X 1504px) is big enough to give you a
pretty small font size, so welcome to the marvelous world of “scaling”. …
[commands to try to fix fuzzy screen] … my experience it also makes things
look a little fuzzier, which is frustrating because you have this awesome
monitor but everything looks out of focus.
— 2023-03-12, Framework 12th gen laptop review - anarcat

I own the 13 but the PPI on that screen makes fractional scaling necessary
for me (which doesn’t always behave well on Linux/Wayland).
— 2023-03-24, Can you share the screen resolution? I own the 13 but the PPI on that screen mak... | Hacker News

I played with several permutations of Wayland/X11/GNOME (with fractional
enabled)/KDE and none got it 100% right, and even under the setup that got
closest some programs acted confused.
— 2023-03-24, Fractional scaling on Linux is still hit or miss in my experience. I played with... | Hacker News