ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.26k stars 174 forks source link

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

Open gudvinr opened 10 years ago

gudvinr commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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:

Games that I tried and worked:


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 commented 10 years ago

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

mattyy1hp commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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

sengasdf commented 10 years ago

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

zhongfu commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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.

dbkblk commented 10 years ago

@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 commented 10 years ago

@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 commented 10 years ago

@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

Tele42 commented 10 years ago

Cross-reference: https://bugs.freedesktop.org/show_bug.cgi?id=86043

heneq commented 10 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

vrodic commented 9 years ago

@samdraz thanks, that's a good tip!

vrodic commented 9 years ago

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

rooshan1234 commented 9 years ago

@mattyy1hp thanks, got it to work!

mamantoha commented 9 years ago

@mattyy1hp thanks! That's work on Ubuntu 15.04 with nvidia-346 and bumblebee

Also you can put a package on hold:

echo "libdrm-intel1 hold" | sudo dpkg --set-selections
echo "libdrm-intel1:i386 hold" | sudo dpkg --set-selections
elmat0 commented 9 years ago

This issue also affects SteamOS (v157). Downgrading and holding the packages noted above via dpkg does fix it in the meantime.

I have seen reports stating that upgrading the nvidia drivers to 346.35 should fix this. Can anyone here confirm that this is true?

Does anyone know if Valve, Intel or Nvidia are looking into this? All the bug report threads on this issue I've found appear to go quiet a month or so ago.

Hibby commented 9 years ago

It's worth noting that on Debian, there is the snapshots portal for old packages - I downloaded and installed both libdrm-intel1_2.4.56-1_i386.deb and libdrm-intel1_2.4.56-1_amd64.deb from there and it's working perfectly, alongside holding them from update as described further up.

Packages available from:

http://snapshot.debian.org/archive/debian/20140810T163814Z/pool/main/libd/libdrm/

and as root (sudo or otherwise): dpkg -i libdrm-intel1_2.4.56-1_i386.deb libdrm-intel1_2.4.56-1_amd64.deb

If you're on 64bit, you need both packages or install will fail. If you're on 32bit, only the i386 package is required.

This is much lower impact than @mattyy1hp's solution in that you don't need new repos.

Chocanto commented 9 years ago

@elmat0 Purged nvidia-340 and installed nvidia-346.59. It's not fixing this bug :/

ic3man5 commented 9 years ago

Confirming libdrm-intel1_2.4.56-1 fixes the issue on ubuntu 15.04.

Placed them in ~/.steam/ubuntu12_64 and ~/.steam/ubuntu12_32

gavindi commented 9 years ago

I'm also confirming libdrm-intel1_2.4.56-1 fixes the issue on ubuntu 15.04 after I unpacked the .deb files and put them in ~/.local/share/Steam/ubuntu12_32 and ~/.local/share/Steam/ubuntu12_64.

It's probably worth noting that this issue ONLY exists when using Bumblebee/Primusrun for dynamic switching of GPU's. If I use the nVidia control panel switch and log out and back in to switch, then the local copies of libdrm-intel1 are not needed for games to work. However, logging out and back in is inconvenient.

ghost commented 9 years ago

I had to downgrade libdrm2, libdrm-intel1, libdrm-nouveau2, libdrm-radeon1 and libdrm-dev to 2.4.56-1 version on both amd64 and i386 architecture to make it work on debian 8.0. Thanks !

gavindi commented 9 years ago

Valve,

I refer you to https://bugs.launchpad.net/ubuntu/+source/libdrm/+bug/1450562 where the libdrm upstream team aren't convinced that the issue lies within libdrm.

Others, Is there somewhere else to post this to get Valve's attention?

Chocanto commented 9 years ago

I confirm that placing libdrm-intel1_2.4.56-1 in ~/.steam/ubuntu12_64 and ~/.steam/ubuntu12_32 fixed this bug. Also this method is easier to achieve and maintain than downgrade libdrm-intel1 and all packages related to it.

EfreetSK commented 9 years ago

@Chocanto What exact files have you placed there? I downloaded .deb packages, extracted them and there is file usr/lib/i386-linux-gnu/libdrm_intel.so.1.0.0. I placed this file into ~/.steam/ubuntu12_32 (and 64 bit into _64) but it didn't help. I extracted whole packages into those directories, but that didn't help either. I placed whole .deb packages there but that also didn't help

Chocanto commented 9 years ago

@EfreetSK You have to download and extract the package libdrm-intel1_2.4.56-1 in for 32bit and 64bit architectures. Then extract all files placed in the /usr/lib/i386-linux-gnu/ (i386 package) to ~/.steam/ubuntu12_32 and all from /usr/lib/x86_64-linux-gnu (x86_64 package) to ~/.steam/ubuntu12_64.

