Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

What is the best way to start a Steam game in an NVIDIA Optimus laptop with Ubuntu 12.04 Installed and the latest version of bumblebee installed?

If I call Steam with optirun steam and then choose the game I want to play, I get the following error:

The program 'hl2_linux' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
  (Details: serial 125 error_code 9 request_code 14 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Missing shutdown function for DevShotGenerator_Init() : DevShotGenerator_Shutdown()
Missing shutdown function for MapReslistGenerator_Init() : MapReslistGenerator_Shutdown()
Missing shutdown function for COM_InitFilesystem( m_StartupInfo.m_pInitialMod ) : COM_ShutdownFileSystem()
Missing shutdown function for Steam3Client().Activate() : Steam3Client().Shutdown()
/home/user/.local/share/Steam/SteamApps/user/Team Fortress 2/hl2.sh: line 72: 20567 Segmentation fault      (core dumped) ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
Game removed: AppID 440 "Team Fortress 2", ProcID 20567 
saving roaming config store to 'sharedconfig.vdf'
roaming config store 2 saved successfully
^C[68042.116376] [WARN]Received Interrupt signal.

If I run steam without the optirun option, I can go a little further into running the game, hearing the starting music on a black screen, but still fails later on in the process.

Should I call the game I want to play with a special optirun command instead of optirun steam?

share|improve this question
add comment

2 Answers 2

up vote 8 down vote accepted

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

share|improve this answer
    
Thanks, primusrun steam worked wonderfully. –  213441265152351 Feb 16 '13 at 3:53
add comment

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/

share|improve this answer
    
The LD_PRELOAD… options works for me, as does hl2-optirun.sh. Neither of the official options work. (I'm using a Dell XPS 17 L702X.) –  Sparhawk Mar 11 '13 at 23:42
    
Your second command worked for me too (with Dota 2). Thank you! –  TheBronx Sep 16 '13 at 19:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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