A Noob’s Guide to Installing NVIDIA Optimus Driver in Ubuntu (Bumblebee)

When NVIDIA Optimus technology first seen the light, it wasn’t compatible with Linux. Many solutions to this problem appeared then. Using Bumblebee is one of them. In this post I am going to show you how to do that.


Optimus Technology

As you can see in the comments bellow, the steps in this tutorial don’t work in some cases. You can follow it at your own risk.

For people who don’t know what “NVIDIA Optimus” is, I advise you to read this: http://www.nvidia.com/object/optimus_technology.html. You also need to know that “Discrete GPU” means NVIDIA graphics card.

To make things clear, we’re going to install Bumblebee in addition to some other “important packages”, and we’re going to do this through some PPA repositories.

Firstly, add the repositories, then update:

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

sudo add-apt-repository ppa:bumblebee/stable

sudo apt-get update

The first one contains NVIDIA drivers, the second one contains Bumblebee files.

Secondly, install the “important packages” :

sudo apt-get install linux-source linux-headers-generic

Finally, install Bumblebee and the NVIDIA driver:

sudo apt-get install bumblebee bumblebee-nvidia

That’s all; but you need to restart you machine before doing anything else. After that, you will be able to run programs using your discrete graphics card. For example, let’s run Firefox using the discrete GPU:

optirun firefox

Using the CLI is awesome, especially when the background is black and the text is green, if you see what I mean. However, some people don’t like it. Let’s add a graphical user interface (bumblebee-ui) then.

First, install git, because the bumblebee-ui project doesn’t have a Launchpad PPA

sudo apt-get install git

Then, create a folder named git and navigate into it:

mkdir git

cd git

Finally download bumblebee-ui files and install it:

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

cd bumblebee-ui

sudo ./INSTALL

That’s all. After restarting you computer, you will see a an indicator that allows you to to run programs using NVIDIA GPU without calling any command.

Written by Mohamed

Mohamed, the founder of FollowTheGeeks.com, is a 20 years old fella from Morocco

