Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[L4D2] Could not load library matchmaking #450

Closed
jethrogb opened this issue May 4, 2013 · 30 comments
Closed

[L4D2] Could not load library matchmaking #450

jethrogb opened this issue May 4, 2013 · 30 comments

Comments

@jethrogb
Copy link

jethrogb commented May 4, 2013

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
Copy link
Author

jethrogb commented May 4, 2013

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

@jethrogb
Copy link
Author

jethrogb commented May 4, 2013

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
Copy link
Author

jethrogb commented May 4, 2013

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

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

@jethrogb
Copy link
Author

jethrogb commented May 4, 2013

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

@linnik
Copy link

linnik commented May 5, 2013

I think this is duplicate of #427

@jethrogb
Copy link
Author

jethrogb commented May 5, 2013

Perhaps, mine doesn't actually segfault.

@jethrogb
Copy link
Author

jethrogb commented May 5, 2013

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

@linnik
Copy link

linnik commented May 5, 2013

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

@jethrogb
Copy link
Author

jethrogb commented May 5, 2013

$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.

@linnik
Copy link

linnik commented May 5, 2013

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

@Heis
Copy link

Heis commented May 5, 2013

Your method works flawlessly for me, linnik.

@tr37ion
Copy link

tr37ion commented May 5, 2013

@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?

@anonymous09
Copy link

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

@daugustin
Copy link

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

@linnik
Copy link

linnik commented May 6, 2013

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.

@pete-h
Copy link

pete-h commented May 6, 2013

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
Copy link

pete-h commented May 10, 2013

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 :)

@filmor
Copy link

filmor commented May 17, 2013

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
Copy link

filmor commented Jul 3, 2013

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

@ghost
Copy link

ghost commented Jul 3, 2013

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

@shuhaowu
Copy link

shuhaowu commented Jul 7, 2013

+1

@dsnettleton
Copy link

This bug affects me as well.
Trouble launching on my nvidia card with bumblebee/primus, and intermittent segfaults while the game is running.

@tnbp
Copy link

tnbp commented Jul 13, 2013

dsnettleton, have you tried disabling workshop content? My games seem to crash less often after disabling "Informal Skyboxes."

@freehck
Copy link

freehck commented Jul 16, 2013

I have the same issue while using primusrun. If I try to start L4D2 without primus, it works fine (but certainly with low performance).

I'm using:
Distro: Debian GNU/Linux Jessie (testing, 8.0)
WM: i3-wm (v4.5.1-2)
Card: Nvidia GeFroce GTX 610M
Additional info: I'm still using kernel 3.2.

I've prepared an strace log for this bug. You can download it from here: ftp://freehck.ru/l4d2-450-strace.log (21MiB)

@freehck
Copy link

freehck commented Jul 17, 2013

Append a bit.

I've written a simple script test-450.sh [1] to check environment variables inside primusrun in order to check if LD_LIBRARY_PATH is correct while primusrun executes game. And more, I append LD_DEBUG flag in order to determine why there is a problem with matchmaking.so.

I've ran it with following command:
% bash -c './test-450.sh' &> test-450.log

I append log file [2] for you.

[1] ftp://freehck.ru/test-450.sh
[2] ftp://freehck.ru/test-450.log (42 MiB)

@pete-h
Copy link

pete-h commented Jul 18, 2013

Apparently a fix might be coming with one of the next updates:
amonakov/primus#103

@elthommy
Copy link

This bug affects me also

@pete-h
Copy link

pete-h commented Aug 5, 2013

Seems to be fixed for me with the latest L4D2 update :)

@ghost
Copy link

ghost commented Aug 5, 2013

Fixed in latest update indeed

@freehck
Copy link

freehck commented Aug 7, 2013

Fixed in the latest L4D2 update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests