I've gotten optirun and primusrun to work with glxgears and also with launching Counter-Strike: Global Offensive(csgo) straight from the executable file:

~/.steam/steam/steamapps/common/Counter-Strike Global Offensive/csgo_linux

but that launches the game in insecure mode so I'm unable to play on VAC (Valve anti cheat) servers. but if I try to launch the game from steam itself it doesn't work. I've tried every launch option I've come across amongst these are the regular optirun %command%, primusrun %command%, LD_PRELOAD="libpthread.so.0 libGL.so.1" __GL_THREADED_OPTIMIZATIONS=1 optirun %command%

Any other suggestions? All answers appreciated!

  • Define "doesn't work": It does not start, you know for sure that it is using the intel card or you are just getting a low performance? – dan_s Jun 9 '15 at 9:48
  • Doesn't work means it doesn't start at all. Steam says I'm in-game for about a second, then nothing happens. If i don't have any launch options it works, but the nvidia card is not in use (Checked with lshw) – Jonas Natten Jun 9 '15 at 10:38
  • Try running this command in the console and see if you get any errors: primusrun steam steam://rungameid/730 (730 is the ID for CS:GO) – dan_s Jun 9 '15 at 10:55
  • That made the game launch (if i remove the launch options from steam), but it still isnt using the nvidia graphics, like it does with glxgears. The only thing i get in the terminal i launch it from is: Running Steam on ubuntu 15.04 64-bit STEAM_RUNTIME is enabled automatically. If it is possible i could also live with disabling the intel graphics and using only the nvidia card. – Jonas Natten Jun 9 '15 at 15:44

I've had exactly the same problem 1 hour ago. To fix it, edit the file .steam/steam/steamapps/common/Counter-Strike Global Offensive/csgo.sh

Before the two lines that start with ${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} you must add "primusrun" (maybe only one line is necessary, didn't tested):



primusrun ${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"

Then remove the CounterStrike's launch options in steam and launch the game normally from Steam. It should launch on the GPU

| improve this answer | |
  • This seems to work perfectly! I also added vblank_mode=0 to disable the vsync. Thanks a lot! – Jonas Natten Jun 20 '15 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.