This article has 66 comments

      • Toran Reply

        I have since made a github account and now it doesn’t ask for it but I think it said:
        Cloning into ‘bumblebee-ui’…
        Username for ‘https://github.com':

        • Mohamed Semlali Reply

          Sorry, I don’t see what may be causing this problem. If it helps, here’s the normal output:
          Cloning into ‘bumblebee-ui’…
          remote: Counting objects: 308, done.
          remote: Compressing objects: 100% (143/143), done.
          Receiving objects: 100% (308/308), 107.95 KiB | 44 KiB/s, done.
          Resolving deltas: 100% (179/179), done.
          remote: Total 308 (delta 179), reused 284 (delta 155)

          it “normally” doesn’t ask for identification since you only want to download files from that repository.

          • Toran

            Okay, thanks for you help. Since making a git hub account and going through their set-up I downloaded everything fine with out prompting for Username or password, although I can’t be sure if it was this that fixed it.

  1. Aum11 Reply

    Thanks so much Mohamed. I have been trying for days to get nvidia gtx 670m working and Your guide did the trick, on Mint 15. Cheers

  2. Aum11 Reply

    Thanks so much Mohamed. I have been trying for days to get nvidia gtx 670m working and Your guide did the trick, on Mint 15. Cheers

  3. Aum11 Reply

    Even though everything seems to be set up and I am using bumblebee to start VLC and others,I am confused by the fact that when I go into Driver Manager, it shows that there are no proprietary drivers in use? Why aren’t the Nvidia drivers shown?


    • Mohamed Semlali Reply

      Driver Manager shows that because Ubuntu detects only the integrated GPU. and even though it detects NVIDIA GPU, as it was the cas when there was no Optimus Technology, if you install the driver without using Driver Manager, it will tell you that the detected drivers are not installed.

      • Razak Teridi Reply

        yes i did, but i cannot see the indicator..i am using ubuntu 12.04 LTS, i hv tried many times to install the nvidia drivers but failed to. Yours bumblebee installation is very easy! KUdoss!! but then, i cannot find the indicator ..even after rebooting.

  4. Owl Reply

    I came across this and don’t quite understand how it is used. I have an Acer Aspire Revo running Ubuntu, and it has nVidia graphics and the nVidia driver is installed. If I play video using XBMC or the MythTV frontend it plays smoothly, but if I try to play video in a browser window (from YouTube, for example) it drops frames like crazy, more like watching a fast slide show than a video. If I followed your procedure would it fix that issue, or is this just something specifically for laptops?

    By the way, your RSS feed button isn’t working – it tries to go to http://followthegeeks.com/a-noobs-guide-to-installing-nvidia-optimus-driver-in-ubuntu/%3C?php%20bloginfo(%27rss2_url%27);%20?%3E which apparently is not a valid link.

  5. Deve Reply

    “even though it’s said that 319.12 beta driver does the work, it still not stable”

    Why do you think it’s not stable? Did you try to run it?

    It’s a little hard to run on stable system at this moment – many packages in new versions – xrandr, xserver, kernel, also some -dev libraries if you compile it yourself. Then modified xorg.conf etc.

    But I use nvidia drivers with official optimus support on my laptop and I didn’t notice that it’s not stable.

    And with optimus from nvidia drivers you have:
    – better performance
    – vdpau
    – opengl > 2.0 (primus doesn’t support many extensions. virtualgl supports them, but it’s slow)

    • Mohamed Semlali Reply

      I didn’t try it indeed, but most people who have said bad things about it. I’ll try it and remove that sentence if it works fine for me. Thank you.

  6. Joe Wang Reply

    didn’t its so easy to install optirun and bumblebee right now, thank you Samlali

  7. nyancica Reply

    hi, i’m stuck at sudo apt-get install bumblebee bumblebee-nvidia…it sais bumblebee and bumblebee-nvidia packages cannot be found..can you help me ples?

  8. Dudko Reply

    It is not working for me :( After all, when I type “optirun firefox” it says:
    /usr/bin/vglrun: 303: exec: firefox: not found

    I tried it on many other programs, but still :(
    Help ?

      • Dudko Reply

        I installed it, but when I type “primus firefox” it says:
        No command ‘primus’ found, did you mean:

        Command ‘primes’ from package ‘bsdgames’ (universe)

        primus: command not found

          • Dudko

            /usr/bin/primusrun: line 52: exec: firefox: not found

            Doesn’t work. :(

          • Gustav

            This is from the Bumblebee install;
            “If you want to use primus, you need to install it and set Bridge=primus in bumblebee.conf or use optirun -b primus. You also need to install primus-libs-ia32 if you want to run 32-bit apps.”

            Hope it helps :)

  9. Jan Lennart Reply

    Hi, I am using the latest Xubuntu. Optirun works but I cannot see any indicator after installing the bb UI. I did of course do a restart.

      • Lennart Pettkus Reply

        If I launch Xfce session there is. I have been able to launch the indicator however I cannot configure any of the apps. I can check off any app but thats it and the next time i open the app settings the mark is gone.

  10. bv Reply

    thank you for the guide but I get this error message (just followed the steps after a fresh installation of ubuntu 12.04 on a asus 1215n):

    v@v-laptop:/usr/lib$ optirun glxgears
    [ 716.931111] [ERROR]Cannot access secondary GPU – error: [XORG] (EE) No devices detected.

    [ 716.931238] [ERROR]Aborting because fallback start is disabled.

  11. Pingback: Nvidia GTX 765m Optimus tech on ubuntu 12.04 | WyldePlayground.netWyldePlayground.net -

  12. Pingback: Nvidia GTX 765M with Optimus Unclamed | Ubuntu InfoUbuntu Info

  13. Pingback: Nvidia GTX 765M with Optimus Unclamed | WyldePlayground.netWyldePlayground.net -

  14. Pingback: Nvidia GTX 765m Optimus tech on 12.04 | Ubuntu InfoUbuntu Info

  15. Pingback: Nvidia GTX 765m Optimus tech on 12.04 | WyldePlayground.netWyldePlayground.net -

  16. Gyan Reply

    How can I tell that bumblebee/optimus is actually working and what I am seeing being displayed is coming from the discrete gpu rather than from the Intel gpu?

  17. Shams Reply


    i have install bb following the instruction , now i can not run my blender 2.69 , the message was blender closed unexpectadly

    please help

  18. krish Reply

    hi mohamed,i do same as you said but after restarting,there is nothing from which i can switch bw gpu’s ,pls help……..

    • Mohamed Semlali Reply

      at the top right of the screen you’ll see a bee’s eyes icon, click it, chose configure apps then choose the apps you want to run using nVidia GPU then click Apply. These apps will appear in “Prefered apps” and you can launch them using Nvidia gpu. You can also do this through the terminal by typing “optirun” (no quotes) followed be the name of the app. For example “optirun firefox”

  19. Pablo Viollier Reply

    Hi, does it work with Ubuntu 13.04 or is it better to use Ubuntu 12.04LTS? Thanks for the guide :)

  20. Sidharth D Reply

    Is it safe to install both the NVIDIA binary driver and Bumblebee?
    If so, is there any advantage in doing it?

    • Mohamed Semlali Reply

      NVIDIA binary driver needs a recent Kernel, I don’t think it will work fine on 12.04. Besides, it allows you to use vdpau, which is not easily possible using Bumblebee. however, installing it alongside Bumblebee is a bad idea.

  21. Luke Swart Reply

    Hi Mohamed,

    I followed these instructions exactly and rebooted my computer. However, running “optirun firefox” gave me the error:
    [ 145.248939] [ERROR]Cannot access secondary GPU – error: [XORG] (EE) No devices detected.

    Do you know what went wrong? Here is my setup:

    ThinkPad W520 (Intel 3000 and Nvidia 1000M chipset)

    OS: Ubuntu 12.04.3.

    BIOS graphics card setting: Optimus

    BIOS OS Optimus auto-detection: disabled

    I also have a post regarding this problem here:


    Thank you,

  22. Pingback: Linux Ubuntu: External monitor display configuration on Thinkpad W520 with 12.04CopyQuery CopyQuery | Question & Answer Tool for your Technical Queries,CopyQuery, ejjuit, query, copyquery, copyquery.com, android doubt, ios question, sql query, sqlite

  23. Lalo Aguilera Reply

    I have been trying 1 year this. Seriously thank you. It worked perfectly in gtx 670m

  24. Mick Reply

    Awesome! This appears to work. For the first time I’m able to see performance improvements between ‘glxspheres64′ and ‘optirun glxspheres64′. Thanks for the simple write-up.

  25. Munesh Chauhan Reply

    I installed bumblebee and upgraded to nvidia 331 driver version. Now I am faced with a blank screen on reboot. I plan to run CUDA on my Acer V3-571G laptop. Before rebooting all went well and cuda code was compiling. Kindly help.

  26. norm Reply

    Thanks for the tutorial. I’m running 13.10 (x86_64) on a Dell XPS15R (i7-3612 ivybridge) with nvidia GT-640M, using the laptop internal display at 1920×1080 plus a second display (2560×1600) connected via the mini-DP (xorg.conf is non-existent). After installing bumblebee as shown above just now (which installs nvidia 304.116 driver) , the 2nd display is dead. Is there a way to configure bumblebee to re-activate the 2nd display? I know bumblebee is working, because optirun made glxgears go from 60fps to 1065 FPS and glxspheres64 from 66 to 180 Mpixels/sec. Thanks.

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>