Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the best way to start a Steam game on a 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/ 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
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:

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

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


Check these discussions

If this does not work download the 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 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

Your Answer


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.