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

A lot of games doesn't start from steam library with optirun, primus and nvidia drivers #3506

Open
gudvinr opened this issue Sep 25, 2014 · 80 comments

Comments

@gudvinr
Copy link

gudvinr commented Sep 25, 2014

Earlier I thought that only Source-based games are falls during start as i described here, but other games also doesn't work.
Overlay is working on intel card and in games that launches. And when i tried to disable overlay games doesn't launches too. So I guess it's not overlay-related issue.
Also, games that falls with optirun runs fine without them.

And one important thing that i noticed - some of games that fall during start from steam runs fine with optirun from console. So, it's probably not nvidia or bumblebee-related issue.

Also, in case of Source-based games (L4D2 for example) when I added optirun after ${DEBUGGER} in hl2.sh it also runs fine. So I think is problem in handling launch params in Steam or somewhere else in place related to launch process.

My hardware and some system info:

CPU: Intel Core i3-3210M
Intel GPU: HD3k
Nvidia GPU: 520M

I'he installed nvidia-331-updates (331.38) drivers from official repository and installed bumblebee (3.2.1) with primus.

System information from steam
Steam starting log (Before launch any game)

And when I try to start one of my games with launch options
vblank_mode=0 optirun -b primus %command%

nothing happens and I've got only some messages in console:

Game update: AppID 550 "Left 4 Dead 2", ProcID 9399, IP 0.0.0.0:0
ERROR: ld.so: object '/home/gudvin/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/gudvin/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/gudvin/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ATTENTION: default value of option vblank_mode overridden by environment.

malloc: unknown:0: assertion botched
free: called with unallocated block argument
last command: (null)
Aborting...Game removed: AppID 550 "Left 4 Dead 2", ProcID 9399

Also, there are no minidumps in /tmp/dumps

@bgroenks96
Copy link

