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

7 opmerkingen:

  1. sudo: add-apt-repository: command not found
    is waht it says when i copy past the first command

    BeantwoordenVerwijderen
    Reacties
    1. You inserted the command without the colon right? :) Just copy and paste the entire command in your terminal so you can't miss! ;)

      Verwijderen
  2. thank you! I successfully install bumblebee to eOS on my ASUS laptop A55V. I get a version of the nvidia-331 driver. and I can check it using this command: primusrun / opt/VirtualGL/bin/glxspheres64 after i install VirtualGL first

    BeantwoordenVerwijderen
    Reacties
    1. Hey if it's not too much trouble, can you list every step you've done to elementaryOS. I've been trying for days to make it work and I just can't. Even this guide is close to the solution I need but I don't know what to substitute for nvidia-experimental-310. Thanks a bunch.

      Verwijderen
  3. Hi, thanks for the installation guide, bumblebee and the "nvidia-331-updates" installed however when I go to run "optirun glxspheres" an error appears asking whether bumblebee is running. I checked the files you instructed us to alter with paths to the driver installation folder and they appear to be correct however when I check to see whether or not the 331 drivers are being used another error returns saying the 331 drivers cannot be found. I checked my kernel headers and they appear to up to date. I'm kind of stuck, am I running the wrong Linux kernel (3.14.13 is what I've updated to) or should I be looking to another set of nvidia drivers? Do I need to use Xorg edgers? Thanks again for the guide, I'm sure I'm doing something pretty basic wrong I just can't work out what.

    BeantwoordenVerwijderen
  4. how do i know which driver is best for my lap?? nvidia 310 or 319 or the latest according to the official site 346???? Thanks in advance :-)

    BeantwoordenVerwijderen