What's up with scaling of X11 applications on Wayland?

I managed to get the new Nvidia drivers working so I decided to try Wayland on Plasma. But turns out in the settings I have to choose between “Apply scaling by themselves” or “Scaled by the system”. If I choose the first one Steam’s UI doesn’t scale and looks tiny, and if I choose the second one Steam looks blurry. X11 doesn’t have this problem though. Is this being worked on? Or is there a fix that I could use?

IIRC, Steam has a -forcedesktopscaling 2 option to force HiDPI. You can add that to the desktop file.

Ah. That doesn’t work for me though, cause I’m constantly changing scale when I switch between my 1080p screen and my 1440p screen.

Emm, it seems kwin sets Xft.dpi correctly, but not the resolution in X:

$ xrdb -q|grep Xft.dpi
Xft.dpi:	240
$ xdpyinfo | grep resolution
  resolution:    96x96 dots per inch

So maybe you can ask Steam if they can use the former to switch on HiDPI instead of the latter.

Under X11 xdpyinfo | grep resolution outputs 96x96 dots per inch, even when scaling is 125%. So I don’t think that’s the problem with Wayland, it behaves the same as X11 for that command. Steam must be using something else to determine the scale then, that Wayland doesn’t handle properly? I don’t know how scaling works

That’s X11 limitation.
X11 can’t have fractional scaling or scaling factor per-screen.

Wayland does not have those limitation and let’s you have 125% scaling but now makes obvious XWayland Apps can’t support it.

Steam is just an XWayland application, except it does not support X11 scaling apparently.

That’s why this setting exists as depending on which app you use, you will want one or the other.

Sorry, I didn’t see your reply. Why is it an X11 limitation? X11 does have fractional scaling, I have Global Scale set to 125% on X11 right now. And Steam properly scales to 125% and isn’t blurry.

Hi - X11 can do fractional scaling, it’s the per screen part that Méven was referring to.

1 Like

Well, it’s not true. Xorg can do fractional scaling on per monitor basis. See xrandr utility.

It is. But it works differently from Wayland. In X, the app renders in the same DPI regardless of the monitor it’s on, then xrandr scales it. In Wayland, an app can do that too. But a HiDPI-enabled Wayland app can render each of its window in the native DPI of the monitor (if the window doesn’t span multiple monitors), which you can’t do in X.

1 Like