Disable Scaling for X11 Applications when using Xwayland

Hi, currently I have the option enabled, that x11 apps scale themselves.

The way this seems to be implemented is that xwayland assumes a higher resolution than the actual screen and increase the dpi.

% xrandr | rg -A1 connected
DP-2 connected 3840x2160+4096+72 (normal left inverted right x axis y axis) 632mm x 360mm
   3840x2160     59.98*+
--
DP-3 connected primary 4096x2304+0+0 (normal left inverted right x axis y axis) 697mm x 393mm
   4096x2304    143.96*+

% xrdb -query | rg dpi
Xft.dpi:        153

while this works in general, I don’t actually want it. DP-3 is a 1440p screen here. DP-2 Resolution is correct.

When I change the option to force scaling, the DP-3 resolutions seems to be correct, but DP-2 gets a lower resolution and then scaled up by the system (So everything is blurry)

What I want, is that both screens have the correct, actual resolution, even if the dpi is wrong. The few X11 apps I use all have in app settings to scale themselves manually, and those that don’t, I don’t want to scale.

Is there a way I can completely disable any “smart” scaling or dpi stuff for xwayland?

The main issue here is games, that render at a way higher resolution if I select windowed mode and then get scaled down, which decreases fps and increases input lag massively.

2 Likes

Guess I have to live with blurry x11 apps on the 2nd monitor :slightly_frowning_face:

Hi - yeah, if you’re using screen scaling with multiple monitors that have different natural resolutions or DPI, then unfortunately as far as I know X11 and XWayland can’t really handle that as gracefully as native Wayland applications. Some of the context here might be helpful: What's up with scaling of X11 applications on Wayland?

I dont want scaling for X applications. The Wayland stuff works fine. I was just wondering if I can disable the “best effort” tries of xwayland to scale X stuff

Others will likely have a lot more understanding than I do…but, I think that’s basically what you initially had with X11 applications set to “Apply scaling themselves”? In that case, the system was just telling the applications about the screen attributes - applications were then figuring out how to render based on those attributes.

You might just be running into some fundamental limitations of X11/XWayland with mixed-resolution, mixed-DPI display setups - as I understand it, XWayland only has one DPI value for applications to render to, and your displays have two different DPI values, so at least something seems bound to look “off” in one place or another (as you mentioned the 2nd monitor having blurry-looking X11-based applications).

yes, I know. I wouldn’t mind it looking off. I don’t want it scaled tho. if my 4k Monitor has an actual dpi of 153 or sth, but X windows think it’s 96, everything should look smaller, not blurrier

Also would like this to be implemented, as this causes all Steam games to be blurry due to the use of Xwayland, unless running at the scaled resolution.

I have two displays, one with 100% and the second with 125% scaling. The main display I use is the one with 100% scaling. This means that to run games in native resolution at full screen without any blurriness, or in windowed mode without the window size being smaller than needed, I have to either:

  • Disable the display with the larger scaling
  • Set the same scaling amount to both displays (doesn’t matter if it’s 100% or above/below it)

While it’s not the end of the world to do this before launching any games, it’s still a PITA to enter Display Configuration each time I want to launch a game. :grinning:

You can use gamescope and force a correct resolution, but that also brings other issues like mouse capture or clipboard integration

You get mouse capture issues just running Wayland. Splitgate, as well as Fallout 4, and ‘CS2 running Wayland native’ all suffer from mouse capture issues.

I’ve switched back to native X11 for this very reason, as well as the fact that performance when gaming is roughly 20% better regarding certain titles running Nvidia under X11 as opposed to Wayland.

Running the latest 570 proprietary drivers