How to set up nVidia Optimus/Bumblebee in 14.04

126,015

Solution 1

To install bumblebee in Ubuntu 14.04, run these commands in terminal

sudo apt-get install bumblebee bumblebee-nvidia primus nvidia-331

Now you have to install Bumblebee GUI to manage apps to be opened using nVidia. Here is the instructions:

Install Python App Indicator:

sudo apt-get install python-appindicator

Install Git:

sudo apt-get install git

Make a directory for git:

mkdir git && cd git

Check out the repository:

git clone https://github.com/Bumblebee-Project/bumblebee-ui.git
cd bumblebee-ui
sudo ./INSTALL

Go to Startup Applications and add bumblebee-indicator

Now reboot.

Solution 2

I have been facing the same issue for quite some time. I had to reference many article online however I never got any help. So I wrote a blog post of my own and I got very positive response. Many people haver confirmed that the post was helpful. I have refined the blog post to make it even easier to use. One could easily just copy and paste the commands from the blog and It works fine.

I have a Lenovo Z5070 Laptop with an Nvidia 820M and I have tested the solution many times by Installing various versions of Ubuntu 14.04 14.10 and now 15.04. I just wanted to share how I got the issue fixed.

Basically Installing Bumblebee with Nvidia is the trickiest with Ubuntu because of the way Bumblebee works as a Technology. Ideally Just Installing the Software should have been enough.

It is enough if you are using the Nvidia-Current Drivers which are at version 304 I guess. However if you are installing other version you need help for sure. That is where the below blog post can help.

Please refer to Here!

One of my previous Posts got deleted because the Compete solution was not posted. However I am not a jerk or some spammer. Below is the 100% Technical Details of Implementing the solution.


The official Repository of Ubuntu has only old and dated drivers. I don't use that myself and would suggest you do the same if you want the latest Nvidia Driver without any problems.

