gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

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

Open matte-schwartz opened this issue 1 year ago • 8 comments

Your system information

  • Steam client version (build number or date): 1716584667

  • Distribution (e.g. Ubuntu): Fedora, Arch

  • Opted into Steam client beta?: Yes

  • Have you checked for system updates?: Yes

  • Steam Logs: steam-logs.tar.gz

  • GPU: AMD 7900XTX and Nvidia 4090 (separate rigs)

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

matte-schwartz avatar Jun 05 '24 19:06 matte-schwartz

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.

kisak-valve avatar Jun 05 '24 20:06 kisak-valve

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 avatar Jun 05 '24 20:06 matte-schwartz

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

matte-schwartz avatar Jun 05 '24 20:06 matte-schwartz

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.

matte-schwartz avatar Jun 06 '24 00:06 matte-schwartz

@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

sharkautarch avatar Jun 06 '24 12:06 sharkautarch

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

matte-schwartz avatar Jun 06 '24 16:06 matte-schwartz

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

sharkautarch avatar Jun 06 '24 17:06 sharkautarch

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

matte-schwartz avatar Jun 06 '24 17:06 matte-schwartz

I have compiled mine with gamescope-git aur package, but the issue seems to persist. Did I do something wrong or that I have to manually set to latest head?

Neubulae avatar Jul 21 '24 10:07 Neubulae

@Neubulae Not sure how the AUR package for gamescope-git works, but you should be able to double check with cd src/gamescope from the PKGBUILD base directory, and then making sure you fetch any updates with git pull and then git checkout origin/master, cd ../.. and then makepkg -efsi. i have not been able to repro the issue anymore on my end with a manual local compile + install.

I'm also testing this on Plasma 6.1.3 if that matters

matte-schwartz avatar Jul 21 '24 20:07 matte-schwartz

@Neubulae Not sure how the AUR package for gamescope-git works, but you should be able to double check with cd src/gamescope from the PKGBUILD base directory, and then making sure you fetch any updates with git pull and then git checkout origin/master, cd ../.. and then makepkg -efsi. i have not been able to repro the issue anymore on my end with a manual local compile + install.

I'm also testing this on Plasma 6.1.3 if that matters

I have seemingly mistaken this issue with https://github.com/ValveSoftware/gamescope/issues/1237 one, my bad.

Neubulae avatar Jul 22 '24 09:07 Neubulae

Can confirm that it fixes a case where Ubisoft's launcher starts first and game wouldn't be full screen in the end. Thank you @CakeKing64!

slagiewka avatar Jul 23 '24 07:07 slagiewka