Repository navigation
macOS Apple Silicon: Valheim starts but BepInEx does not load when Doorstop injection is lost through Rosetta launch #21
Description
Summary
On Apple Silicon macOS, BepInExPack_Valheim can launch Valheim successfully while BepInEx/Doorstop is never injected. The game reaches the menu and can join a server, but no BepInEx/LogOutput.log is created and no plugins load.
This appears to happen because the macOS start script needs to run Valheim's x86_64 slice through Rosetta, but the DYLD_INSERT_LIBRARIES environment used by Doorstop is not present at the final Valheim process when the architecture switch happens.
I found the related draft PR #20 for broader Valheim Apple Silicon support. This issue is narrower: a current-user failure mode in the packaged Valheim start script and a small workaround that restores Doorstop injection.
Environment
- Game: Valheim
0.221.12(network version36) - BepInEx distribution:
BepInExPack_Valheim 5.4.2333from Thunderstore - OS: macOS
26.3.1(25D2128) - Hardware: Apple M4,
arm64 - Install path: external Steam library under
/Volumes/FitKid/SteamLibrary/steamapps/common/Valheim - Launch method: Steam launch options running
start_game_bepinex.sh
Reproduction
- Install Valheim from Steam on Apple Silicon macOS.
- Install
BepInExPack_Valheim 5.4.2333. - Configure Steam launch options to run
start_game_bepinex.sh. - Launch Valheim from Steam.
Expected behavior
BepInEx preloader and chainloader start, BepInEx/LogOutput.log is created, and plugins under BepInEx/plugins are loaded.
Actual behavior
Valheim starts normally, but BepInEx does not load:
BepInEx/LogOutput.logis not created.- No plugin load messages appear.
- Valheim's player log shows the game running as unmodded, for example:
isModded: False
The game itself continues to run, so the failure is easy to miss unless the BepInEx log is checked.
Local diagnosis
The packaged macOS start script switches to Rosetta/x86_64 for Valheim. In the failing case, Valheim launches, but Doorstop is not injected.
When I set DYLD_LIBRARY_PATH and DYLD_INSERT_LIBRARIES inside an x86_64 shell immediately before exec-ing the Valheim executable, BepInEx loads correctly.
Successful log after the workaround:
[Message: BepInEx] BepInEx 5.4.23.3 - Valheim
[Message: BepInEx] User is running BepInExPack Valheim version 5.4.2333 from Thunderstore
[Message: BepInEx] Chainloader started
[Info : BepInEx] 11 plugins to load
[Info : BepInEx] Loading [Craft From Containers 3.8.2]
[Info : BepInEx] Loading [BalrondShipyard 1.6.5]
[Info : BepInEx] Loading [NoTreeStump 1.0.3]
[Info : BepInEx] Loading [Jotunn 2.29.0]
[Info : BepInEx] Loading [Better Wisps 1.0.42]
[Info : BepInEx] Loading [ShaderHelperForMac 2.0.0]
[Info : BepInEx] Loading [Skills Preview 0.4.2]
[Info : BepInEx] Loading [Quick Stack - Store - Sort - Trash - Restock 1.4.13]
[Info : BepInEx] Loading [Sailing 1.1.8]
[Info : BepInEx] Loading [Display Day & Time in HUD 1.1.2]
[Info : BepInEx] Loading [RecyclePlus 1.3.0]
[Message: BepInEx] Chainloader startup complete
Workaround
For the current Valheim start script, this works locally:
- Enter an x86_64 shell with
arch -x86_64 /bin/sh -c. - Set
DYLD_LIBRARY_PATHandDYLD_INSERT_LIBRARIESinside that shell. execthe Valheim executable from there.
I am opening a small PR with that workaround scoped to the Valheim start script. It is not intended to replace the broader native Apple Silicon work in #20.
Activity
AzumattDev commentedon Oct 28, 2026
5.4.2360 should fix this. The start script now uses UnityDoorstop 4.6.0's macOS launch code, which passes the DYLD vars through
archdirectly (NeighTools/UnityDoorstop#118, the upstream version of #22). It also runs natively on Apple Silicon by default now (BepInEx/BepInEx#1402). Could you try it on your M4, both the default and witharchpreference="x86_64"instart_game_bepinex.sh, and let me know ifLogOutput.logshows up?No898 commentedon Oct 28, 2026