Bug 485398

Summary: Gamescope scaled incorrectly if Fractional Scaling is less than 100%
Product: [Plasma] kwin Reporter: ryu.ketsueki
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: kde, nate, ryu.ketsueki, vlad.zahorodnii, xaver.hugl
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description ryu.ketsueki 2024-04-11 18:57:12 UTC
Right off the bat, this is similar to 477676. The effect on applications running through Gamescope are virtually the same.

The way I tested it was through Bottles and Lutris. I haven't tested other means yet but as far as I know, the microcompositor is scaled improperly, even when fullscreen or maximized, sticking to only the corner of the screen.

Now, both are on Flatpak, and I made sure that all flatpaks are up to date and with no weird permissions before posting here and there are no distro-specific anomalies. With Chromium, it was believed to be a chromium side bug. But with Gamescope, that brings the question again. Could it be the way KWin scales down applications?
Comment 1 ryu.ketsueki 2024-04-13 22:01:20 UTC
Here is a video showing the bug:
https://youtu.be/nd4Ruvn6niY

First, I launch the game without Gamescope at all and it is properly scaled. Next, I enable Gamescope on Bottles and the game that, should have been running fullscreen, was only at a corner of the screen. The corner it snaps to depends on the closest one when maximized or going to fullscreen.

In addition to that, the microcompositor scales further down as you unfocus, then focus it back. Having observed this on Chromium-based applications, it was thought to be an issue on Chromium side of things but now as the same effect can be observed even with Gamescope, I think it could be a way KWin scales it.

I use 70% scaling because the max resolution of this laptop is 1366x768, which is too small for the size of the windows. They appear too big and too cumbersome to use.
Comment 2 Zamundaaa 2024-04-15 16:13:10 UTC
Gamescope (from my last git master pull at least) has some wonky fractional scaling behavior with resizes in fullscreen on focus in/out - with scales bigger than 100% - as well, so I think this is a gamescope bug. Please report it at https://github.com/ValveSoftware/gamescope/issues if you can still reproduce it on the latest gamescope commit