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
LD_PRELOAD="libpthread.so.0 libGL.so.1" __GL_THREADED_OPTIMIZATIONS=1 optirun %command%
Any other suggestions? All answers appreciated!