Killing Floor with Nvidia Optimus

Ok so with the normal command of “optirun ./killingfloor-bin” the game loads, but it says it cant find you connected to steam nor you have an internet connection. Plus it doesn’t show up on steam as you in game. Here is the script to fix that problem! While in the KillingFloor/System folder, use this command.

LD_LIBRARY_PATH=~/.steam/bin SteamAppId=1250 vblank_mode=0 optirun ./ki
llingfloor-bin -steam

For Primusrun:

LD_LIBRARY_PATH=~/.steam/bin SteamAppId=1250 vblank_mode=0 primusrun ./ki
llingfloor-bin -steam


Spectraball Steam with Nvidia Optimus

So i got Spectraball on Steam, and of course im dealing with Nvidia Optimus. No problem! but i got a exec line for yah to try in your Spectraball folder so it shows your friends that your playing Spectraball in Steam. if you just “optirun ./Spectraball” the game opens fine, but doesn’t show you in game on Steam.

So in a terminal inside the Spectraball folder, just use this line.

LD_LIBRARY_PATH=~/Steam/ubuntu12_32:$LD_LIBRARY_PATH SteamAppId=18300 vblank_mode=0 optirun ./Spectraball

And there you go! will load the game and show you playing the game in steam!


Having Trouble loading TF2 Or any other games in Steam with Optimus?

So, i had been having an issue with loading games from the steam client. If i run steam with “optirun steam“, then sure..steam loads with optirun. It does not however launch games with optirun as well. So if you pressed the play button for a game in the library, it wouldn’t be “optimized”. So i had to search around for a fix, and i found someone who made a small script that you place into your “Team Fortress 2” folder. Although im not talking just about TF2 here. is the script. I just made a new document file called, opened then added this:

# modified for TF2 and optirun

GAMEROOT=$(cd “${0%/*}” && echo $PWD)
STEAMPATH=$(readlink ~/.steampath)
if [ ! -z ${STEAMPATH} ]; then
ulimit -n 2048
if [ ! -f steam_appid.txt ]; then
echo “520” > steam_appid.txt
LANG=C LD_LIBRARY_PATH=~/Steam/ubuntu12_32:$LD_LIBRARY_PATH optirun

./hl2_linux -game tf -steam “$@”

then save the file, and then run “chmod +x” to make it executable.

i have to explain how to use this for Team Fortress 2, Counterstrike (Beta), and Half-Life (Beta).

LANG=C LD_LIBRARY_PATH=~/Steam/ubuntu12_32:$LD_LIBRARY_PATH optirun./hl2_linux -game tf -steam “$@”    <—- This line right here is what i need to show you.

As you can see it says “./hl2_linux -game tf”  if you have Team Fortress 2 (Beta). You need to change “tf” to “tf_beta“. “tf” is for the non beta version of TF2

For use with Half life and Counterstrike. Make two new scripts with the same script code you just made for TF2, and put them in your half life folder.

(My scripts are called ““(half life), and ““(Counterstrike))

So we will edit the last line again for these two files

Half Life: LANG=C LD_LIBRARY_PATH=~/Steam/ubuntu12_32:$LD_LIBRARY_PATH optirun ./hl_linux -game valve -steam “$@”

Counterstrike: LANG=C LD_LIBRARY_PATH=~/Steam/ubuntu12_32:$LD_LIBRARY_PATH optirun ./hl_linux -game cstrike -steam “$@”

Save them when your done, and chmod them as well.

You must have steam opened, but you can “./” in a terminal, and it will open with your high powered Nvidia Graphics Card.

I have another way of doing this too. but sometimes less success.

EXAMPLE: ( Try this in a terminal within the folder of  “hl_linux“)

LD_LIBRARY_PATH=~/Steam/ubuntu12_32:$LD_LIBRARY_PATH optirun ./hl_linux -game cstrike  <— or you can use primusrun instead of optirun. It works on mine pretty well.

This script seems to only work for these three games.

Good Luck!