Page MenuHomeSolus

Maybe Steam Native Runtime should be disabled by default in LSI?
Open, HighPublic

Description

Suggested by Valve developer.
5 years ago LSI was created to fix some games using very old libraries, Steam games breaking with never Mesa and glibc versions, controllers not being detected.
It seems the original purpose of LSI is already done by Steam Runtime. It will already prefer system libraries if they are newer than those included in Steam Runtime, unless they are on a blacklist. It seems like it is a reasonable default, especially as with Steam or games updates some things get broken with our Native Runtime until we add a library to whitelist or blacklist, or fix an issue with one of our libraries.
So it used to be that games wouldn't run at all without LSI, after some system updates, now that is not the case. Also it used to be that game compatibility was higher with LSI, now LSI breaks game compatibility with newer solutions more often than fixes.
So I propose that LSI should be set to native runtime disabled by default. Because it still can be an useful tool, maybe providing some performance gains or it might fix some incompatibility in the future. Also I think it might fix a very old game that has some static libraries instead of using those in Steam Runtime. But otherwise it unfortunately hampers compatibility more than fixes.

For reference what Simon McVittie said.

I'm sure you know this already, but if this is the same as Arch's "native runtime" (disabling the LD_LIBRARY_PATH runtime and using host libraries exclusively), then this is unsupportable. Steam will continue to make changes and additions to its LD_LIBRARY_PATH runtime as they become necessary, and if OS distributors' "native runtimes" don't keep up with that, then Steam and games will not work.

If it brings you some sort of benefit, I would prefer it if we can find a way to get that benefit without it. The traditional LD_LIBRARY_PATH runtime already prefers to use host libraries in almost all cases, unless the library in the runtime is strictly newer (typically meaning libraries that we actively backport, like SDL and Vulkan-Loader) in which case using the newer version is required. The exceptions at the moment are libcurl, because of some historical ABI divergence that we're stuck with now, and a couple of 32-bit D-Bus-related libraries.

Using a "native runtime" will have little or no effect on the container runtime, which works differently anyway.

Event Timeline

I'm glad to see that Valve are taking this seriously, but I don't think we are quite there yet. Look at how much of a difference in performance there is just for the client with native on and off. It's night and day. I'd love to finally be in a position where it isn't necessary anymore, but I still have quite a few older games that simply will not run without it. And in the 5 years that we've had it, I've only needed to disable it for one game in a library of over 250 titles.

Also I think it might fix a very old game that has some static libraries instead of using those in Steam Runtime.

It can't do that. LSI only impacts binaries using dynamic libraries. Static binaries can't just have their symbol tables overridden with dynamic ones. ELF doesn't work that way.

But otherwise it unfortunately hampers compatibility more than fixes.

I don't think we have enough data to really make a conclusion like this right now. There are certainly times when something major changes with the runtime and things break, especially with Steam Beta channel updates and Proton Experimental builds. But those aren't really the target of LSI (though we do try to resolve those issues in a timely manner).

All I can conclusively say at this point is that Nvidia users seem to have significantly more issues with LSI than everyone else. And all I can point at there is Nvidia proprietary vs Mesa. It may very well be that Nvidia is slightly allergic to LSI and I'm not sure what the best approach is to solving that.

I think the main problem is that there are 2 blacklists now. One done by Valve, where they learn about problems first, and then one in LSI, where we only learn it when someone runs into an issue.
So I think all we could do is find where that blacklist is in https://gitlab.steamos.cloud/steamrt/steam-runtime-tools and monitor it. Then it would be much easier to troubleshoot and understand what Valve is trying to do. And then LSI can live on.
I think the blacklist here, separate depending on which runtime a game is using (scout, soldier or in the future sniper): https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/master/tests/pressure-vessel/inside-runtime.py#L691 and https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/master/tests/pressure-vessel/containers.py#L937

@DataDrake Then probably this can be closed now, if you think LSI should keep going how it is, and this topic can be reassessed if anything changes in the future?

ermo edited subscribers, added: ermo; removed: DataDrake.

Seeing as this is something Ikey wants to look at, re-assigning to him.

ermo triaged this task as High priority.May 4 2023, 5:15 PM