ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.27k 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

codygman commented 9 years ago

Thanks @Chocanto and @BogdanOlar (for the script). I can confirm this let me run TF2 with primusrun on utopic and a GTX 660M.

enricotagliavini commented 9 years ago

Can give a +1 about this looking Ubuntu / Debian specific. On my Kubuntu 14.04 I had the problem after switching to LTS stack. Did a fresh install of Fedora 22 KDE spin (currently running libdrm-2.4.61). Did a minor fix to the nvidia drivers from rpmfusion, recompiled bumblebee and bbswitch from ELrepo, recompiled primus from the fedora bumblebee repo and everything works as expected. Tried Half Life 2, Brutal Legend, The Witcher 2 and a bunch of other games.

PCoetzeeDev commented 9 years ago

@BogdanOlar thanks for the script! Everything's working again - Linux Mint 17.1 with GeForce 840m

bgroenks96 commented 9 years ago

I just re-enabled updates from Xorg-Edgers PPA; did apt-get update/upgrade, then installed nvidia-352 (w/ nvidia-352-uvm) drivers, as well as nvidia-common (may be superfluous, idk). I then updated bumblebee.conf to use the 352 driver instead of the age-old (and evil...) 331 driver.

After doing all of this and rebooting, Steam games seem to be working out of the box, i.e. didn't even need to run any script to downgrade libdrm-intel.

It even fixed some odd OpenGL compatibility errors I was getting when trying to run The Swapper.

Anyway, would be curious to hear any feedback as to whether or not these updates work for others as well.

System info: Linux Mint 17.1 Rebecca, 64-bit NVIDIA GeForce GTX 770M, nvidia-352 linux drivers from Xorg-Edgers PPA Intel i7-4700MQ CPU and Intel 4700 HD Graphics.

ic3man5 commented 9 years ago

I switched to Arch Linux and noticed I don't have this issue anymore.

@bgroenks96 It looks like xorg-edgers PPA upgraded at least libdrm to version 2.4.61-1 so its possible the actual issue is with libdrm.so? (I'm have no clue if this is even used when the intel version is in use).

Intel i7-4810mq HD 4600/GTX980M nvidia 352.09 libdrm 2.4.61-1

phaenomenon commented 9 years ago

WORKS fine here on Debian Jessie 8 amd64. I have installed Steam according to Debian Wiki (https://wiki.debian.org/de/Steam). I was not able to run "primusrun" on ANY known way before, but after I did the modification according to BogdaOlar's script (16 May) it works PERFECT.

Thanks to all!!

tomverin commented 9 years ago

I had to use the following launcher properties for it to work (after using @BogdanOlar script)

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

basickarl commented 9 years ago

Running elementary os freya 64-bit with an asus zenbook 840m nvidia card.

Got it working here also by downloading: libdrm-intel1_2.4.56-1_i386.deb

And extracting: libdrm_intel.so.1 libdrm_intel.so.1.0.0

To the ~/.steam/ubuntu12_32 directory.

diogovk commented 9 years ago

I'm using arch, and I have the 32bit version of recommended libraries. To fix my problem I didn't have to "mess" with libdrm_intel, just loading steam with LD_PRELOAD="libpthread.so.0 libGL.so.1" __GL_THREADED_OPTIMIZATIONS=1 optirun steam was sufficient. My libdrm versions:

lib32-libdrm 2.4.61-1
libdrm 2.4.61-1
horschi commented 9 years ago

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

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

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

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

@BogdanOlar HELL YEEEAH!! Thanks a lot ;)

fcojavierdomenech commented 9 years ago

Your script saved my day, thank you!

Chocanto commented 9 years ago

Any news from Intel devs about this issue ?

Tele42 commented 9 years ago

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

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

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

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

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

woodgoblin commented 8 years ago

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

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

Worked for me.

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

@BogdanOlar , thank you for the script.

madduci commented 8 years ago

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

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

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

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

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

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.