LD_PRELOAD set by steam should make it search first on ~/.steam/ubuntu12_64 and ~/.steam/ubuntu12_32 than /usr/lib/...

EfreetSK commented 9 years ago

@Chocanto Ah I see. There were 2 files, one of them was link. I thought that link is not important so I didn't copy it. Apparently it was important :) I copied both of them and it's working now, thanks :+1:

snj33v commented 9 years ago

32bit is important (most games in steam are 32bit)

fasmat commented 9 years ago

@gavindi, @Chocanto: I'm suffering from the same issue, but I'm running Ubuntu 14.04. I extracted the .so files from the debian packages libdrm_radeon, libdrm_nouveau, libdrm_intel and libdrm and copied them to ubuntu12_32 and ubuntu12_64 (corresponding to the platform they were built for).

I'm still getting the same issue with Valve games. "malloc: unknown:0: assertion botched". Do you guys have any idea what I could do to fix that?

Thanks!

Chocanto commented 9 years ago

@fasmat You have to download the 2.4.56-1 version of libdrm-intel1, not the latest one. It is the last one who make this crash happen

fasmat commented 9 years ago

@Chocanto I figured it out. I only extracted the .so file from the package, but you also have to extract the softlink (or rename the .so file to the name of the softlink). Then it works.

arthurnobrega commented 9 years ago

I also had the same problem and it was solved with @mattyy1hp's tip to downgrade lidrm-intel1 to version 2.4.56-1.

My environment:

  1. Ubuntu 15.04
  2. Kernel 3.19.0-16-generic
  3. libdrm-intel1 2.4.60-2

So, the problem still in version 2.4.60-2 of libdrm-intel1

nickpelone commented 9 years ago

Adding myself to the 'me, too' list. Linux Mint 17.1 (Ubuntu 14.04), had to manually downgrade from 2.4.60 -> 2.4.56 in order to fix this.

Chocanto commented 9 years ago

Downgrade the package in your system is not recommended, some other packages depedent of libdrm-intel1 may not work

BogdanOlar commented 9 years ago

Same problem here, but solved it by using Chocanto's solution.

I'm using Kubuntu 15.04. Here's my script which avoids downgrading lidrm-intel1 system-wide by downloading and extracting the needed libraries directly to the local steam directory:

#!/bin/bash

# create a temporary directory
mkdir SteamFixTempDir
cd ./SteamFixTempDir

wget http://snapshot.debian.org/archive/debian/20140810T163814Z/pool/main/libd/libdrm/libdrm-intel1_2.4.56-1_i386.deb
wget http://snapshot.debian.org/archive/debian/20140810T163814Z/pool/main/libd/libdrm/libdrm-intel1_2.4.56-1_amd64.deb

#  32-bit
# unpack the .deb and unarchive data.tar.xz
ar p libdrm-intel1_2.4.56-1_i386.deb data.tar.xz | tar xvJ
# copy the library and link
cp ./usr/lib/i386-linux-gnu/* ~/.steam/steam/ubuntu12_32/

#  64-bit
# unpack the .deb and unarchive data.tar.xz
ar p libdrm-intel1_2.4.56-1_amd64.deb data.tar.xz | tar xvJ
# copy the library and link
cp ./usr/lib/x86_64-linux-gnu/* ~/.steam/steam/ubuntu12_64/

# cleanup
cd ..
rm -rf ./SteamFixTempDir 
sarroutbi commented 9 years ago

This workaround worked for me perfectly.

Thank you very much for the tip

Chocanto commented 9 years ago

@BogdanOlar Nice script you have here ! :)

fasmat commented 9 years ago

While I can play now using primusrun I have a new issue: After ~ 15 minutes of playing my fps suddenly drop dramatically from 60 to ~ 10. Changing any setting (even increasing the texture detail) sometimes fixes the issue, but not always and sometimes after changing any graphic settings Dota just crashes. Anyone else having similar issues?

snj33v commented 9 years ago

@fastmat, cpu throttles due to heat

ocharles commented 9 years ago

Just as another data point - downgrading libdrm-intel (along with libdrm and libpciaccess) resulted in primusrun working with CS: Source.

gugacavalieri commented 9 years ago

I confirm that placing libdrm-intel1_2.4.56-1 in ~/.steam/ubuntu12_64 and ~/.steam/ubuntu12_32 fixed this bug. Also this method is easier to achieve and maintain than downgrade libdrm-intel1 and all packages related to it.

Valve should look into this!