XWayland fractional scaling like in KDE

Hi there!

Is there any way to make XWayland apps scaling on GNOME works just like in KDE with “Apply scaling themselves” option selected?

I just tried 225% scaling on KDE, and with that option selected all my mainly used applications (Chrome, VSCode, and some Jetbrains IDEs) scales itself perfectly fine, with crisp and easy readable fonts. However, if I select “Scaled by the system”, they all looks blurry and get painful to work with.

On GNOME, there is no such option in UI, and it looks like GNOME applies same logic as KDE with “Scaled by the system” selected. I get that it more versitale logic since it works with legacy apps that cannot scale itself propery, but in my case I think I just don’t use any, and can easely sacrifice them to make apps I really need be usable.

What I’ve tried so far:

  1. running “echo Xft.dpi: 216 | xrdb -merge” – this is how KDE does it, I believe. For some reason, has no effect on Gnome.
  2. running "gsettings set org.gnome.settings-daemon.plugins.xsettings overrides “{‘Xft/DPI’: <221184>}”, no visible effect
  3. adding “Xft.dpi: 216” to .Xresources file – nothing either.

If it matters, I use Ubuntu 23.10 with GNOME 45.


Bumping this in hopes it is seen by more people. Sadly, I myself do not know of any solution to this short of disabling fractional scaling and increasing the font size to what you want, which works well for Electron-based apps, but GTK based apps are left with really tiny icons, making them uncomfortable to make out (which kind of defeats the point of fractional scaling).

I really hope the KDE solution gets implemented. I’m not even asking it be the default, but simply that we are given the option between the current method of XWayland scaling and KDE’s, as like @CodeCapy said, I personally do not rely on any X11 apps that don’t support fractional scaling out of the box, or don’t even allow the passing of variables to scale (like Steam).

This really is the one thing that keeps me from using GNOME; at least half of the apps I use (and nearly all games) are very unpleasant to use on my 2254x1504 monitor. Please don’t exclude us users of ~1440p displays!

1 Like

Same issue here.

It’s the main reason I moved from Gnome to KDE. KDE with Wayland is in a very good spot now. All important problems (in my workflow) are fixed.
Gnome is a no go (for me) because of this exact issue (XWayland apps forced to scale, it should be optional)

I am really hoping someone will get around to implementing this option for Gnome eventually. I’d love to give it another spin.

Also, if someone finds a workaround for this I am equally as interested.

I guess it’s now very clear that Wayland is the future and that we are gonna have XWayland apps for years to come so at some point there will have to be a solution for this in Gnome as well.

1 Like

Seconded. This is IMO extremely important thing to fix. People are moving to higher res monitors (at least I get that impression by looking at Steam stats) and currently on Gnome this makes a lot of apps unworkable - you get a blurry mess. And let’s be real - devs won’t change their toolkits / frameworks to the ones that behave better on Gnome.

For me this makes me struggle with tough choice - should I stay on Gnome? I want to - I like it the most among DEs available on Linux. But as I moved to 4K display (mixed with 2 full hd displays on the side) this makes some of the apps l rely on hard to use. Good example is OnlyOffice - with fractional scaling it’s blurry. I’ve tried other office suites, but quite frankly even though some are more capable the UX usually sucks (and sadly no MS Office option).

At least the option to disable / override (with env variable etc for a start) scaling for specific app would be a massive step up as in lots of app you can choose things like font size, thus making it ok on 4k screen without scaling.

See this and my other replies in this other topic:

If a toolkit or application can implement an environment variable to hack around this, they don’t need to change toolkits. They just need to get them working natively on Wayland. This is the “correct” way to get scaling to work, any current attempt to do it through XWayland is a hack.

but you do realize end user does not care about that? They care whether it works or not - especially in relation to other DEs (but even that is a stretch - quite huge chung of users don’t know what DE is),

In this instance KDE is a clear example - you have a (simple) way to make apps look good.

And as mentioned it’s doubtful that devs will switch to other framework, or make tweaks to their existing setup to make it work with Wayland. It’s already a nigh miracle when they actually make a working Linux version. Onlyoffice is good example - when the “blurry on Wayland” bug has been reported it quickly got “won’t fix” tag.

And again - end users don’t care about all this “backend” stuff. They care whether they can get their job (or entertainment) done.

