Bug 4460

Summary: steam fails to load, "Failed to load streamui.so", but does not look like mere library problem
Product: Fedora Reporter: mpope <mpope>
Component: steamAssignee: Simone Caronni <negativo17>
Status: RESOLVED EXPIRED    
Severity: normal    
Priority: P1    
Version: 24   
Hardware: x86_64   
OS: GNU/Linux   
namespace:

Description mpope 2017-02-18 09:30:23 CET
Starting steam produces the above message.  I am using the following script, and the ldd line is not showing any missing libraries.

#! /bin/sh
ST=$HOME/.local/share/Steam
export LD_LIBRARY_PATH=$ST/ubuntu12_32:$ST/linux32
#export LD_PRELOAD='/usr/$LIB/libgcc_s.so.1'
#  ... /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so'
#export STEAM_RUNTIME=1
#export STEAM_RUNTIME_PREFER_HOST_LIBRARIES=1
ldd $ST/ubuntu12_32/*.so
strace -f /usr/bin/steam ${1+"$@"} > /tmp/steam.log 2>&1

Googling around suggested the tricks with the commented environment variables, but nothing seems to help.  I have tried all combinations of the STEAM_RUNTIME* variables (0,1,unset), running -reset, and a dnf-remove-install cycle with the steam package (steam-1.0.0.54-4.fc24.i686).

Strace (log attached) shows the steam process closing after logging that it is shutting down.  Looking back from there shows it doing a bunch of DRM ioctls which I do not understand.

Fedora 24 (fully updated) / Radeon (r600) / LXDE
Comment 1 mpope 2017-02-18 10:17:31 CET
Ugh, strace log was over the 1M limit.  Please advise if it is wanted, I can share via google drive.
Comment 2 Simone Caronni 2017-02-21 09:28:19 CET
Hello, can you just run Steam the normal way without all these settings? Why are you using that script?

Running Steam without the Runtime (STEAM_RUNTIME=0) is no longer supported and fails on many libraries.

These are the default settings:

$ cat /etc/profile.d/steam.sh 
# Improved interactions between the Steam runtime and host distribution
# libraries, which should let Steam work out of the box with open-source
# graphics drivers on modern distributions. If using an older distribution or
# running into problems, set variable at 0 to revert to the previous behavior.
# STEAM_RUNTIME_PREFER_HOST_LIBRARIES=0

# Unify close-to-tray behavior with other platforms. If using a distribution
# that doesn't have proper compatible tray support set variable at 0.
STEAM_FRAME_FORCE_CLOSE=1

Everything else is redundant. STEAM_RUNTIME_PREFER_HOST_LIBRARIES and STEAM_RUNTIME are already at 1.
Comment 3 mpope 2017-02-21 10:13:34 CET
> Hello, can you just run Steam the normal way without all these settings?

Certainly.  Just tried it again, same error.  Now on Fedora 25 though.

> Why are you using that script?

When I first ran /usr/bin/steam there were a bunch of unresolved libraries.  I had to set LD_LIBRARY_PATH to get as far as I did.  It was then a convenient place to put ldd and experiment with other env variables.
Comment 4 mpope 2017-02-21 14:17:33 CET
Just did a complete reinstall of steam.
(dnf remove steam ; rm -rf ~/.local/share/Steam ; dnf install steam ; /usr/bin/steam)

Now the immediate problems are selinux denials.  I am used to these:-), and they can be fixed with:

cd ~<user>/.local/share/Steam/ubuntu12_32
chcon -t textrel_shlib_t libavutil.so.54 libswscale.so.3 libavresample.so.2 \ libavcodec.so.56 libavformat.so.56 libvideo.so steamui.so

Then I get a grey box with:

Could not load module 'vgui2_s.so'.

For more information visit https://support.steampowered.com/kb_article.php?ref=9205-OZVN-0660.

The URL just suggests looking for unresolved libraries, and sure enough, ldd shows the vgui2_s.so needs libtier0_s.so and libvstdlib_s.so, both of which are in ubuntu12_32 but "dnf provides" does not know about either.  I tried the script again as it sets LD_LIBRARY_PATH so that the missing libraries should be found, however I still get the grey box.
Comment 5 Simone Caronni 2017-02-21 15:48:41 CET
Sorry, but I'm still not getting anything of this.

(In reply to mpope from comment #4)
> Just did a complete reinstall of steam.
> (dnf remove steam ; rm -rf ~/.local/share/Steam ; dnf install steam ;
> /usr/bin/steam)

This actually does not clean variables. Let's say there was a custom variable (STEAM_RUNTIME=0) in /etc/profile.d/steam.sh, this would not be cleared. Also edited config files will not be overwritten.

rm -f /etc/profile.d/steam.*
dnf reinstall steam

Now that you have reinstalled the package maybe you can just logout/login to make sure variables are as per default.

> Now the immediate problems are selinux denials.  I am used to these:-), and
> they can be fixed with:
> 
> cd ~<user>/.local/share/Steam/ubuntu12_32
> chcon -t textrel_shlib_t libavutil.so.54 libswscale.so.3 libavresample.so.2
> \ libavcodec.so.56 libavformat.so.56 libvideo.so steamui.so

There should be no need for this. My files have user_home_t and I don't get any SELinux denial. Did you change any SELinux boolean?
 
> Then I get a grey box with:
> 
> Could not load module 'vgui2_s.so'.
> 
> For more information visit
> https://support.steampowered.com/kb_article.php?ref=9205-OZVN-0660.
> 
> The URL just suggests looking for unresolved libraries, and sure enough, ldd
> shows the vgui2_s.so needs libtier0_s.so and libvstdlib_s.so, both of which
> are in ubuntu12_32 but "dnf provides" does not know about either.  I tried
> the script again as it sets LD_LIBRARY_PATH so that the missing libraries
> should be found, however I still get the grey box.

As you said LD_LIBRARY_PATH is already declared in the main ~<user>/.local/share/Steam/steam.sh script so those should be found. I think there is something weird happening on your system. All the files that manage the libraries and that are in ~<user>/.local/share/Steam are managed by the client itself, so they are not declared/edited or overridden in the steam package.
Comment 6 mpope 2017-02-22 03:39:08 CET
> This actually does not clean variables. Let's say there was a custom variable STEAM_RUNTIME=0) in /etc/profile.d/steam.sh, this would not be cleared. Also edited config files will not be overwritten.

Agreed that this is possible.  However I did not touch /etc/profile.d/steam.sh.  In fact I did not even know it was there until now:-).

> rm -f /etc/profile.d/steam.*
> dnf reinstall steam
>
> Now that you have reinstalled the package maybe you can just logout/login to make sure variables are as per default.

OK, done.  Here is the terminal output:

% usr/bin/steam
Running Steam on fedora 25 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1484790260)
Installing breakpad exception handler for appid(steam)/version(1484790260)
Installing breakpad exception handler for appid(steam)/version(1484790260)
Main.cpp (2679) : Assertion Failed: !"Fatal Error: Could not load module 'bin/vgui2_s.dll'"
Assert( Assertion Failed: !"Fatal Error: Could not load module 'bin/vgui2_s.dll'" ):Main.cpp:2679

Installing breakpad exception handler for appid(steam)/version(1484790260)
Error: Could not load module 'vgui2_s.so'.

For more information visit https://support.steampowered.com/kb_article.php?ref=9205-OZVN-0660.

> There should be no need for this. My files have user_home_t and I don't get any SELinux denial. Did you change any SELinux boolean?

Very likely, although the change would have happened years ago.  The relevant boolean would be execmod, which I have disabled.  I do security professionally, paranoia is rational in that world.  Is it a requirement that it be enabled?  I did not see it in the doco.  If so, a policy workaround is much to be preferred, as that boolean closes off an easy attack route.
Comment 7 mpope 2017-04-14 11:29:53 CEST
Getting back to this, execmod is indeed implicated.  However I now have steam working with execmod off.  AFAICT all that is needed is for all the relevant libraries to have textrel_shlib_t enabled... I was previously still missing a couple.  This hack does the job:

find <steamdir> -name \*.so -print0 \
    | xargs -0 -I{} sh -c "readelf -d '{}' 2> /dev/null | fgrep -q TEXTREL && echo {}"  \
    | xargs chcon -t textrel_shlib_t

Thanks for setting me right.
Comment 8 Emmanuel Seyman 2017-08-06 23:12:23 CEST

Fedora 23 will be EOL-ed this week and RPMFusion will no longer be releasing updates for this version of Fedora. This bug will be set to RESOLVED:EXPIRED next weekend to reflect this.

If the problem persists after upgrading to the latest version of Fedora, please
update the version field of this bug (and re-open it if it has been closed).
Comment 9 Emmanuel Seyman 2017-08-20 18:18:23 CEST
Closing this bug with the EXPIRED resolution since Fedora no longer ships updates for this version of Fedora.

Please set the Version field to a supported version of Fedora if you re-open this bug.