I want to run games on Ubuntu with Steam. I installed Bumblebee and Primus and the default nVidia driver(304). I've read that the 310 driver gives a huge performance boost so I wanted to try that. I installed the nvidia-experimental-310 & nvidia-settings-310 and configured bumblebee.conf On the bottom he points out that I have to edit /usr/bin/primusrun to use nvidia-experimental-310
#!/bin/bash
# Readback-display synchronization method
# 0: no sync, 1: D lags behind one frame, 2: fully synced
# export PRIMUS_SYNC=${PRIMUS_SYNC:-0}
# Verbosity level
# 0: only errors, 1: warnings (default), 2: profiling
export PRIMUS_VERBOSE=${PRIMUS_VERBOSE:-2}
# Secondary display
# export PRIMUS_DISPLAY=${PRIMUS_DISPLAY:-:8}
# "Accelerating" libGL
# $LIB will be interpreted by the dynamic linker
export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/lib/nvidia-310-updates/libGL.so.1:/usr/lib32/nvidia-310-updates/libGL.so.1'}
# "Displaying" libGL
# export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/lib/$LIB/mesa/libGL.so.1'}
# Directory containing primus libGL
PRIMUS_libGL=${PRIMUS_libGL:-/usr/lib/'$LIB'/primus}
# On some distributions, e.g. on Gentoo, libnvidia-tls.so is not available
# in default search paths. Add its path manually after the primus library
case $PRIMUS_libGLa in
/usr/lib*/nvidia-310-updates*|'') # nvidia is used by default
PRIMUS_libGL=${PRIMUS_libGL}:${PRIMUS_libGLa///libGL.so.1}
;; esac
# Mesa drivers need a few symbols to be visible
# export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL:-'libglapi.so.0'}
# Need functions from primus libGL to take precedence
export LD_LIBRARY_PATH=${PRIMUS_libGL}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# And go!
exec "$@"
My system
Lenovo ideapad Y580
Ubuntu 13.04
Intel Core i7
nVidia GTX660M
When I run optirun glxspheres I get this output:
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce GTX 660M/PCIe/SSE2
150.527939 frames/sec - 167.989179 Mpixels/sec
When I run vblank_mode=0 optirun -b primus glxspheres I get
292.591142 frames/sec - 326.531714 Mpixels/sec
with my nvdia
However when I run primusrun glxspheres I get
Polygons in scene: 62464
Visual ID of window: 0x20
Xlib: extension "NV-GLX" missing on display ":0".
Context is Indirect
OpenGL Renderer: Mesa DRI Intel(R) Ivybridge Mobile
63.910723 frames/sec - 71.324367 Mpixels/sec
I also tried to set vblank_mode=0 optirun -b primus %command% in the Steam which doesn't open any game (TF2 & Trine 2). The article says I should update the primusrun to use nvidia-experimental-310 but I replaced it with nvidia-310-updates because those are the folders which exist.