The same issue has been happening to me for the past week or so on Linux Mint 17. None of my games (Source/Non-source) will run with optirun EXCEPT for Paradox games (don't ask why). CK2 and EU4 will run normally.

NVIDIA Driver version: 340.32, bumblebee 3.2.1-90
Kernel version: 3.13.0-24-generic
primus/virtualgl both installed with 32/64 bit libraries

I get similar errors to what's posted above, as well as the following:

 ##### swap interval = 1     swap limit = 1 #####
X Error of failed request:  BadWindow (invalid Window parameter)
Major opcode of failed request:  15 (X_QueryTree)
Resource id in failed request:  0x20000a
Serial number of failed request:  131
Current serial number in output stream:  131

and

*** ConCommand "alias" (0xf1ba4a00) was not unregistered! Shutdown crash imminent/media/brian /HDD-EXT4/steam/SteamApps/common/dota 2 beta/dota.sh: line 77:  9137 Segmentation fault      ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
Game removed: AppID 570 "Dota 2", ProcID 9137 

There are also a bunch of ConVar ********** was not unregistered! Shutdown crash imminent! and ConCommand ********** was not unregistered! Shutdown crash imminent! messages. They might also be relevant?

Let me know if you would like me to post any more of the console output or log records.

@mattyy1hp
Copy link

I have the same problem. All Source games don't start on dedicated nVidia graphics card. I was playing CS:GO yesterday and everything was fine. Also, I didn't update anything related to nVidia drivers.


Games that I tried and didn't work:

  • CS:GO
  • CS:S
  • Dota 2
  • DoD:S
  • Garry's Mod
  • Left 4 Dead 2
  • Team Fortress 2

Games that I tried and worked:

  • Serious Sam 3
  • Killing Floor
  • Civilization V
  • Amnesia: TDD

Logs (~/.steam/error.log)

Game update: AppID 550 "Left 4 Dead 2", ProcID 4528, IP 0.0.0.0:0
ERROR: ld.so: object '/home/mattyy1hp-debian/.steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mattyy1hp-debian/.steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 4532 != 4530, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/mattyy1hp-debian/.steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mattyy1hp-debian/.steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 4531 != 4530, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/mattyy1hp-debian/.steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ATTENTION: default value of option vblank_mode overridden by environment.

malloc: unknown:0: assertion botched
free: called with unallocated block argument
last command: (null)
Aborting...Aborted
Game removed: AppID 550 "Left 4 Dead 2", ProcID 4528
Installing breakpad exception handler for appid(steam)/version(1411443970)


HW/SW Info

@bgroenks96
Copy link

Interesting, Amnesia: TDD isn't working for me, but Amensia AMFP is (with primusrun).

@mattyy1hp
Copy link

For some reason both Amnesia games don't work for me anymore.

By the way I have Arch Linux installed in dual boot on my second hard drive and Steam, Source games and Bumblebee work very well. It seems that only Debian-based distributions are affected.

@arashtarafar
Copy link

Same situation here (tried to run Dota 2)...

Error log: http://pastebin.com/evupM0Ev

System details:
Fedora 20 (Heisenbug) 64-bit
Intel Core i5
Nvidia GT540M

@MateuszG
Copy link

Same situation here (only Valve games: HL2, Portal 2, L4D2)

Logs:
Running Steam on linuxmint 17 64-bit
STEAM_RUNTIME has been set by the user to: /home/mateusz/.local/share/Steam/ubuntu12_32/steam-runtime
Generating new string page texture 70: 128x256, total string texture memory is 131,07 KB
Generating new string page texture 71: 128x256, total string texture memory is 1,49 MB
Generating new string page texture 72: 64x256, total string texture memory is 1,56 MB
Generating new string page texture 73: 32x256, total string texture memory is 1,59 MB
ExecCommandLine: "/home/mateusz/.steam/root/ubuntu12_32/steam steam://open/driverhelperready"
ExecSteamURL: "steam://open/driverhelperready"
Generating new string page texture 80: 128x256, total string texture memory is 1,72 MB
Generating new string page texture 82: 512x256, total string texture memory is 2,24 MB
Generating new string page texture 83: 256x256, total string texture memory is 2,51 MB
Generating new string page texture 86: 2048x256, total string texture memory is 4,60 MB
Generating new string page texture 87: 128x256, total string texture memory is 4,73 MB
Generating new string page texture 89: 384x256, total string texture memory is 5,13 MB
Game update: AppID 550 "Left 4 Dead 2", ProcID 12485, IP 0.0.0.0:0
ERROR: ld.so: object '/home/mateusz/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mateusz/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.

malloc: unknown:0: assertion botched
free: called with unallocated block argument
last command: (null)
Aborting...Aborted
Game removed: AppID 550 "Left 4 Dead 2", ProcID 12485

My system details:
https://gist.github.com/MateuszG/883b3168ae297123104a

@zhongfu
Copy link

zhongfu commented Oct 12, 2014

Do you have the xorg-edgers ppa (or something similar) added? Some updates before October broke my lightdm and Steam games in optirun/primusrun for me. I just used ppa-purge (from the xorg-edgers ppa) and installed nvidia-331 afterwards. This is on Ubuntu though, YMMV.

@MateuszG
Copy link

Thanks zhongfu. Removing xorg-edgers help, now on nvidia-331 games are working.

@sengasdf
Copy link

Tried zhongfu's method, purge xorg-edgers and it works again, thanks!

@zhongfu
Copy link

zhongfu commented Oct 12, 2014

You're welcome! I personally spent hours trying to fix this, so I just wanted to share this to save people from pulling out their hair.

@mattyy1hp
Copy link

Any idea how can I fix it on Debian? I don't use Xorg-edgers or anything like that. I'd try downgrading the broken package but I have no idea which one is it. Downgrading nvidia drivers is impossible (dependency hell).

@zhongfu
Copy link

zhongfu commented Oct 12, 2014

I'm not exactly sure what was wrong, but I think it was the X server packages that broke it. Did it start after you upgraded any package?

@mattyy1hp
Copy link

No, my system was up to date all the time and it didn't work. But I finally found temporary solution for Debian Sid.

If anyone is interested, here is how I fixed it.

  • downgrade libdrm-intel1 from 2.4.58-2 (unstable) to 2.4.56-1 (testing)

@dbkblk
Copy link

dbkblk commented Nov 4, 2014

@mattyy1hp : Thank you. It fixed the problem. For those who don't know where to grab it, libdrm-intel1 is available here: http://snapshot.debian.org/archive/debian/20140810T163814Z/pool/main/libd/libdrm/
Don't forget to also grabd the i386 if you are on amd64.

@Aryetis
Copy link

Aryetis commented Nov 6, 2014

@mattyy1hp and @dbkblk

Thanks a lot. I've been searching for days how to fix that.

notes for newbs to debian (and derivates): download the packages and use "dpkg -i libdrm-intel1_2.4.56-1_amd64.deb libdrm-intel1_2.4.56-1_i386.deb" to install them.

@dbkblk
Copy link

dbkblk commented Nov 6, 2014

@Aryetis You can also do "sudo apt-mark hold libdrm-intel1" to prevent the package from upgrading BUT be careful, you'll have to do "sudo apt-mark unhold libdrm-intel1" once the fix will be packaged.
Moreover, i've noticed many libdrm packages are installed on my pc, to prevent compatibility issues, i've also downgraded the following: libdrm2 libdrm-dev libdrm-intel1 libdrm-nouveau2 libdrm-radeon1

@gdrewb-valve gdrewb-valve assigned jljusten and unassigned ghost Nov 7, 2014
@Tele42
Copy link

Tele42 commented Nov 9, 2014

@heneq
Copy link

heneq commented Nov 25, 2014

Came in here to thank @mattyy1hp for the fix.
I was running Debian testing and it didn't work. I upgraded to Debian Sid and it also didn't work. After hours upon hours, forum thread and reddit posts somehow I found this and his fix worked right away.

A big thank you @mattyy1hp

@mattyy1hp
Copy link

You're welcome.
By the way I reinstalled my OS because I bought a new SSD. Later I noticed my games don't start with primusrun again. So I thought I will just downgrade the libdrm-intel1 package to 2.4.56 version but this version doesn't exist in Debian repositories anymore (https://packages.debian.org/search?keywords=libdrm-intel1).

If anyone is looking for the easiest way to fix it on Debian Jessie/Sid, here is what I did:

  1. nano /etc/apt/sources.list

  2. add this repository:
    deb http://us.archive.ubuntu.com/ubuntu/ utopic main restricted
  3. DO NOT UPGRADE your system
  4. aptitude update

  5. aptitude install libdrm-intel1=2.4.56-1 libdrm-intel1:i386=2.4.56-1

  6. reboot

  7. nano /etc/apt/sources.list

  8. Delete the Ubuntu Utopic repository (deb http://us.archive.ubuntu.com/ubuntu/ utopic main restricted)
  9. aptitude update (just to be sure that the Ubuntu repository is gone)

@D0rd
Copy link

D0rd commented Feb 12, 2015

Wow, thanks a lot mattyy, I've been stuck on this since early this morning after switching my system to sid, it was driving me crazy.

It totally fixed it, you are awesome man!

@snj33v
Copy link

snj33v commented Feb 20, 2015

u dont have to hold anthing, just copy the libdrm_intel*.so files to ubuntu12_32 folder in .steam at home directory

@vrodic
Copy link

vrodic commented Feb 28, 2015

@samdraz thanks, that's a good tip!

@vrodic
Copy link

vrodic commented Mar 1, 2015

I did a bisect here https://bugs.freedesktop.org/show_bug.cgi?id=86043, so hopefully we'll have a fix soon.

@rooshan1234
Copy link

@mattyy1hp thanks, got it to work!

@horschi
Copy link

horschi commented Jul 12, 2015

Copying the libdrm_intel*.so files to ubuntu12_32 and ubuntu12_64 folders in .steam at home directory did solve the issue for me. Both, the 32 and 64 bit were necessary.

Thanks to everyone proposing this!

@cpilipis
Copy link

I don't know if anyone mentioned this, but if you can, upgrade to Linux mint 17.2 MATE. The update log mentions improvements and fixes on the exact 3 pieces of hardware in the title that you mentioned.

@AmmarkoV
Copy link

Thanks @BogdanOlar , your script fixes the issue , tested at a laptop with a GeForce GTX 670M Ubuntu 15.04 3.19.0-16-generic x86_64 , NVIDIA 346.59 using bumblebee , adding primusrun %command% at Launch Properties..!

@fisadev
Copy link

fisadev commented Aug 4, 2015

@mattyy1hp thanks a lot!!

@BogdanOlar thanks to you too for the script. Does it bothers you that I have uploaded it here?: (it's my system install scripts repo) https://github.com/fisadev/system-install
I included an authorship mention inside the script.

@MERKAT0R
Copy link

MERKAT0R commented Oct 2, 2015

@BogdanOlar HELL YEEEAH!! Thanks a lot ;)

@fcojavierdomenech
Copy link

Your script saved my day, thank you!

@Chocanto
Copy link

Chocanto commented Oct 4, 2015

Any news from Intel devs about this issue ?

@Tele42
Copy link

Tele42 commented Oct 4, 2015

@Chocanto There's not much to be said, last I heard this is fixed with the newest libdrm (2.4.61 or newer) used with new nvidia-drivers. Of course, this doesn't help binary distros that ship the problematic versions.

@Chocanto
Copy link

Chocanto commented Oct 4, 2015

@Tele42 Ok, thank you for your answer. At least it's fixed, users will only have to wait for an update of their binary repos.

@fraunos
Copy link

fraunos commented Nov 18, 2015

Just pasting this into games' Launch Options did the trick. Bumblebee works perfect now.

LD_PRELOAD="libpthread.so.0 libGL.so.1" __GL_THREADED_OPTIMIZATIONS=1 optirun %command%

Now i can play ARMA 3 on Linux! And M&B Warband works better than on Windows. Woot!

@jav-12
Copy link

jav-12 commented Dec 3, 2015

LD_PRELOAD="libpthread.so.0 libGL.so.1" __GL_THREADED_OPTIMIZATIONS=1 optirun %command%

Works for me. Using Archlinux and trying to play Civ5

@snj33v
Copy link

snj33v commented Dec 31, 2015

files from http://packages.debian.org/sid/libdrm-intel1 fixes most issues

@woodgoblin
Copy link

@BogdanOlar , thanks for the script, it really saved me.

But really, this bug is open for a year now, where is Valve staff?
They send many updates, like two or three each week, but this blocker issue is not fixed for a year.
How can I recommend Steam for my fellow Linux users where I know that it will not work for sure out of the box?

@bgroenks96
Copy link

@woodgoblin Technically it's not their bug. It seems to be a bug in one version of Intel's libdrm package (it seems to have since been fixed). Unfortunately, that version is what comes out of the box in Ubuntu 14/15 and Linux Mint 17.x.

Still, they really should have some kind of workaround built into Steam so people don't have to go through the pain of dealing with this.

@giulianisanches
Copy link

Worked for me.

Debian Stable with Backports (nvidia-driver, xserver-xorg-video-intel, bumblebee-nvidia, primus).

@BogdanOlar , thank you for the script.

@madduci
Copy link

madduci commented Jun 6, 2016

On latest drivers nvidia and bumblee/primusrun it still won't work and some games freeze (example: Wasteland 2, CS:GO). It works only with intel integrated card (Core i5 4th Gen., NVidia GT730M)

@darkhntr
Copy link

Hello. Do not run the game Knock-Knock, in the terminal gives:
Game update: AppID 250380 "Knock-Knock", ProcID 7516, IP 0.0.0.0:0
ERROR: ld.so: object '/home/di/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/di/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
Generating new string page texture 122: 24x256, total string texture memory is 2,92 MB
Found path: /media/D/linux/SteamLibrary/steamapps/common/Knock-Knock/knock.x86
Mono path[0] = '/media/D/linux/SteamLibrary/steamapps/common/Knock-Knock/knock_Data/Managed'
Mono path[1] = '/media/D/linux/SteamLibrary/steamapps/common/Knock-Knock/knock_Data/Mono'
Mono config path = '/media/D/linux/SteamLibrary/steamapps/common/Knock-Knock/knock_Data/Mono/etc'
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the `/media/D:/linux/SteamLibrary/steamapps/common/Knock-knock/knock_Data/Managed/mono/2.0/mscorlib.dll' directory.
Game removed: AppID 250380 "Knock-Knock", ProcID 7516
No cached mapping sticky in ActivateActionSet.

@tienvx
Copy link

tienvx commented Oct 30, 2016

I tried the script above but it does not work. Here is how I fix it on my machine (tested with Dota 2):

sudo apt-get install lib32stdc++6
cd ~/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu
mv libstdc++.so.6 ~/backup/32
ln -fs /usr/lib32/libstdc++.so.6 libstdc++.so.6
cd ~/.steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu
mv libstdc++.so.6 ~/backup/64
ln -fs /usr/lib32/libstdc++.so.6 libstdc++.so.6

Then open steam, right click on Dota 2, properties, set launch options to primusrun %command%

Distro: Ubuntu 16.04.1 64 bit
NVIDIA Driver version: 370.28, bumblebee 3.2.1-96
Kernel version: 4.4.0-45-generic

I followed those steps here https://bbs.archlinux.org/viewtopic.php?id=206068

@D0rd
Copy link

D0rd commented Jan 22, 2017

FYI, for all the folks on a debian stable based distro (therefore still using libdrm-intel1 2.4.58 system-wide by default) who were still extracting the libraries to the local steam directory to fix this issue and avoid having to downgrade system-wide. It appears that something recently changed with LD_PRELOAD, and steam wasn't looking at my local files anymore, always using the system wide libraries instead.
Instead of wasting time investigating and playing on parameters, I just upgraded libdrm-intel1 through the backport to upgrade system-wide above that shitty 2.4.58 (currently 2.4.74) :

sudo apt-get -t jessie-backports install libdrm-intel1

(Make sure you have the backports in your sources)

@kisak-valve
Copy link
Member

@D0rd, the change is the addition of STEAM_RUNTIME_PREFER_HOST_LIBRARIES which is defaulted on in the 2017-01-19 steam client update.

@Leopard1907
Copy link

Hi guys , i'm suffering from a similar ( at least to me ) situation.

My system has GTX 1050 , which i'm using with 384.98 driver with Nvidia Prime ( not Bumblebee )

But some Feral games are not working while some of them works.

Not working: Shadow of Mordor , Tomb Raider , Dirt Rally

Working : Shogun 2 Total War , Medieval 2 Total War

I'm using Mint 18.2.

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