| Summary: | Wrong screen resolution for XWayland clients on multi-monitor setups with mixed resolution displays | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Vladimir Yerilov <openmindead> |
| Component: | xwayland | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED LATER | ||
| Severity: | normal | CC: | madness742, miranda, nate, righn, xaver.hugl |
| Priority: | NOR | Keywords: | multiscreen, wayland-only |
| Version First Reported In: | 6.3.4 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=501505 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
systemsettings settings
wrong resolution, bad performance, good looks correct resolution, good performance, looks blurry, unclickable (therefore unusable) |
||
|
Description
Vladimir Yerilov
2025-04-04 05:11:14 UTC
Created attachment 179990 [details]
wrong resolution, bad performance, good looks
Created attachment 179991 [details]
correct resolution, good performance, looks blurry, unclickable (therefore unusable)
You might want to ask how I got a screenshot of unclickable FHD game? Well I had to drag it with Meta+mouse click to another screen where I could change the settings etc, then dragged it back. Until I set native 1080 resolution the game worked "fine" (except for terrible performance due to resolution overhead). Likely an issue caused by XWayland running at the highest resolution rather than than the resolution of the screen that the window is on, due to only having one XWayland instance rather than one per screen or per window. (In reply to Nate Graham from comment #4) > Likely an issue caused by XWayland running at the highest resolution rather > than than the resolution of the screen that the window is on, due to only > having one XWayland instance rather than one per screen or per window. Is it possible (meaning: feasible) to make such change? To have XWayland instances per screen on "on-demand" for fullscreen ) or specific windows? What implications that could bring I wonder... So, is it a Plasma "bug" (something you guys could improve) or rather XWayland problem? One XWayland instance per XWayland-using app is probably possible, and then it could dynamically change its scale factor when it moves to another screen. One XWayland instance per screen is less likely to be possible since it would require apps to switch which XWayland instance they're using as they get moved between screens. I don't know if that's possible. Of course the downside of all of this would be higher resource usage due to more XWayland processes running. So there are trade-offs here. I'll let the KWin folks comment further. I can confirm the same behaviour, I switch my primary monitor scaling to 100% prior to launching a game. Legacy applications (X11) needs to be set to "Scaled by the system" under System Settings -> Display Configuration. Using custom start/end scripts with `gamemode` to adjust the monitor scaling with `kscreen-doctor` is sadly not fast enough. So i'm forced to do it manually. Cosmic DE Alpha 7 has introduced a new scaling option that fixes the xwayland resolution when using mixed scaling, something similar in KDE Plasma would be very appreciated! Using 100% scaling on the primary monitor and 150% scaling on the second monitor makes certain text hard to read because of Bug 491015. Constantly changing scaling is causing Bug 504635. I'll update the bug report once Plasma 6.4 hits the Fedora repos, and if the issue still persists. The other workaround I can think of is using `gamescope`, but it doesn't work with the Flatpak version of Steam. Monitor 1: LG UltraGear 27GL850 (2560x1440, 125% scaling, primary) Monitor 2: LG 27UL850-W (3840x2160, 200% scaling) Operating System: Fedora Linux 42 KDE Plasma Version: 6.3.5 KDE Frameworks Version: 6.14.0 Qt Version: 6.9.0 (In reply to madness742 from comment #7) > I can confirm the same behaviour, I switch my primary monitor scaling to > 100% prior to launching a game. Legacy applications (X11) needs to be set to > "Scaled by the system" under System Settings -> Display Configuration. > > Using custom start/end scripts with `gamemode` to adjust the monitor scaling > with `kscreen-doctor` is sadly not fast enough. So i'm forced to do it > manually. > > Cosmic DE Alpha 7 has introduced a new scaling option that fixes the > xwayland resolution when using mixed scaling, something similar in KDE > Plasma would be very appreciated! > > Using 100% scaling on the primary monitor and 150% scaling on the second > monitor makes certain text hard to read because of Bug 491015. > Constantly changing scaling is causing Bug 504635. I'll update the bug > report once Plasma 6.4 hits the Fedora repos, and if the issue still > persists. > > The other workaround I can think of is using `gamescope`, but it doesn't > work with the Flatpak version of Steam. > > Monitor 1: LG UltraGear 27GL850 (2560x1440, 125% scaling, primary) > Monitor 2: LG 27UL850-W (3840x2160, 200% scaling) > > Operating System: Fedora Linux 42 > KDE Plasma Version: 6.3.5 > KDE Frameworks Version: 6.14.0 > Qt Version: 6.9.0 Gamescope, at the moment, doesn't seem to work well with NVIDIA, especially laptops. So it ain't a solution for a lot of people. My details: Operating System: Arch Linux KDE Plasma Version: 6.3.5 KDE Frameworks Version: 6.15.0 Qt Version: 6.9.1 Screen: Internal laptop: 2560x1440@165hz External screen: 1920x1080@60hz It doesn't matter on which screen the game is running, the game thinks it's always the internal screen, even though the external one is set to be primary. I can choose a internal display's resolution, I can even select the refresh rate, even though the external display is 60hz. While, it is nice to have a sharper picture, my laptop ain't that powerful to run every game at 1440p, but setting the resolution at 1080p, makes the whole window smaller. Unfortunately this is just how Xwayland scaling works, there is no perfect solution for X11 applications. There is a reason we went through so much trouble to move away from X11 where we can. For fullscreen mode, xrandr emulation (see bug 501505) will help, and together with https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2095 it should do the right thing out of the box. For windowed mode, an Xwayland instance per application might become a thing at some point in the far-ish future, but right now it's not really feasible. |