STEAM GROUP
Linux Nvidia Optimus Users LinuxOptimus
STEAM GROUP
Linux Nvidia Optimus Users LinuxOptimus
4
IN-GAME
35
ONLINE
Founded
19 November, 2012
All Discussions > Tips and Tricks > Topic Details
 This topic has been pinned, so it's probably important
CyberXZT 19 Nov, 2012 @ 5:16pm
How to start Source games under Optimus
These steps are no longer needed as Steam now supports Optimus. Click here for information on Steam's implementation.

Each Source game is launched in a slightly different matter so to make this easy I have made an individual post for each game. At the moment only TF2 is supported but when additional games are supported, I will update this post.

Games:
Have a problem? Post it here.

Also check out this experimental script which adds Primus detection, support for custom paths, and more.
Last edited by CyberXZT; 22 Dec, 2012 @ 10:34am
< >
Showing 1-15 of 38 comments
CyberXZT 19 Nov, 2012 @ 5:16pm 
Team Fortress 2

First, start by launching Team Fortress 2 inside Steam. This has to be done once so that the necessary files are extracted. Next, open a terminal and run the following commands subsituting 'your_steam_name' when necessary:
cd ~/Steam/SteamApps/your_steam_name/Team\ Fortress\ 2/ wget -O hl2-optirun.sh http://cyberxzt.com/files/optimus/tf2-hl2-optirun.txt chmod +x ./hl2-optirun.sh
Finally, to start Team Fortress 2:
~/Steam/SteamApps/your_steam_name/Team\ Fortress\ 2/hl2-optirun.sh

Script[cyberxzt.com]
Last edited by CyberXZT; 7 Dec, 2012 @ 12:47pm
asm0dey 1 Dec, 2012 @ 2:40am 
With slight changes in code works for TF2 Beta:
#!/bin/bash # hl2.sh modified for TF2 and optirun # http://gtm.steamproxy.vip/groups/LinuxOptimus GAMEROOT=$(cd "${0%/*}" && echo $PWD) STEAMPATH=$(readlink ~/.steampath) export LD_LIBRARY_PATH="${GAMEROOT}"/bin:$LD_LIBRARY_PATH if [ ! -z ${STEAMPATH} ]; then export LD_LIBRARY_PATH="$(dirname ${STEAMPATH})":$LD_LIBRARY_PATH fi ulimit -n 2048 export __GL_THREADED_OPTIMIZATIONS=1 cd "$GAMEROOT" if [ ! -f steam_appid.txt ]; then echo "520" > steam_appid.txt fi LANG=C LD_LIBRARY_PATH=~/Steam/ubuntu12_32:$LD_LIBRARY_PATH optirun ./hl2_linux -game tf_beta -steam "$@"
Last edited by asm0dey; 1 Dec, 2012 @ 2:41am
CyberXZT 1 Dec, 2012 @ 11:43am 
Thanks for the heads up! I finished a script that detects primus support and detects which game is in the folder and plan to post it soon. :D
Crunchy 3 Dec, 2012 @ 4:10am 
Wow that would be great! Currently using primus for other games.
Agree that the script works nice for Team Fortress 2.
Last edited by Crunchy; 3 Dec, 2012 @ 4:10am
CyberXZT 3 Dec, 2012 @ 10:34am 
Here is an experimental script with support for additional games, custom paths, Primus, etc. THIS SCRIPT IS EXPERIMENTAL! Be sure to check back for updates!

http://pastebin.com/zyx61nAM
Last edited by CyberXZT; 12 Dec, 2012 @ 5:02pm
CÙ BÒCAN 5 Dec, 2012 @ 5:50am 
Nice work :)
Black Eco 7 Dec, 2012 @ 11:22am 
Just tried out the new script with primus installed, got this uncomprehensible error :
axel@axel-K53SV:~$ use_primus=0 ~/Steam/SteamApps/blackeco/Team\ Fortress\ 2/hl2-optimus.sh Failed to load the launcher
CyberXZT 7 Dec, 2012 @ 11:26am 
Hello,

Would it be possible to talk on Steam?
Justin Bieber 7 Dec, 2012 @ 12:16pm 
the script doesn't work, it just crashes.
I also tried to modify the hl2-optimus so it runs with primus instead, crashes after I select hero type.
CyberXZT 7 Dec, 2012 @ 12:33pm 
Can you post a log? Also, the crash with Primus happens when using the experimental Nvidia drivers.
Justin Bieber 7 Dec, 2012 @ 12:42pm 
tell me the commands to do so, or is there a log file?
CyberXZT 7 Dec, 2012 @ 12:45pm 
Just the console output from
~/Steam/SteamApps/YOURNAMEHERE/Team\ Fortress\ 2/hl2-optirun.sh
Justin Bieber 7 Dec, 2012 @ 12:50pm 
No such file or directory.
I don't know why, but I can't access my files from terminal. Do I need a synlink or something similar?
Justin Bieber 7 Dec, 2012 @ 12:51pm 
I can access and run scripts from nautilus, but not from terminal...
Black Eco 7 Dec, 2012 @ 12:54pm 
Originally posted by CyberXZT:
Hello,

Would it be possible to talk on Steam?
Of course, add me as friend ;)
< >
Showing 1-15 of 38 comments
Per page: 1530 50

All Discussions > Tips and Tricks > Topic Details