Steps:-

  1. First step after installing Ubuntu is to install all updates. You may use the software updater or simply run:

    sudo apt-get update && sudo apt-get upgrade
    
  2. Add the Xorg-edgers ppa using

    sudo apt-add-repository ppa:xorg-edgers/ppa 
    

    and then

    sudo apt-get update
    sudo apt-get upgrade && sudo apt-get dist-upgrade
    

    This is the most Important step. If you miss this you will see a black screen after reboot. Please do this as we are using the xorg-edgers ppa. We need to ensure all packages required for bumblebee and nvidia are taken from the ppa.

  3. Now Install bumblebee and Nvidia drivers using

    sudo apt-get install bumblebee bumblebee-nvidia primus nvidia-349
    
  4. Add the current user to the bumblebee security group.

    sudo adduser $USER bumblebee
    

    For Ubuntu 15.04 only: you need to manually enable to bumblebee daemon using

    sudo systemctl enable bumblebeed`
    
  5. This will take care of the Installing the required software on your system. We need to configure it. I can assure you if you followed these steps so far then configuring should be a breeze.

    We start by enabling bbswitch and intel i915 Driver.

     sudo -H gedit /etc/modules 
    

    Ubuntu 15.04: the file is /etc/modules-load.d/modules.conf

    Add these two lines to it

    i915
    bbswitch
    
  6. Edit the bumblebee configuration file.

    sudo -H gedit /etc/bumblebee/bumblebee.conf
    
    1. line 22:

      Driver=nvidia
      
    2. line 55:

      KernelDriver=nvidia-349
      
    3. line 58:

      LibraryPath=/usr/lib/nvidia-349:/usr/lib32/nvidia-349
      
    4. line 61:

      XorgModulePath=/usr/lib/nvidia-349/xorg,/usr/lib/xorg/modules
      
  7. In addition to this there is another file that needs to edited.

    sudo -H gedit /etc/modprobe.d/bumblebee.conf
    

    Add this line at the end.

    blacklist nvidia-349
    

    Now you may reboot. After reboot, check using sudo apt-get install mesa-utils if mesa-utils is not already installed.

    primusrun glxinfo | grep OpenGL
    

    This should tell you that nvidia-349.16 driver in use.

Please note that nvidia-349 is the latest driver at the time of writing this. You may use another driver version, replacing the appropriate number when needed (take special attention when editing the files).

Solution 3

I just install the NVIDIA GTX880M from my ASUS ROG G750JZ via this url (french site) Ubuntu FR forum

Short version:

sudo apt-get install nvidia-331 nvidia-settings nvidia-prime mesa-utils vdpau-va-driver

For unity 8 in Ubuntu

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install prime-indicator
sudo reboot

After reboot, you can see the logo from intel or nvidia in your system bar indicator and you can switch between both of them.

You can test your video card speed with glxgears.

  • My Intel card return +/- 60 fps
  • My Nvidia card return +/- 20.000 fps :)

If you encounter the problem with prime like an empty popup error in nvidia-settings panel you can see the bug in Launch Pad 1310023. I have encounter a similar problem and I can correct them with that:

sudo update-alternatives --config x86_64-linux-gnu_gl_conf
sudo ldconfig -n
sudo update-initramfs -u

then reboot and see if it works

Solution 4

In order to get bumblebee too work you need to install it, just like it is mentioned on the wiki and on other answers here.

sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic

However, if your card is not supported by the default drivers (304 at the time of writing this) you will need to take additional steps. I am writing this here because after many hours of frustration I finally found an answer.

First of all, you must install the latest drivers sudo apt-get install nvidia 346 at the time of writing.

Afterwards, you must edit the file /etc/bumblebee/bumblebee.conf and replace all instances of "nvidia-current" with "nvidia-346". This too is covered in other answers.

This, however, will still make the machine boot into a black screen. The problem is that the nvidia module is being loaded before the intel one. Bumblebee creates a file /etc/modules/modprobe.d/bumblebee.conf that blacklists nvidia-modules. This file, however, hasn't been updated in a while. Therefore, you must add the following to the end of this file:

# 346
blacklist nvidia-346
blacklist nvidia-346-updates
blacklist nvidia-experimental-346

After a reboot, you should be good to go. Of course, don't forget to change "346" to whatever driver version you are using.

I have opened a bug in launchpad, and hopefully this will be fixed soon.

Solution 5

I will dare to not to answer the question directly but, to provide an alternate way. I made a fresh install of Ubuntu 14.04 last week, after it was released.

And I just followed the steps described here

For short I just followed these steps:

sudo apt-get purge bumblebee*
sudo apt-get purge libvdpau-va-gl1
sudo apt-get install nvidia-319 nvidia-settings-319 nvidia-prime

Even though there is a newer driver available, the last version of nvidia-settings is 319, so I followed the exact steps, but make sure you read the complete article as other steps are suggested in case of errors.

:)

Share:
126,015

Related videos on Youtube

Pavak Paul
Author by

Pavak Paul

Updated on September 18, 2022

Comments

  • Pavak Paul
    Pavak Paul over 1 year

    The previous methods i have used to set up Bumblebee on 13.10 based distributions is not working under Ubuntu 14.04 . How can I set up Bumblebee and Bumblebee GUI in Ubuntu 14.04 ?

    • Admin
      Admin almost 10 years
      OK thanks. Actually this question was to help others that I myself answered it. I'll check the new procedure you told. Thanks.
    • Admin
      Admin almost 10 years
      user2417946 Thanks Works on my clevo 170sm nvidia 780m, Mint 17 and easer than bumblebee. Only wished I did not have to restart X to change the display
    • Admin
      Admin almost 10 years
      But Bumblebee is better and actually does for what the optimus technology is created.
  • modulitos
    modulitos about 10 years
    Any suggestions on how to get multiple monitors working from here?
  • Pavak Paul
    Pavak Paul about 10 years
    I had connected a TV through my HDMI output. I was running through Intel GPU. But I was able to play games through the nVidia GPU. Bumblebee is like what happens with nVidia optimus in windows. If you want to run your whole system there is some packages called nvidia-prime (you need to uninstall bumblebee for that). Google for more info. But I strongly recommend using bumblebee because primus causes maximum heat and eats all the battery. Bumblebee is on demand, only turns on the GPU when you need it.
  • Pavak Paul
    Pavak Paul almost 10 years
    OK thanks. Actually this question was to help others that I myself answered it. I'll check the new procedure you told. Thanks.
  • Merlijn Sebrechts
    Merlijn Sebrechts almost 10 years
    @Monotasker, do you have any source for this claim? The only reason I use prime is because I can't get bumblebee to work anymore. I tried to get more information about prime/bumblebee's future, but the only decent thing I can find is this: github.com/Bumblebee-Project/Bumblebee/wiki/…
  • Pavak Paul
    Pavak Paul almost 10 years
    I am running Bumblebee in my Oikyo Linux 2 (based on 14.04) without any trouble with the Bumblebee GUI.
  • monotasker
    monotasker almost 10 years
    This may have been a misunderstanding. I've seen a lot of posts saying that Bumblebee didn't work on 14.04 and offering Prime as the alternative. But it sounds like this may be inconsistent. I'll remove the claim in my answer.
  • Pavak Paul
    Pavak Paul almost 10 years
    Actually I did a lot of researches to get Bumblebee to work. The previous methods I i used in Oikyo Linux 1/ 13.10 didn't work for Oikyo Linux 2/ 14.04 .
  • Pavak Paul
    Pavak Paul almost 10 years
    @monotasker , I did some more research in how things work and yes, prime is better where bumblebee is a hack.
  • codeape
    codeape almost 10 years
    On my laptop, (supposedly) the intel card is wired to the VGA output and the nvidea card is wired to other outputs displayport, hdmi etc. (I have a total of 6 external ports when using a docking station). My question: If I use bumblebee, will I be able to drag a intel window to an external monitor connected w displayport?
  • Edward Torvalds
    Edward Torvalds about 9 years
    previously (when I didnt used this method) when nvidia proprietary driver was selected in Additional Drivers, Graphics used to be nvidia in System Settings > Details but now it is Intel Haswell. Also nvidia settings in Nvidia Control Panel is not showing, this mean nvidia graphics card is not being used. what to do?
  • Lars Nyström
    Lars Nyström almost 9 years
    WARNING: If you do this without being absolutely certain your computer has an Optimus GPU and an integrated GPU, you might have to reinstall your entire OS. Don't do this on a production system. See my question: askubuntu.com/questions/621669/…
  • Pavak Paul
    Pavak Paul almost 9 years
    @LarsNyström , You should not use Bumblebee anymore.
  • Santiago
    Santiago over 8 years
    Hi, when I try to install in step 3: sudo apt-get install bumblebee bumblebee-nvidia primus nvidia-349, I get the message: Package nvidia-349 is not available, but is referred to by another package.
  • Rajat Pandita
    Rajat Pandita over 8 years
    You need to launch nvidia-settings using this command. optirun -b none nvidia-settings -c :8 if you try launching it otherwise it does not show you correct information, Try this and let me know !
  • Santiago
    Santiago over 8 years
    Hi @RajatPandita thanks for your answer! With that command, now I get nvidia-settings with all the menus and options. However, I still have no external monitor output. In X Server Display Configuration, when I click on "Detect Displays", nvidia-settings just shuts down.
  • Yamaneko
    Yamaneko over 8 years
    Hi @RajatPandita! Just one question, why do we have to add i915 and bbswitch to modules.conf?
  • Rajat Pandita
    Rajat Pandita over 8 years
    Because for some reason sometimes the i915 module for intel Graphics driver does not load automatically and you end up with a Black Screen. So we add i915 to ensure that we don't get a black screen..... for bbswitch, that also is needed to be loaded at boot so that by default the Nvidia Card stays off and bbswitch ensures that once primusrun/optirun exit, the card again goes to an Off state... Tecnically bbswitch module does the switching action