protonscr

STEAM_RUNTIME_PREFER_HOST_LIBRARIES disabled on OpenSUSE

steamclosed runtimeDistro Family: openSUSE
ValveSoftware/steam-for-linux#4939 · opened 2017-04-28 by digulla · updated 2019-07-18 · 8 comments · github
Ddigulla 2017-04-28 github

Your system information

  • Steam client version (build number or date): 1493162727
  • Distribution (e.g. Ubuntu): openSUSE LEAP 42.2
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

With the latest update of the steam client, sound is broken.

I see this in the log:

[0427/225333.813590:WARNING:audio_manager.cc(317)] Multiple instances of AudioManager detected
[0427/225333.813628:WARNING:audio_manager.cc(278)] Multiple instances of AudioManager detected
...
ALSA lib pcm_direct.c:1722:(snd1_pcm_direct_parse_open_conf) Unknown field direct_memory_access
[0427/225431.222581:WARNING:alsa_util.cc(24)] PcmOpen: default,invalid argument

Sound works OK in other Linux applications (web browser, media player), only the steam client is affected.
I can play video (with sound) using vlc. I can watch video (with sound) on YouTube in Chrome.

No game in the steam client works. All of them complain that there is a sound problem and then, they crash.

The error message is always:

ALSA lib pcm_direct.c:1722:(snd1_pcm_direct_parse_open_conf) Unknown field direct_memory_access

I tried FEZ, Factorio and The Stanley Parable and several videos in the store.

Sound worked perfectly when I used it last time (which was a few weeks ago). I assume that you broke this with a change which you made in the latest Steam client.

alsa version: 1.1.3 (release 8.6.1, installed Sa 15 Apr 2017)
I'm not using PulseAudio (it's not even installed).

Steps for reproducing this issue:

  1. start steam client
  2. start a game or a video in the Steam store
Ddigulla 2017-04-28 github

Update: This seems to be the same issue as #4139 The workaround from there, namely

LD_PRELOAD="/usr/lib/libasound.so.2:/usr/lib64/libasound.so.2" /usr/bin/steam

works for me.

Analysis: In a nutshell, Steam tries to load its own libasound.so.2 but parses the system's alsa configuration. If the two don't match, there is trouble.

I've found the offending option in /usr/share/alsa/pcm/dmix.conf.

Now I'm wondering if there is an environment variable to set the path of the /usr/share/alsa/alsa.conf. If not, since you bring your own library, how about patching it so you can set the path to your own copy of alsa.conf?

Failing that, how about omitting your own library and always using the one from the system?

Or is there a way to set a specific ALSA config (overriding the bad options from the file above) just for steam?

Kkisak-valve maintainer 2017-04-28 github

I can confirm this issue on my OpenSUSE 42.2 test box. This looks like a steam runtime compatibility issue which is avoided in other distros by use of the STEAM_RUNTIME_PREFER_HOST_LIBRARIES=1 env variable (the current default) which is getting disabled because steam's startup script can not find ldconfig in the PATH variable. Gentoo had a simular issue and adjusted their package to enable this behavior.

Please contact your package maintainer for steam and point them towards https://github.com/anyc/steam-overlay/blob/master/games-util/steam-launcher/steam-launcher-1.0.0.54-r1.ebuild#L86-L89 as a reference.

Using pulseaudio is fine.

Steps to reproduce:

  1. install steam on opensuse 42.2
  2. run setup-pulseaudio --disable as root
  3. test steam

OpenSUSE issue report: https://bugzilla.opensuse.org/show_bug.cgi?id=1025841

Ddigulla 2017-05-01 github

I think I remember that the runtime did disable the steam libraries and I can confirm that this doesn't happen anymore.

I did some more tests. When I add /sbin to the path or link ldconfig to ~/bin/, that makes steam log different errors during startup:

../vgui_surfacelib/FontManager.cpp (276) : Assertion Failed: descs.Count() >= 1

The alsa error is gone. But I don't get sound in the store and when I start Thimbleweed Park, it crashes:

Game update: AppID 569860 "Thimbleweed Park", ProcID 17601, IP 0.0.0.0:0
>>> Adding process 17601 for game ID 569860
ERROR: ld.so: object '/storage/adigulla/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/storage/adigulla/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 17602 for game ID 569860
libgcrypt selftest: binary  (0): No such file or directory
Ohhhh jeeee: ... this is a bug (global.c:137:global_init)
Game removed: AppID 569860 "Thimbleweed Park", ProcID 17601 

So mixing native and steam libraries is currently very broken on OpenSUSE. The only way to start the client and get sound in games is not having ldconfig on the path and start steam with LD_PRELOAD="/usr/lib/libasound.so.2:/usr/lib64/libasound.so.2" /usr/bin/steam

Note: Having lspci on the path doesn't seem to have an effect either way.

Kkisak-valve maintainer 2017-05-01 github

The gcrypt error in that log snippet appears to be some trouble with libgcrypt11 on OpenSUSE which is not limited to steam: https://forums.opensuse.org/showthread.php/510765-Has-anyone-been-able-to-get-spotify-to-work-on-opensuse-(wine-or-otherwise) Possibly a missing dependency on https://software.opensuse.org/package/libgcrypt11.

Ddigulla 2017-05-01 github

Opened a bug for opensuse to see what they can say about this: https://bugzilla.opensuse.org/show_bug.cgi?id=1037021

Ddigulla 2017-05-01 github

Re libgcrypt: openSUSE 42.2 comes with libgcrypt20 so it's probably another "host library is too different from the steam one". A pity that the error message doesn't say which library is loaded.

I'll try to install libgcrypt11 later to see what that would change.

Have you considered running steam in chroot? That would allow you to pick and choose shared libraries and config files for each distribution and maybe even offload the picking and choosing. Or use something like snaps/flatpacks which would isolate you even more from the underlying OS?

Kkisak-valve maintainer 2017-05-19 github

Closing as the original issue is now fixed in the 2017-05-18 steam beta client.

Ddigulla 2017-05-20 github

The new openSUSE package alsa-1.1.3-8.9.1 also contains a fix.

Nothing extracted yet.