ValveSoftware / gamescope

SteamOS session compositing window manager
Other
2.82k stars 185 forks source link

Wayland backend breaks some fullscreen child windows, including embedded steam, in nested gamescope on Wayland desktops #1356

Open matte-schwartz opened 3 weeks ago

matte-schwartz commented 3 weeks ago

Your system information

Please describe your issue in as much detail as possible:

After embedded Chromium was updated in early February, trying to use the Steam client within nested gamescope on Plasma 6 breaks gamescope -f functionality only on Wayland. For instance, gamescope -e -f -- steam -gamepadui gives a UI that looks like this where the taskbar still bleeds through and the window is not properly fullscreened. the game windows that it spawns are not properly fullscreened either: image

what's interesting is that the loading screen beforehand is fullscreened correctly as seen here: image

The only solution to the issue I have found is to switch my DE from Wayland to X11 which makes the same command work properly: image or by downgrading to a Steam client from before February 2024. Both options are just bandaid solutions though.

Steps for reproducing this issue:

  1. Switch to Wayland desktop and use an up-to-date steam client
  2. Launch steam within gamescope gamescope -e -f -- steam -gamepadui
  3. If it works the first time, quit and try step 2 again. It should start to glitch by now.

This happens on both AMD and NVIDIA cards of mine, so I'm inclined to say it's a Steam issue rather than a driver issue.

Edit: throughout this whole process, using gamescope -f on things other than the Steam client does work properly the entire time fwiw

kisak-valve commented 3 weeks ago

Hello @matte-schwartz, this reads more like an issue between gamescope and kwin_wayland that should be evaluated by one of those projects before the Steam client, so I've transferred this issue report to the gamescope issue tracker. If they find a hint leaning towards a Steam client issue, then they can give me a ping requesting to transfer this issue back to the steam-for-linux issue tracker.

matte-schwartz commented 3 weeks ago

Thanks for the heads up @kisak-valve, wasn't sure where this belonged since I've only been able to change the problematic behavior by way of the Steam Client or desktop compositor instead of anything within Gamescope itself. I've tried back to gamescope 3.14.2 with no effect.

matte-schwartz commented 3 weeks ago

I've confirmed this also happens on Gnome/latest Mutter release

matte-schwartz commented 3 weeks ago

I've done more testing and it looks like it has the ability to affect Steam games launched with gamescope from the normal desktop mode on Wayland as well, but only around 50% of the time:

gamescope -f -H 1440 -W 3440 -r 144 --adaptive-sync --hdr-enabled --hide-cursor-delay 3000 -- %command% and trying to launch Ghost of Tsushima on Plasma 6 Wayland left me with the same issue:

image

closing the game, disabling the launcher, and trying the exact same command again without changing anything at all made it work: Screenshot_20240605_171737

EDIT:

okay this is important, I'm able to reliably get the game window to fail to fullscreen correctly if I launch Ghost of Tsushima with the launcher enabled and let that pop-up first. If that happens, the subsequent child window for the game itself within gamescope seems like it does not fullscreen properly.

sharkautarch commented 3 weeks ago

@matte-schwartz it looks like the latest commit joshua-ashton made to gamescope was one that fixed an issue w/ fractional scaling (https://github.com/ValveSoftware/gamescope/commit/09cb7b451d8825e597d15ab9d30e43aee8418670)

on your arch system, try installing the gamescope-git package from the AUR, and see if you still get the issue there

matte-schwartz commented 3 weeks ago

on your arch system, try installing the gamescope-git package from the AUR, and see if you still get the issue there

Sorry, should've clarified that all my testing (except past tagged releases which I install from the steamos package mirrors directly) is with self-compiled versions that I built off https://github.com/ValveSoftware/gamescope/commit/09cb7b451d8825e597d15ab9d30e43aee8418670

sharkautarch commented 3 weeks ago

Sorry, should've clarified that all my testing (except past tagged releases which I install from the steamos package mirrors directly) is with self-compiled versions that I built off 09cb7b4

cool Does it work if you try running gamescope w/ --backend=sdl

matte-schwartz commented 3 weeks ago

cool Does it work if you try running gamescope w/ --backend=sdl

yes, it does seem to work correctly with gamescope -e -f -H 1440 -W 3440 --backend sdl -- steam -steamdeck -gamepadui -steamos3 -steampal so perhaps it's limited to the wayland backend only