How can you play Steam games with nvidia-optimus laptop?

Check these links - You need to change game properties as shown below

  • Right click on TF2 in your library
  • Click Properties
  • Click Set Launch Options
  • If you only have optirun, enter: optirun %command%

The above did not work for me and I had to set the launch options as

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

Check these discussions:

  • http://steamcommunity.com/groups/LinuxOptimus/discussions/0/846944052733804503/
  • http://steamcommunity.com/groups/LinuxOptimus/discussions/1/864951657810665792/

If this does not work download the hl2-optirun.sh to below location and run it.

/home/user/Steam/SteamApps/'account_name'/Team Fortress 2/

Valve recommends using primusrun for running Steam games on the NVIDIA GPU.

See the following guide for help on doing so:

https://support.steampowered.com/kb_article.php?ref=6316-GJKC-7437