| Summary: | Support for xrandr emulation | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Ellie <el> |
| Component: | xwayland | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | CC: | coucouf, madness742, nate, postix, xaver.hugl |
| Priority: | NOR | ||
| Version First Reported In: | 6.2.4 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| URL: | https://gitlab.freedesktop.org/xorg/xserver/-/issues/1803 | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=502390 | ||
| Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/3a1745a2332f2f0e40fe61ccaa9d68973f57659b | Version Fixed/Implemented In: | 6.5.4 |
| Sentry Crash Report: | |||
|
Description
Ellie
2025-03-14 19:32:46 UTC
Thank you for the bug report! However Plasma 6.2.4 is no longer eligible for support or maintenance from KDE; supported versions are 5.27. (LTS), and 6.3 (non-LTS) or newer. Please upgrade to a supported version as soon as your distribution makes it available to you. Plasma is a fast-moving project, and bugs in one version are often fixed in the next one. If you need support for Plasma 6.2.4, please contact your distribution, who bears the responsibility of providing support for older releases that are no longer supported by KDE. If you can reproduce the issue after upgrading to a supported version, feel free to re-open this bug report. Heh, looks like I opened this just at the right time, to still notice it before the bot closed it. KWin doesn't have any restrictions for resolutions apps are allowed to use - and it couldn't even if we wanted to, the Wayland protocol has no way to enforce such a thing. What you're describing sounds like xrandr emulation not working properly. You can report that at https://gitlab.freedesktop.org/xorg/xserver/-/issues My apologies for the uninformed question, but how would I test if xrandr emulation works? And isn't wine currently switching over to Wayland? Some apps report display mode setting failures, so something along the chain seems to enforce a restriction. I don't know if there's a minimal test app to be honest, might be a good thing to bring up for Xwayland developers. I just tried with some games on Steam, but Proton has a "hack" for fullscreen things... thinking of that though, you could try using Proton to work around this too. About > And isn't wine currently switching over to Wayland? It has gained some support for Wayland, but it's not used by default, and probably won't be for a very long time. If you go and enable it, or use a pre-built Proton bundle with Wayland enabled by default like https://github.com/Melechtna/Proton-with-Wayland (which I use for HDR gaming) it *might* also fix the problem though. Thank you so much for all the responses. I did some investigations: 1. I confirmed with "Pizza Connection 2" that Proton handles this correctly and normal wine doesn't. 2. I confirmed via SDL2 that when using SDL2's x11 backend I get the same problem, suggesting this isn't a wine issue but as you suggested, perhaps an XWayland problem since with SDL2's wayland backend it's (more) correct. 3. However, this seems to be in so far also a minor potential Wayland and KWin issue, in that if I open a window at 640x480 with SDL2 via the Wayland backend, it seems to give me a window of the expected logical size. But it's stretched to the wrong aspect ratio. I don't think this is what is expected by 99% of applications out there, and it should be letterboxed instead. So it's less broken than through XWayland, but doesn't seem to do quite what's expected either. It seems like Xwayland devs think this is a KDE issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1803 My apologies if reopening is the wrong action. Also, under native Wayland the wrong aspect ratio seems to remain an issue. It turns out that there was a bug on the Xwayland side, but we're also missing handling for _XWAYLAND_RANDR_EMU_MONITOR_RECTS - we need to read the property and adjust the configure requests for the application window too. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8263 Git commit bc5a2002e9afb78b336e9ea2b7699015c578b2bc by Xaver Hugl. Committed on 27/11/2025 at 15:59. Pushed by zamundaaa into branch 'master'. x11window: support xrandr emulation If a fullscreen x11 client requests mode changes, - Xwayland will set _XWAYLAND_RANDR_EMU_MONITOR_RECTS on all windows of the client - we need to configure the window to match the emulated size - Xwayland will set up the viewport to present the window properly on the Wayland side M +1 -1 autotests/integration/CMakeLists.txt M +328 -3 autotests/integration/x11_window_test.cpp M +1 -0 src/atoms.cpp M +1 -0 src/atoms.h M +2 -0 src/events.cpp M +28 -4 src/x11window.cpp https://invent.kde.org/plasma/kwin/-/commit/bc5a2002e9afb78b336e9ea2b7699015c578b2bc Git commit 3a1745a2332f2f0e40fe61ccaa9d68973f57659b by Xaver Hugl. Committed on 27/11/2025 at 17:59. Pushed by zamundaaa into branch 'Plasma/6.5'. x11window: support xrandr emulation If a fullscreen x11 client requests mode changes, - Xwayland will set _XWAYLAND_RANDR_EMU_MONITOR_RECTS on all windows of the client - we need to configure the window to match the emulated size - Xwayland will set up the viewport to present the window properly on the Wayland side (cherry picked from commit bc5a2002e9afb78b336e9ea2b7699015c578b2bc) Co-authored-by: Xaver Hugl <xaver.hugl@kde.org> M +1 -1 autotests/integration/CMakeLists.txt M +328 -3 autotests/integration/x11_window_test.cpp M +1 -0 src/atoms.cpp M +1 -0 src/atoms.h M +2 -0 src/events.cpp M +28 -4 src/x11window.cpp https://invent.kde.org/plasma/kwin/-/commit/3a1745a2332f2f0e40fe61ccaa9d68973f57659b |