Page MenuHomeSolus

Dota 2 fails to launch on Solus
Closed, ResolvedPublic

Description

Even when Steam Native runtime is disabled in LSI, LD_PRELOAD preload for all steam processes contains /usr/$LIB/libxcb.so.1:/usr/$LIB/libX11.so.6:/usr/$LIB/libstdc++.so.6.
I think when native runtime is disabled, this shouldn't be appended, so the configuration is as close to vanilla as possible, and no problems are introduced. That way until all problems with LSI get fixed, people can disable native runtime and all will work. Right now things are both broken with or without native runtime.
To execute this change, I think all is needed is to change this part, so lsi_config is only not-empty when Native Runtime is selected.

Even after removing LD_PRELOAD from Native Runtime OFF the issue persists, as Horb reports. Here is the issue on Steam's Bugracker.

Event Timeline

joebonrichie triaged this task as Needs More Info priority.May 18 2022, 6:10 PM
joebonrichie added a subscriber: joebonrichie.

I think this is intentional. https://github.com/getsolus/linux-steam-integration/blob/master/src/intercept/main.c#L124. If you remove that from vendor_blacklist and recompile does that fix the overlay?

I raised the original issue linked in OP. I don't know much C but I will hack on. If anyone could tell me how to do what is suggested above I would be very grateful. My first port of call will be to see if I can get eopkg to download the sources and compile for me.

@joebonrichie I tested both removing them from vendor_blacklist and meson_options.txt, didn't cause any problems. But also didn't fix the overlay, which is weird
But that is not what I mean. I don't want to change anything when Native Runtime is enabled. So I don't want to touch those global settings.
I just want to disable adding of LD_PRELOAD when Native Runtime is disabled.
I think this should only happen when the Native Runtime is enabled.

Yup, this fixed it! Now everything just works with native runtime disabled, overlay loads just fine, no problems with Mesa.
https://github.com/JacekJagosz/linux-steam-integration/commit/f80c5743702f2de8ff9f59c9e8866b98aec4f0ec

Agreed. I worked it out I think (cloned lsi, meson build, meson install etc.) and tried toggling the options above and the issues are reproduced.

@Jacek I just checked out your branch ran

meson build
cd build/; meson install; cd -;
/usr/local/bin/steam

But I still get the segfault with Dota 2 reported in the original ticket on GitHub. Are you referring to a different fix here? Am I doing something wrong?

Oh, it still didn't fix your issue? The patch I made removed the LD_PRELOAD, it did fix another issue with overlay, hoped it would fix yours too.
Maybe try to install the .eopkg I created? And turn off Native Runtime in LSI settings. After you finish testing you can do sudo eopkg it linux-steam-integration --reinstall to go back to system version.

I had to run it with sudo eopkg it ~/Downloads/linux-steam-integration-0.7.3-41-1-x86_64.eopkg --ignore-dependency because I was getting System error. Program terminated. External dependencies not satisfied: glib2 release >= 81 without.

Still getting the segfault;

/home/adam/.local/share/Steam/steamapps/common/dota 2 beta/game/dota.sh: line 109:  9748 Segmentation fault      (core dumped) ${STEAM_RUNTIME_PREFIX} ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"

I'm not sure how to confirm the value of LD_PRELOAD while testing.

You can verify LD_PRELOAD by opening htop, finding your game (which crashes, so you can check steam instead for example), and press 'e'. It will show all environment variables for this app. But I have checked for my PC, and with this patch it is not creating an LD_PRELOAD. So maybe your Dota 2 issue has a different source?
If it is still crashing even without /usr/$LIB/libstdc++.so.6 in LD_PRELOAD, maybe you can report that back on Steam bugtracker, and you can look for a different cause? Because this seems not to be it?

Yes. I expect there's a few issues going on for me here. I'll reproduce once I've confirmed the LD_PRELOAD value with your branch and report back to the Dota 2 issue tracker.

Jacek renamed this task from libstdc++ gets added to LD_PRELOAD even if Steam Native Runtime is disabled to Dota 2 fails to launch on Solus.May 23 2022, 10:30 AM
Jacek updated the task description. (Show Details)
Jacek added a project: Steam Compatibility.