ValveSoftware / steam-runtime

A runtime environment for Steam applications
Other
1.17k stars 86 forks source link

Victoria 3 launcher fails to start #676

Closed nikolabr closed 2 weeks ago

nikolabr commented 3 weeks ago

Your system information

Please describe your issue in as much detail as possible:

Victoria 3 launcher fails to start with the default compatibility settings. Going by strace logs, it loads libnss3.so from scout:

1006<Launcher> openat(AT_FDCWD, "/home/hakkou/.local/share/Steam/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libnss3.so", O_RDONLY|O_CLOEXEC) = 6

That version of libnss turns out to be too old for the launcher and it exists with status 1:

1006<Launcher> writev(2, [{iov_base="/home/hakkou/.paradoxlauncher/la"..., iov_len=57}, {iov_base=": ", iov_len=2}, {iov_base="/home/hakkou/.local/share/Steam/"..., iov_len=93}, {iov_base=": ", iov_len=2}, {iov_base="version 'NSS_3.30' not found (re"..., iov_len=100}, {iov_base="\n", iov_len=1}], 6) = 255

1006<Launcher> +++ exited with 1 +++

Accoring to readelf -a steam-runtime/usr/lib/x86_64-linux-gnu/libnss3.so, the version of libnss provided by scout is NS_3.22. This is likely not an issue on most distros, because a newer version would likely be provided by the OS, but the Steam package for Guix (nonguix channel) runs in a container which emulates FHS and does not supply libnss3.

However, if I go into Properties -> Compatibility for Victoria 3 and force the use of Steam Linux Runtime 1.0, the launcher works fine, but it seems to be running under the soldier runtime, unlike the name implies. Logs: https://gist.github.com/nikolabr/1e2c60191e22cd2a769096aaef685127

Steps for reproducing this issue:

  1. Install steam on OS which does not provide libnss3.30 or newer globally
  2. Start Victoria 3 with default compatibility settings
smcv commented 3 weeks ago

Victoria 3 launcher fails to start with the default compatibility settings. Going by strace logs, it loads libnss3.so from scout: ... That version of libnss turns out to be too old for the launcher and it exists with status 1

Any time a game has a library dependency that is not satisfied by scout, that's a game issue. Most likely, the game developer/porter compiled the game (or in this case the launcher) in an environment that is newer than the official scout SDK, and has never tested launching it on anything older or more minimal than their build environment.

We encourage game developers/porters to avoid this category of portability issue by compiling legacy games in the official scout SDK (this is the same thing that Valve does for e.g. the Portal series), but unfortunately it's quite common for game developers/porters to compile their games on some arbitrary distro/version (usually Ubuntu), and then only test on that version.

For new or actively-maintained games, another option that game developers/porters can use is to compile a new branch of their game in the Steam Runtime 3.0 'sniper' SDK, and then ask Valve (via a request in this issue tracker or privately) to adjust their game's metadata so that it will run under the Steam Linux Runtime 3.0 (sniper) container. When the developer is happy that everything is working well, they can coordinate with Valve again to get the version that targets sniper into the default branch and update the metadata again, so that the default branch runs under sniper. The intention is that this should become "self-service" for the developer at some point, but as far as I know, that feature isn't ready yet, so someone in Valve currently needs to adjust the metadata manually. Games that have successfully gone through this process include Valve's CS2, Dota 2 and TF2, and third-party games like Battle for Wesnoth, Endless Sky and Retroarch.

smcv commented 3 weeks ago

if I go into Properties -> Compatibility for Victoria 3 and force the use of Steam Linux Runtime 1.0

That is the workaround that I would recommend. This matches how the same game runs on Steam Deck by default.

the launcher works fine, but it seems to be running under the soldier runtime

I know it seems strange, but that is actually working as designed. The compatibility tool that is labelled "Steam Linux Runtime 1.0 (scout)" consists of a Steam Runtime 2 (soldier) container, with the legacy Steam Runtime 1 (scout) overlaid onto it via LD_LIBRARY_PATH. This was done because of games like Victoria 3, which make assumptions that aren't always valid.

Originally, SLR 1.0 (scout) was a "pure" Steam Runtime 1 'scout' environment, but we found that many games didn't actually work like that. Victoria 3 would be a good example: it assumes that libnss is a newer version than the one scout actually provides, so in a strict Steam Runtime 1 container, it would have failed to start for essentially the same reason that it fails on Guix. As a result, we changed SLR 1.0 to be less strict but more pragmatic.

nikolabr commented 2 weeks ago

Thank you for the feedback. The workaround is simple enough. Feel free to close the issue.

smcv commented 2 weeks ago

Please consider reporting this to the game's developer if you haven't already: they might find the information on this issue useful for better cross-distribution support of this or future games, even if they have no intention of supporting Guix specifically.