Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - r2modman cannot launch modded Valheim following the latest Steam update on Linux #1534

Open
Crushnaut opened this issue Nov 7, 2024 · 10 comments
Labels
bug Minor issue

Comments

@Crushnaut
Copy link

Describe the bug
Steam pushed out an update which added screen recording for all platforms. This update also included an update to the runtime environment for native games. By default steam now uses something called scout 1.0. Here are the relevant patch notes: https://store.steampowered.com/news/app/593110/view/4472730495692571024

"Native titles will execute in 'Steam for Linux runtime 1.0 (scout)' by default, instead of the legacy runtime environment."

This seems to have broken r2modman's ability to launch valheim in modded mod. The game can still be launched in vanilla mode.

To Reproduce
Steps to reproduce the behavior:

  1. Create a valheim modded profile on r2modman
  2. Try to launch valheim
  3. Steam will open and valheim will briefly show it is running and then immediately crash
  4. You should be able to launch valheim in vanilla mode via steam directly or via r2modman

Expected behavior
Valheim should launch with mods

Screenshots
NA

Additional context
I have a work around for this issue. You can add the launch parameter "-compat-force-slr off" to the r2modman steam launch parameters. I documented this solution in the discord (https://discord.com/channels/727304496522461185/1303809239898259476/1303909649153527870) and here: https://www.reddit.com/r/valheim/comments/1glggwy/workaround_modded_valheim_on_linux_with_r2modman/

A handful of people have verified that this work around works.

Confirmed an issue on Arch, Kubuntu, and Pop!

This launch parameter forces steam to use the legacy runtime environment from before the update.

Other have stated that they manually installed the mods and launched valheim via Steam in the new runtime environment and it works without issue.

This was an issue in r2modman 51 and 52.

I have also tried creating a fresh profile and updating mods to the latest which did not fix the issue. I also tried making a barebones profile with just a couple simple mods and this also did not launch.

When you launch Valheim in vanilla mode valheim also talks about not being about to load PlayFab and requiring some MS runtime files. Unsure if this is related.

@Crushnaut Crushnaut added the bug Minor issue label Nov 7, 2024
@archiebug
Copy link

archiebug commented Nov 8, 2024

I can confirm. I manually load BepInEx. Since the latest Steam update, Valheim no longer loads. When i Start team using "-compat-force-slr off", Valheim, with BepInEx loads fine. I'm also able to just start Valheim, with BepInEx, outside of Steam just using the sh script.

@oDD-1
Copy link

oDD-1 commented Dec 4, 2024

I have this problem on Arch (EndeavourOS), but the workaround does not work for me. Valheim quits on the title screen.

@cethien
Copy link

cethien commented Dec 9, 2024

workaround for now:
in steam properties for Valheim, select "Legacy runtime 1.0"

image

i have ValheimPlus with BepInEx and works fne

(i use NixOS btw)

@M15071060
Copy link

To add to this discussion, for what it's worth, I was able to get this functioning on my system (Debian Bookworm - 6.1.0-21-amd64 using r2modman) by solely modifying the start_game_bepinex.sh file.

I modified

# exec="$BASEDIR/valheim.x86_64"
 exec="/media/m15071060/ext4 partition/SteamLibrary/steamapps/common/Valheim/valheim.x86_64"

and

# Run the main executable
# Don't quote here since $exec may contain args passed by Steam
# if [ -n "$launch" ]; then
#     exec "$launch" $rest
# else
    echo "Executing standard version"
    exec "$exec"
# fi

Adjusted file: start_game_bepinex.txt

So it just executes the "correct" path. If I don't do this, the launch breaks because of a space in the filename /media/m15071060/ext4 partition/SteamLibrary/steamapps/common/Valheim/valheim.x86_64 with this error: scout-legacy: 5: exec: /media/m15071060/ext4: not found

I don't see where or why the path would break otherwise, but this allows me to launch modded without Steam open in any alternative modes, nor selecting a specific runtime. It does fail to launch from Steam because of the launch options, however, so that's a definite caveat.

@Coltrain47
Copy link

I'm having the same problem on Steam Deck. The "-compat-force-slr off" workaround only sort of works for me. I can get the game to start modded, but the quality is terrible no matter what settings I use (and I only have a couple light mods that shouldn't affect frame rate).

Not to mention, having to completely shut down Steam every time I want to play Valheim on a Steam Deck is quite the hassle. I also don't have the ability to force the use of the legacy runtime in the game's properties like cethien has done.

@archiebug
Copy link

A fix in the steam client might have fixed this issue: ValveSoftware/steam-for-linux#11448
However, running the latest beta and not messing with compatibility still doesn't let the game start with calling the .sh file within the Steam client.

I also have "Legacy runtime 1.0" available in the drop down in the Compatibility settings. That seems to have fixed things. I believe the correct thing to do is to get the startup script fixed that @M15071060 mentions. Valheim runs fine without using bepinex.

@eliadevito
Copy link

This is caused by a change in the way steam launch game that broke start_game_bepinex.sh.

Adding this lines between line 25-27 of your start_game_bepinex.sh should solve the problem:

# Special case: program is launched via Steam through steam-launch-wrapper
# In that case rerun the script via their bootstrapper to ensure game start correctly
if [[ $1 == *"steam-launch-wrapper"* ]]; then
  	cmd="$1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} $0"
	shift 11
	exec $cmd $@
	exit
fi

On steam inside game properties, you have to set the launch option as follows (set r2modmanPlus-local path and PROFILE_NAME properly):
~/.config/r2modmanPlus-local/Valheim/linux_wrapper.sh --r2profile "PROFILE_NAME" %command%

@Crushnaut
Copy link
Author

@ebkr could this fix be integrated into r2modman? or is this a problem with Bepinex? if the later, how can we pass this along to them?

@HarlemSquirrel
Copy link

Looks like this is a problem with bepinex. See BepInEx/BepInEx#1032

@Kovakin
Copy link

Kovakin commented Mar 7, 2025

With the fix provided by M15071060, I am able to get Valheim to open to the loading screen but I get a near immediate crash with the terminal reporting as follows:

ERROR: ld.so: object 'libdoorstop_x64.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

I am running CachyOS on Kernel Linux 6.13.5-arch1-1 with DE KDE Plasma 6.3.2 on Wayland
CPU: AMD Ryzen 5 3600X
GPU: AMD Radeon RX 6700 XT
Valheim is loaded onto a secondary drive from the main, located at /run/media/kova/Main HDD/

I attempted to also implement the fix this using the solution provided here by eliadevito and on the BepInEx/BepInEx#1032 issue, but both solutions have failed with the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Minor issue
Projects
None yet
Development

No branches or pull requests

9 participants