ValveSoftware / gamescope

SteamOS session compositing window manager
Other
2.88k stars 192 forks source link

Some Games freeze when launched within gamescope #1045

Open DuplicantWood opened 8 months ago

DuplicantWood commented 8 months ago

Hi when using gamescope with an AMD IGPU and Nvidia GPU some games like resident evil 4 remake, resident evil village, god of war and ratchet and clank all seem to freeze randomly. The image is frozen, mouse cursor doesn't move (in gamescope window) and no audio, this usually happens within the first minute and i have to alt + f4 out of the game.

Happens in both x11 and wayland and all the games run fine if i don't use gamescope

Here is an example of what i have in the steam launch options for resident evil 4 gamescope -f -H 3440 -W 1440 --prefer-vk-device 1002:164e -- prime-run %command%

the vk device is my amd igpu

Kernel: 6.6.3-arch1-1 DE: KDE Plasma 5.90.0 WM: KWin (Wayland)
CPU: AMD Ryzen 7 7800X3D GPU 1: AMD Raphael Mesa 23.2.1 GPU 2: NVIDIA GeForce RTX 4090 Driver version: 545.29.02

Tried both gamescope-3.13.8-1 and gamescope-git 3.12.0.beta8.r13.g1b9b736-1

Thanks

brain-anti-freeze commented 7 months ago

Can you try with an older (535) nvidia driver ? I find most games (including RE4 remake) freeze after a short while with 545 under Gamescope or Wayland (they are OK in an X11 session though).

AlexFolland commented 6 months ago

This is happening here as well with Magic The Gathering Arena using a GTX 1080 Ti and Nvidia driver version 545.29.06 on Manjaro running XFCE. I have the latest updates from the Manjaro unstable repository, including gamescope. The game starts and shows an image, but stops updating repeatedly. This happens in the first few seconds, making the game unplayable.

Older Nvidia drivers do not fare better.

NeilRuffell commented 6 months ago

Having the same issue.

OS: OpenSUSE Tumbleweed Kernel: 6.7.1-2-default (64-bit) DE: 5.27.10 WM: KWin (Wayland) CPU: AMD Ryzen 7 6800H dGPU : NVIDIA GeForce RTX 3070 TI Driver version: 545.29.06

I've noticed that any non-steam game I have in my library works as expected, and only seems to effect any Steam game I launch. So far I have tried Skyrim SE/Enderal SE, GTA V, and Jedi: Survior, all of which were working fine previously. The games will freeze after about 1-2 minutes after launching but appear to work fine up until that point.

Update: The issue has somehow resolved itself. Nothing has been updated or changed in any fashion. The only varibale changed is I am using my laptop's built-in display and not an external display. Will try on the TV again and report back.

DuplicantWood commented 6 months ago

I managed to find a workaround by adding -- env VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_wait to my gamescope command

e.g

gamescope -f -b -w 3440 -h 1440 -W 3440 -H 1440 -- env VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_wait %command%

AlexFolland commented 6 months ago

I tried the same workaround and it did not work, at least for the program I tried. I tried with RetroArch using the Vulkan driver. It still froze almost immediately.

Here was my command: gamescope --fullscreen -w 1920 -h 1200 -W 1920 -H 1200 --scaler integer --filter pixel -- env VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_wait MANGOHUD=0 retroarch %U

Schweppesale commented 1 month ago

Try disabling v-sync before you launch them with gamescope. I was experiencing a similar issue while testing out the beta drivers.