wheaney / decky-XRGaming

Decky plugin to support installing and configuring Breezy Desktop on-the-fly
https://github.com/wheaney/breezy-desktop
GNU General Public License v3.0
99 stars 1 forks source link

Game crashes randomly if XRGaming is installed #30

Open Kup86 opened 2 weeks ago

Kup86 commented 2 weeks ago

Hi,

Its me again but this time I bought Viture Pro glasses! I was partially motivated to make the upgrade from the old TCLs so that I can use your excellent app!

I did run into some problems though. When I was playing Alan Wake (og release) on the Steam Deck with the app enabled, the game would randomly crash (freeze frame). I would still be able to use the Steam options like bringing up the game scope menus letting me quit the game. However after I do this, I can no longer start a game unless I completely reboot - It just gets stuck in starting game with the Steam logo 'spinning'.

When it comes to Alan Wake, the game can crash at any time, from 1 minute to 30+ minutes of gameplay. However if I try to start Portal 2 with the app installed and using the glasses, it will consistently crash on the loading screen getting into the game (freeze screen/frame). Steam menus still work though same as before.

The freeze issue does NOT appear if 1) I am not using the glasses but XRGaming app is installed 2) I am using the glasses but XRGaming app in uninstalled/removed - As is, no app.

The issue still manifests even if the app is set to 'disabled'. Only resolves if uninstalled.

I haven't been able to test more games thoroughly but at least Alan Wake and Portal 2 are consistent. Other games do load normally and work but since I have not play them extensively, I do not know if they would manifest the same random freeze as Alan Wake.

Versions of Steam OS and Decky that I am using are both Stable and latest.

Cheers and once again, great app!

wheaney commented 2 weeks ago

Hi, this is the first I've heard of this issue so hopefully it's not something caused by more recent Steam OS versions.

A few follow-up requests:

  1. Let me know the exact SteamOS version/build number you're on, as well as Decky loader and XR Gaming plugin versions.
  2. Please attach a copy of your XR driver log in /home/deck/.local/state/xr_driver/driver.log. Actually before that, first run xr_driver_cli --debug ipc,threads,device, then trigger the crash another time or two, then attach the latest log.
  3. Let me know whether you're in Vulkan-only mode or not. If you are, you'd see a message at the top of the plugin sidebar letting you know, so if you don't see any such message, then you're using the latest gamescope integration.
  4. Are you seeing the virtual display/pinning effect work for the brief period of time that the games run prior to crashing?

Thanks!

Kup86 commented 2 weeks ago

Hi wheaney,

Thank you very much for replying so soon. I have tried to answer your questions below:

  1. SteamOS 3.6.20 Build: 20241030.1

  2. I get a 'command not found' when running the xr_driver_cli command. However I triggered 2 crashes before uploading the log file using Portal 2. driver.log

  3. No Vulkan message

  4. Before it crashes, the display pinning (or any other function) works fine. In Alan Wake it successfully runs no problem until it crashes.

As mentioned, Portal 2 is easy to replicate as it consistently crashes 5-10 seconds after starting the game - Before that pinning works.

Please let me know if you need more info.

wheaney commented 2 weeks ago

Thanks for the info. Try /home/deck/.local/bin/xr_driver_cli --debug ipc,threads,device, then reproduce the crash and upload the log again.

wheaney commented 2 weeks ago

Can you confirm that the display pinning effect is working fine in SteamOS prior to launching the game?

Kup86 commented 2 weeks ago

Yes I can confirm the pinning effect works and is stable prior to going in game. Any mode works fine. Note that the game crashes no matter the configuration the app is at (as as follow, or VR lite, crashes even if set to disabled but only in game).

wheaney commented 2 weeks ago

Thanks, also see my request just above that about xr_driver_cli.

Kup86 commented 2 weeks ago

I was able to run the command and then triggered the crash. Here are fresh logs: driver.log

I also noticed that after it crashes and force an exit back to SteamOS, the pinning effect is gone. However the app still detects the glasses with no errors but non of the pinning effects can be re-enabled until I restart the system

wheaney commented 2 weeks ago

It looks like the debug flags got cleared right before you triggered the crash. Try setting everything up, then making the CLI call, then triggering the crash without touching the plugin settings.

Kup86 commented 2 weeks ago

Fresh logs as instructed The file ended up too big so had to upload and share a link:

https://drive.google.com/file/d/1XROw9FtFL28QQLBkAoBanUU8KpkNm5nc/view?usp=sharing

wheaney commented 2 weeks ago

I'll need to look closer into this, based on the logs at the very least I need to improve how it retries failed wayland calls as it's really spamming gamescope and that's probably part of the cause of the behavior you're seeing. In the meantime, if you disable the gamescope integration in your advanced settings, that'll take you back to vulkan-only mode and should prevent these problems. Just keep in mind that the visual effects will only apply in-game when you're in vulkan-only mode.

Kup86 commented 2 weeks ago

I'll set it to Vulkan only mode. Thank you for looking into it :)

Please let me know if you need anything more along the way.

Kup86 commented 2 weeks ago

After using the steam deck with the app/glasses for some time with Gamescope integration disabled, I can confirm that it is much more stable - After playing for about half hour no crashes and Portal 2 now loads no problem.

Interestingly enough, I tried Control which is a DX12 game and that works great with the app all modes, even with the gamescope intergation disabled.