Posts tonen met het label bumblebee. Alle posts tonen
Posts tonen met het label bumblebee. Alle posts tonen

dinsdag 11 juni 2013

Set up Steam to use Bumblebee or Primus in elementaryOS

In my last post, I explained how to set up Bumblebee and Primus quick and easy in elementaryOS. Most people will want to use their high-end graphics card to play games on elementary, so here's a simple guide that shows how to play games and how to set up Steam to use your high-end card:

How to play games? 

Really simple, just type in 'optirun' and the path to your game in the terminal like this:

optirun /path/to/mygame

If you installed Primus, you can simply replace optirun with primusrun:

primusrun /path/to/mygame

Pretty easy right? If you don't know the path to your game, the easiest way to know is by installing alacarte which is a menu editor for your slingshot launcher. I've made a guide here. Also, you can just change the menu entry for your game in alacarte by putting optirun or primusrun in front of the command for your game. That way, you don't have to use a terminal to start up your game and you simply can click the icon in slingshot!


How to set up Steam? 

There are 2 methods to set up Steam to use your high-end graphics card:

Method 1
If you're a frequent user of the big picture mode in Steam, the way to set up Steam is the same as any other game. Just type 'optirun steam' or 'primusrun steam ' in a terminal, or to make this default in slingshot add optirun or primusrun to the command in alacarte so it looks like this:



This method drains a lot of memory usage, so if you're not using the big picture mode (as I), use method 2!


Method 2
  • First, fire up a terminal and type this: 

sudo sh -c 'echo OPTIMUS_PREFIX=\"primusrun\" >> /etc/environment'


  • Logout and log back in from your desktop.


  • Once you installed a game in steam, right click the game in the Steam library and choose 'properties'. Click the 'set launcher options' button in the dialog and fill in the following line: 

$OPTIMUS_PREFIX %command%

so it the dialog screen looks like this:


Do this for each game you want to play with your high-end card and that's it!

maandag 10 juni 2013

How to install bumblebee with latest nvidia drivers in elementaryOS


As there isn't a really great guide on how to install Bumblebee in elementaryOS Luna, here's mine!
I tried this on beta 1 as well as beta 2, and it worked flawlessly. Bumblebee brings Nvidia Optimus support to elementaryOS improving power management, gaming performance and more.

If you're a complete newbie and don't know how to use terminal commands, let me know in the comments!

  • Add the Bumblebee PPA to your system


sudo add-apt-repository ppa:bumblebee/stable


  •  For more up-to-date nvidia drivers, you need to add another PPA. This is necessary for Nvidia GT 6xxM cards. It may be optional for the GT 4xxM and GT 5xxM series. When in doubt, just install it:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates


  • Update your apt-repos:

sudo apt-get update

  • Install Bumblebee using the proprietary nvidia driver:

sudo apt-get install bumblebee bumblebee-nvidia


  •  Make sure the right headers for your kernel are installed

sudo apt-get install linux-headers-$(uname -r)


  • Install the Nvidia GeForce driver 310.14 experimental driver (via the 'updates' repository):

sudo apt-get install nvidia-experimental-310 nvidia-settings-experimental-310


  • Configure Bumblebee to use nvidia-experimental-310.

Open "/etc/bumblebee/bumblebee.conf" as root with a text editor: 
sudo scratch-text-editor /etc/bumblebee/bumblebee.conf

And change the following:
- on line 22, make sure "Driver=" is set to "nvidia", like this:
Driver=nvidia
- change the "KernelDriver=" (on line 47) to "nvidia-experimental-310", like this:
KernelDriver=nvidia-experimental-310
- change "LibraryPath=" (on line 51) to "/usr/lib/nvidia-experimental-310:/usr/lib32/nvidia-experimental-310", so it looks like this:
LibraryPath=/usr/lib/nvidia-experimental-310:/usr/lib32/nvidia-experimental-310
- change the "XorgModulePath=" (line 54) to "XorgModulePath=/usr/lib/nvidia-experimental-310/xorg,/usr/lib/xorg/modules" so it looks like this:
XorgModulePath=/usr/lib/nvidia-experimental-310/xorg,/usr/lib/xorg/modules


  • Logout and log back in



  • Optional: install primus (this should even give you better performance than optirun with bumblebee)

sudo add-apt-repository ppa:zhurikhin/primus
sudo apt-get update
sudo apt-get install primus


  • Change primus script:
sudo scratch-text-editor /usr/bin/primusrun

And change the following:on line 16: export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/lib/nvidia-experimental-310/libGL.so.1:/usr/lib32/nvidia-experimental-310/libGL.so.1'}
on line 27: /usr/lib*/nvidia-experimental-310*|'') # nvidia is used by default



  • Test your fresh installed bumblebee or optimus with glxspheres: 

optirun glxspheres
primusrun glxspheres