Source-1-Games icon indicating copy to clipboard operation
Source-1-Games copied to clipboard

[L4D2] Could not load library matchmaking

Open jethrogb opened this issue 13 years ago • 30 comments

After installing L4D2, right after the intro video I get the error message "Could not load library matchmaking". When I click OK, the game exits.

jethrogb avatar May 04 '13 22:05 jethrogb

This seems to be caused by primusrun. Perhaps it's not preserving LD_LIBRARY_PATH in the right way?

jethrogb avatar May 04 '13 22:05 jethrogb

This shows up in the console:

 failed to dlopen /media/data/Games/LinuxSteam/SteamApps/common/Left 4 Dead 2 Beta/left4dead2/bin/matchmaking.so error=dlopen: cannot load any more object with static TLS

Some more info:

$readelf -l '/media/data/Games/LinuxSteam/SteamApps/common/Left 4 Dead 2 Beta/left4dead2/bin/matchmaking.so'|grep TLS
  TLS            0x0ee000 0x000ee000 0x000ee000 0x00000 0x00018 R   0x4
$readelf -l /usr/lib/i386-linux-gnu/primus/libGL.so.1 |grep TLS
  TLS            0x040d34 0x00041d34 0x00041d34 0x00000 0x0000c R   0x4

jethrogb avatar May 04 '13 22:05 jethrogb

It seems to work when I run the game like this:

LD_PRELOAD=left4dead2/bin/matchmaking.so primusrun ./hl2.sh -game left4dead2 -steam

jethrogb avatar May 04 '13 23:05 jethrogb

Spoke too soon. The game loads that way, but I can't start a game.

jethrogb avatar May 04 '13 23:05 jethrogb

I think this is duplicate of #427

linnik avatar May 05 '13 01:05 linnik

Perhaps, mine doesn't actually segfault.

jethrogb avatar May 05 '13 01:05 jethrogb

It's a duplicate of https://github.com/ValveSoftware/steam-for-linux/issues/2383 though. Not sure why that's in steam-for-linux instead of source-1-games.

jethrogb avatar May 05 '13 01:05 jethrogb

Do you use 32-bit architecture? I've seen some users which complain about dlopen issue only on this platform and never on x64.

linnik avatar May 05 '13 02:05 linnik

$uname -a
Linux jethro 3.5.0-28-generic #48-Ubuntu SMP Tue Apr 23 23:03:38 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$cat /etc/issue
Ubuntu 12.10 \n \l

You're right though that on 64-bit it's impossible to create shared libraries with position-dependent code. But HL2 is a 32-bit program.

jethrogb avatar May 05 '13 02:05 jethrogb

Can you try to launch game with this method?

cd ~/.local/share/Steam/SteamApps/common/Left\ 4\ Dead\ 2\ Beta/
vblank_mode=0 primusrun ./hl2_linux -game left4dead2_beta -steam

linnik avatar May 05 '13 02:05 linnik

Your method works flawlessly for me, linnik.

Heis avatar May 05 '13 10:05 Heis

@linnik That's only working if I have started Steam before and start L4D2 form the commandline afterwards.

Any Idea how to modify the hl2.sh script that it works by using Steam?

tr37ion avatar May 05 '13 13:05 tr37ion

I have same issue. $ uname -a Linux localhost 3.8.10-gentoo #1 SMP Sat Apr 27 07:22:16 EEST 2013 x86_64 AMD Phenom(tm) II X4 965 Processor AuthenticAMD GNU/Linux CPU: AMD Phenom(tm) II X4 965 GPU: AMD HD 7770 OS: Gentoo GNU/Linux amd64 Driver: Catalyst 13.4

BTW, this is works for me cd /media/data/Steam/SteamApps/common/Left\ 4\ Dead\ 2\ Beta/ ./hl2_linux -game left4dead2_beta -steam

anonymous09 avatar May 05 '13 17:05 anonymous09

Can also confirm: Not working with Launch Options "optirun %command%" (other games work like that, like tf2) Working with cd Steam/SteamApps/common/Left\ 4\ Dead\ 2\ Beta vblank_mode=0 optirun ./hl2_linux -game left4dead2_beta -steam

Linux tux 3.7.10-gentoo #4 SMP PREEMPT Wed Mar 13 19:53:43 CET 2013 x86_64 Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz GenuineIntel GNU/Linux GT 540M Nvidia 310.44, Bumblebee 3.1

daugustin avatar May 06 '13 15:05 daugustin

If any of you would like to launch game manually every time, before Valve release a fix, i advise you to use export __GL_THREADED_OPTIMIZATIONS=1 from hl2.sh script - thats enables nVidia threaded optimizations.

linnik avatar May 06 '13 15:05 linnik

I have the same issue.

uname -a Linux BigGrey 3.5.0-28.47-ph-generic #ph SMP Wed Apr 10 22:16:56 CEST 2013 x86_64 x86_64 x86_64 GNU/Linux

using primusrun

manual starting the game works

pete-h avatar May 06 '13 21:05 pete-h

I found here: http://steamcommunity.com/app/223530/discussions/0/810923580581417316#p3 that you have to set the launch options to start L4D2B directly from steam to: LD_PRELOAD=./left4dead2/bin/matchmaking.so vblank_mode=0 PRIMUS_SYNC=1 STEAM_RUNTIME=1 primusrun %command%

The steam overlay doesn't work, but playing does :)

pete-h avatar May 10 '13 16:05 pete-h

If you want the overlay to work use

 LD_PRELOAD=$LD_PRELOAD:left4dead2/bin/matchmaking.so primusrun %command%

You need this since the overlay also uses the preload mechanism.

filmor avatar May 17 '13 19:05 filmor

This bug does still exist in the "promoted" L4D2 (Beta) on Linux.

filmor avatar Jul 03 '13 08:07 filmor

Confirm that, same issue in the non-beta release. Bumblebee on linux.

ghost avatar Jul 03 '13 20:07 ghost