C0: add sn2-prelaunch wrapper to clear SN2 stale lockfiles
UE5 writes Saved/running.dat as a "session in progress" marker. If the previous session exited uncleanly (SIGKILL, crash), it lingers, and SN2 pops up an invisible 0×0 Error dialog at next launch that the GameThread blocks on forever — visible only as a black screen with a spinning loader. Wrap the Steam command to clear the marker files before each launch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
815a0cc6e6
commit
96dbbb3cbe
2 changed files with 23 additions and 0 deletions
|
|
@ -13,6 +13,23 @@
|
|||
# so disable xalia globally to avoid wedging iscriptevaluator.exe.
|
||||
environment.sessionVariables.PROTON_USE_XALIA = "0";
|
||||
|
||||
# Subnautica 2 pre-launch wrapper. SN2 (UE5) writes Saved/running.dat as a
|
||||
# "currently running" lockfile. If the prior session exited uncleanly (SIGKILL
|
||||
# via Steam's Stop button, crash, etc.), the file persists and on next launch
|
||||
# SN2 pops up an invisible (0x0-sized) Error dialog ("Your game might not have
|
||||
# exited correctly last time...") that the GameThread blocks on forever —
|
||||
# observable only as a black screen with a spinning loader. This wrapper
|
||||
# removes the stale lockfiles before exec'ing the actual game command.
|
||||
# Use as Steam launch option for Subnautica 2:
|
||||
# sn2-prelaunch %command%
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeShellScriptBin "sn2-prelaunch" ''
|
||||
saved="/mnt/games/SteamLibrary/steamapps/compatdata/1962700/pfx/drive_c/users/steamuser/AppData/Local/Subnautica2/Saved"
|
||||
rm -f "$saved/running.dat" "$saved/beforelobby.dat"
|
||||
exec "$@"
|
||||
'')
|
||||
];
|
||||
|
||||
# Gamescope — micro-compositor for game fullscreen/resolution management.
|
||||
# Use as Steam launch option: gamescope -W 2560 -H 1440 -f -- %command%
|
||||
programs.gamescope = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue