fix: preserve Proton's S: gamedrive mapping when launching TeamSpeak - #39
Open
gitshipdone wants to merge 1 commit into
Open
fix: preserve Proton's S: gamedrive mapping when launching TeamSpeak#39gitshipdone wants to merge 1 commit into
gitshipdone wants to merge 1 commit into
Conversation
Proton builds with the gamedrive option enabled (e.g. current Proton Hotfix) resolve the game's Steam library from STEAM_COMPAT_INSTALL_PATH and STEAM_COMPAT_LIBRARY_PATHS during 'proton run'. The helper never exported them, so Proton's drive setup removed pfx/dosdevices/s: from the live prefix every time TeamSpeak was launched. A running Arma then fails multiplayer signature checks on any file it reopens through S: (random "not signed by a key accepted by this server" and "Wrong signature for file" kicks that only occur while TeamSpeak is open). Derive both variables from COMPAT_DATA_PATH, which always lives in the game's own Steam library. Export them only when the derived library actually contains "common/Arma 3" (after readlink -f canonicalization), so a noncanonical COMPAT_DATA_PATH can never point Proton at a wrong library; otherwise warn and preserve existing behavior. Values already exported by the user are respected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Launching TeamSpeak through
Arma3Helper.shdeletes theS:drive mapping from the Arma prefix on Proton builds that enable thegamedriveoption (current Proton Hotfix does by default).The script exports
STEAM_COMPAT_DATA_PATHbut notSTEAM_COMPAT_INSTALL_PATH/STEAM_COMPAT_LIBRARY_PATHS, and then invokes the fullproton runverb. Proton's gamedrive setup needs both variables to resolve the game's Steam library (seetry_get_game_library_dir()— proton, proton_11.0 branch, the check is at ~line 275 in the shipped Proton Hotfix script). When either is missing it returnsNoneandsetup_dir_drive()removespfx/dosdevices/s:from the live prefix.Symptom this causes
Arma keeps running on already-open file handles, but multiplayer signature verification (
verifySignatures = 2servers) re-opens PBOs on demand. Every file Arma loads throughS:then fails the check, producing kicks like:naming a different, provably-clean file each join — but only while TeamSpeak is running. This is extremely confusing to debug from the game side (files validate, keys match, network is clean). Forensics that pinned it: the prefix's
dosdevices/mtime matches the helper launch to the second, and across many kicks every flagged file wasS:-pathed whileZ:-pathed workshop mods never appeared once.Fix
Derive both variables from
COMPAT_DATA_PATH, which always lives in the same Steam library as the game:readlink -ffirst, and only exports when the derived<library>/common/Arma 3directory actually exists — a noncanonical/symlinkedCOMPAT_DATA_PATHcan never point Proton at a wrong library,Verified
Reproduced and fixed on Arch, Arma 3 2.20 + Proton Hotfix (Wine 11), TS3 + ACRE2 in the shared prefix: with the exports,
s:survives the TeamSpeak launch (watcheddosdevices/live), the ACRE game pipe still connects, and joins to averifySignatures=2server pass cleanly with TS connected.shellcheckclean (zero findings before and after),bash -npasses, both derivation branches exercised (default-library path and custom-library path derive correctly; bogus path falls through to the warning).