Well, good thing then that we haven’t asked the end user to work on this, but to apply pressure on app developers to leave X11 behind and move to Wayland.

Please see all of my replies in the other topic I linked, the option used by KDE is only to choose between breaking apps in one way, or breaking other apps in another way. So either way, something does not work, and users will be complaining.

lol… yeah, with this kind of approach you’re rather getting people use other DE. Not because they don’t like what you’re doing UX wise, but simply because they can’t do their work as the apps they need don’t work reliably.
And my sympathy goes to you… but sadly I don’t think you’re in position of power. Huge chunk of devs simply don’t care for relatively small Linux user base.
IMO it’s a tough balancing act between applying pressure and picking battles you actually can win.

On my end I’ll spend a couple more days figuring out workflows that might get job done… but in the end if I won’t be able to do it and I find more apps that don’t work well on Gnome, but work ok on other DEs I’ll simply have no choice and I’ll have to move on.

Then I wish you all the luck, and I do hope you’ll contribute to other projects. Free software projects don’t have a monthly quota of souls to save, but we all need people actually working on them.

That will not really help anything. This issue affects all DEs that are using XWayland. KDE only has a workaround, it does not fix the bug.

Then the app developers are not in a position of power either because they already did the Linux ports.

No, the apps mentioned in the first comment (Chrome, VSCode, Jetbrains) already have mostly complete Wayland ports. So the battle to get them to commit to Wayland is already won, now they just need to finish them.

I wonder. The two choices are: scale and become blurry (the status quo in GNOME), or do not scale and remain tiny (optional in KDE). Given these choices, does anybody actually prefer blurry? Can we just unconditionally switch to tiny apps instead? Maybe Jason is right and we’ll just get a new stream of complaints about apps not scaling, but this seems less bad than being blurry?

I mentioned this before, apps being blurry makes them ugly but they are still usable. If they are too small then they are pretty much unusable. But yes, I couldn’t say which is going to result in less bug reports, or if the majority of users are only going to use X11 apps that can support that Xft.dpi setting to at least scale the text.

Edit: Ok, I had to test this again because it’s been a while since I tried it but yes this setting is very much broken with Motif and Xaw and GTK2, etc. and there is not much that can be done about it.

Maybe for the short term.

Long-term I expect support for X11 integer scaling to be a pretty good indicator for apps that will eventually be ported to wayland, and true legacy apps that will be stuck with X11 forever.

I’m not so sure about that. Users want fractional scaling because 100% is too small, so rendering an app at 62.5% (with an 125% scale) is bad.

To clarify this, the legacy apps are still distorted even with the setting enabled in KDE, just for the opposite reason (apps are scaled down on the screens with a lower scaling factor, instead of scaling up to a higher factor). Only it’s worse because they are too small in addition to being distorted. This is especially bad with fractional scaling because old X11 apps all use bitmap fonts, so the text gets very ugly and hard to read.

So if small is worse than blurry, then I wonder why are users requesting that we allow small to match KDE…

If the screen resolution (1920 x 1080) and the screen size (52.1cm x 29.8cm) then the DPI should be auto-calculable as (93.6dpi x 92.0dpi).

For Y (height), given that a point of font size is 0.353mm, the screen should be (29.8cm / 0.353pointsPerMM) 842points deep and a 10-point font should have a height of 3.53cm or 1.39in. With the 1080 resolution that gives a Yscale (scaling factor) of 1.2827 for Y (1080 / 842).

For X (width), give the DPI, X scale factor can be ratio-ed from 92.0/93.6 * 1.2827 = 1.2607 .

For Z (depth), assuming 30 inches viewing distance, the user could ratio this by their actual normal viewing distance. So a stated viewing distance of 50 inches could increase the scaling by 50/30 given (2.1378 x 2.1012).

Because it works fine, as long as you never use an app that happens to use one of those old toolkits that doesn’t scale itself correctly. IMO this cannot be the normal policy because long-term it does seem to break the entire purpose of XWayland. And I think KDE would agree that apps finishing the Wayland ports is priority. But, this is just my opinion anyway.

But hey, if some distro really wants to test out just how much it matters to users, they can try to ship with XWayland completely disabled and see how many complaints they get…

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.