From 96dbbb3cbe7d8a9f695c3bc0bf7006367d1181a4 Mon Sep 17 00:00:00 2001 From: Erich Blume <725328+eblume@users.noreply.github.com> Date: Fri, 15 May 2026 12:11:54 -0700 Subject: [PATCH] C0: add sn2-prelaunch wrapper to clear SN2 stale lockfiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../+ringtail-sn2-prelaunch.infra.md | 6 ++++++ nixos/ringtail/gaming.nix | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 docs/changelog.d/+ringtail-sn2-prelaunch.infra.md diff --git a/docs/changelog.d/+ringtail-sn2-prelaunch.infra.md b/docs/changelog.d/+ringtail-sn2-prelaunch.infra.md new file mode 100644 index 0000000..f9c68e2 --- /dev/null +++ b/docs/changelog.d/+ringtail-sn2-prelaunch.infra.md @@ -0,0 +1,6 @@ +Add `sn2-prelaunch` Steam launch wrapper on ringtail that removes +Subnautica 2's stale `Saved/running.dat` and `Saved/beforelobby.dat` +lockfiles before each launch. SN2 pops up an invisible (0×0-sized) +Error dialog when it detects an unclean exit, blocking GameThread +forever; this is observable only as a black screen with a spinning +loader. Use via Steam launch option: `sn2-prelaunch %command%`. diff --git a/nixos/ringtail/gaming.nix b/nixos/ringtail/gaming.nix index c526857..7c00378 100644 --- a/nixos/ringtail/gaming.nix +++ b/nixos/ringtail/gaming.nix @@ -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 = {