Nvidia Optimus on Ubuntu 12.04

Nvidia Optimus is a neat solution to the problem of power consumption vs. 3D performance in notebook computers – the computer comes with two graphics chips, an “integrated graphics package” – the Intel GMA embedded graphics and a “discrete graphics package” – the Nvidia chip. The setup works by running your normal windowing UI on the integrated graphics, only powering on the discrete graphics when you want to play a 3D game or something like that.

Recently I had the fortune to work on a Lenovo T420 laptop1 that has this setup, and it works very well on MS-Windows with the Nvidia Optimus driver – you get battry life around 10 hours with the 9 cell battery.

Unfortunately I spend most of my day in Linux and because Nvidia does not support Optimus on Linux, you have the poor choice of either running everything on the Nvidia chip – decreasing battery life to around 4 hours if you’re careful, or disabling the Nvidia chip completely.

The solution comes from the Bumblebee project – a software suite to handle the switching between the Nvidia discrete graphics and the embedded Intel chip.

The setup is pretty simple to understand (though I suspect under the hood there are many problems to be solved): A service runs and waits for users to ask for 3D accelerated graphics. When a user starts a program using the special command optirun, the service loads the Nvidia driver, starts an X server using the discrete graphics (with the display disconnected from the actual screen) and runs the specified program on that “background” X server. Then it copies the visuals from the program that is rendered using the discrete graphics to a window on the main X server. When the program terminates, the service closes the secondary X server, removes the driver and powers down the graphics card – putting us back into the ~10 hours battery life.

The Bumblebee software had some problems in the past, but the current version – 3.0 – looks very good. There are a few seconds of delay when you launch the application (setting up the driver and X takes some time), but performance is about what you’d expect when running directly on the hardware. All this without any configuration – that is if you are running on the stable Ubuntu version.

As I can’t leave well enough alone, and whenever someone says “alpha”, I say – “I wants”, I’m running the current Ubuntu 12.04 alpha (which is not so bad – due to be released in a couple of months, it works very well). And of course Bumblebee doesn’t work properly here.

So this is what I had to do to get it running:


These instructions assume you are doing everything in a command line. If you are not comfortable with the command line, this guide is not for you – go away.

  1. We will start by installing Bumblbee itself and its dependencies. We will need to add their PPA2 to the Ubuntu software sources list:
    sudo add-apt-repository ppa:bumblebee/stable
    Unfortunately the project has a repository for Ubuntu 12.04, but at this point in time it does not include all the needed packages. I had to edit the source list file and add the 11.10 repositories as well before installation could complete – open the file /etc/apt/sources.list.d/bumblebee-stable-precise.list for editing as root, for example:
    sudo gedit /etc/apt/sources.list.d/bumblebee-stable-precise.list
    and duplicate the two lines found there, changing the word precise to oneiric in the duplicates. Save and exit the editor, then run these:
    sudo apt-get update
    sudo apt-get install bbswitch-dkms bumblebee bumblebee-nvidia virtualgl-libs:i386 libgl1-mesa-glx:i386 libc6:i386
    sudo usermod -a -G bumblebee $USER

    The last line adds the current user (the one you are logged in as) to the “bumblbee” user group – only users who are part of this group may use the Bumblebee service. If you have more users that you want to be able to play 3D games, then you need to add them as well.
  2. The Bumblebee Project recommends Ubuntu users to install the “X-Swat” x-updates PPA, but this isn’t available for 12.04 users, and we are already running the latest X anyway, right? After bumblebee didn’t work for me, I went to the next best thing – the xorg-edgers repository. A word of warning – this is a set of highly experimental software – if it works for you, count yourself lucky and if it doesn’t – don’t complain. To install it, type:
    sudo apt-add-repository ppa:xorg-edgers/ppa
    sudo apt-get update
    sudo apt-get dist-upgrade -y
    At this point most likely your kernel and other important software packages have been upgraded, so its a good idea to reboot.
  3. After you come back from the reboot, the standard Nvidia driver will not work, because of an incompatible ABI3 version. Not to worry, its time to recompile a new Nvidia driver. Start by removing your old one with:
    sudo apt-get purge nvidia-current
    Now to get the most up to date Nvidia driver package to rebuild a driver that works with your latest Xorg and kernel, create a new directory to hold the Nvidia package sources and change into it, and type:
    sudo apt-get install build-essential checkinstall -y
    sudo apt-get build-dep nvidia-current-updates -y
    apt-get source nvidia-current-updates
    Now with the source downloaded and all dependencies installed, we can build a new driver and install it:
    cd nvidia-graphics-drivers*
    dpkg-buildpackage -us -uc -nc
    cd ..
    sudo dpkg -i nvidia-current-updates_*.deb
    If all went well, you have your new Nvidia driver instaled. Lets see if it loads Ok:
    sudo modprobe nvidia_current_updates
    If you get no error, then we can go to the next step.
  4. The Bumblebee configuration must be modified to work with all this cutting edge stuff, so lets start by turning off the Bumblbee service:
    sudo stop bumblebeed

    Now you need to edit the Bumblebee configuration file. Use your favorite text editor to open /etc/bumblebee/bumblebee.conf as root, for example:
    sudo gedit /etc/bumblebee/bumblebee.conf
    . This is a standard INI filewith a lot of comments to help you figure out what is going on in here, and we will need to do some changes to (a) disable auto-detection and force Nvidia mode and (b) help Bumblebee locate the drivers for the Nvidia graphics. Make these changes:

    • In the [bumblebeed] section, set Driver=nvidia
    • In the [driver-nvidia] section, set KernelDriver=nvidia_current_updates and in both LibraryPath and XorgModulePath change nvidia-current to nvidia-current-updates.

    Save the file after all the changes have been complete, and start the service again:
    sudo start bumblbeed

  5. At this point, Bumblebee should be ready to do some damage. The recommended way to test it is to run
    optirun glxspheres
    Give it a few seconds to launch the window (the screen may black out for a bit, don’t worry about it). When the window appears, it should show a graphical demo and a frame per seconds counter at the bottom left corner. On my system it shows a respectable 86 frames per seconds (vs 2 frames per seconds on the embedded Intel chip). If the glxspehere window doesn’t come up, and you get errors from the optirun command, look in the system log file /var/log/syslog for lines from bumblebeed. Also if you haven’t rebooted your computer since you built the Nvidia drivers, it might be a good idea to try that as well.

Running games with optirun is pretty straight forward – either invoke them manually or edit their .desktop files to add the optirun command. I’ve also used this in MS-Windows games running under wine (I recommend using PlayOnLinux – its a beautiful piece of work), and they work perfectly well.

Best of luck, and let me know if it works or if it doesn’t.

Enhanced by Zemanta
  1. with an amazing 1600×900 screen, what they call “HD+”. Truly a work of art []
  2. Private Package Archive []
  3. Application Binary Interface []

96 Responses to “Nvidia Optimus on Ubuntu 12.04”

  1. Mike Wallace:

    Great guide, saved me a lot of digging. Just a note that I had to modprobe from / and use sudo to get the new module to load. Otherwise spot on.

    I also added both repositories for Bumblebee and Edgers and had the problem of not being able to install bumblebee becuase of a broken dependency on nvidia-current. I fixed that by ppa-purging the Xorg-Egers repository and picking up at the start

    sudo apt-get install ppa-purge

    • Oded:

      Thanks for the correction – I fixed it in the article.

      I’ve seen some comments about ppa-purge in the Bumblebee installation instructions, but I didn’t have it installed (I actually didn’t understand it is something that I need to install until your reply – I thought its just something that does no longer exist in 12.04 🙂 ), and it worked fine for me without doing any of that. But thanks for sharing another success story!

  2. Mike:

    Hi,

    Just wanted to say thank you for great tutorial.
    It works well on my 64 bit Ubuntu 12.04. I do not know if it works well too on 32 bit as I had problem. Good work !!!

    Mike

    • Oded:

      When you say “32 bit”, you mean Ubuntu 32 bit, or running 32 bit applications on Ubuntu 64 bit?

      On Ubuntu 64 bit I’m running 32 bit applications on Wine and it works well. There are some concerns on getting this to work, specifically the virtualgl i386 packages which are listed in the apt-get commands in the article.

  3. yinruzhi:

    hi, i had a problem
    after the command “sudo modprobe nvidia_current_udpates”
    there is an error : FATAL: Module nvidia_current_udpates not found
    how can i solved it? thx

  4. zalesz:

    I’m having the same problem, also it’s good to mention that running upgrade, after adding edgers repo, leaves you without bumblebee-nvidia. I will give info if this worked out in the end

  5. Pranav:

    Hi,
    I have a 1GB NVIDIA GT525M optimus card. I followed all the steps and would like to report that everything went smoothly.
    My only concern is when I run “optirun glxspheres”, I get only about 16 frames/sec. This sounds a little low to me as you are saying you were getting 86fps. I don’t know exactly which monster card you are using 🙂 but 16 sounds a low number to me.

    Can you comment on this please?

    • Oded:

      I’m using a Quadro NVS 4200M, which is something like a GTX 520. 16 sounds low but its because the glxspheres is a really tough benchmark. I believe it should still translate to a good gameplay.

      How much FPS do you get without optirun?

      • Pranav:

        I get about 1.8fps. I guess 16 is much better than that…:) I have one more question. Have you tried this method of installing bumblebee on a 32 bit linux system? I think I may have to shift to 32 bit because I am having some weired problem with opening video files. Everytime, I do a fullscreen to a video, it crashes my compiz… 🙁

        • Oded:

          12.04 is not stable 🙂 you might have better luck after updating.

          Regarding the FPS you get, 1.8fps means you are not running on the Nvidia card.

          I haven’t tried to install on 32bit Linux and I don’t have any plans to – sorry. This is basically my work laptop so once I got it going, I’m not going to play with it much more because I need to get some work done 🙂

          • Pranav:

            I completely understand that. I was just asking if you have tried installing it. Also my issue with compiz now seems (getting there) better with newer and newer updates for 12.04
            So, I am guessing it had nothing to do with the card.

        • Dampe:

          I’ve got a 1GB GT520M running Ubuntu 12.04 64bit stable release, and pulling 90 frames. Something isn’t right for you I don’t think.

  6. Vlad:

    Tnx you so much! It’s really work

  7. shin:

    i have some problem at the last point ‘optirun glxspheres’ after command it show

    ERROR (593): Could not obtain RGB visual with requested properties

    how can i solved these? Thank you.

    • Oded:

      It sounds like you are not using the correct virtualGL piping method. Edit your bumblebee configuration file and set something else for the VGLTransport setting. I use

      VGLTransport=proxy

      • Allen:

        I to have the same problems with RBG visuals. I edited bumblebee.conf, the default value was proxy, so I tried rbg and xv and a couple other but still got the same error mesage

        $ optirun glxspheres
        Polygons in scene: 62464
        ERROR (593): Could not obtain RGB visual with requested properties

        Thanks for the great writeup. In sudo start bumblebeed ( you did drop an e.) I had to go through your example twice to get it right, my own fault…

  8. Moustafa:

    Thanks for the article. I am getting an error though when I try to build the nvidia driver by running:

    dpkg-buildpackage -us -uc -nc

    Here’s the error:

    dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

    Any idea what might be the problem? I’m running 32 bit Ubuntu 12.04.

    • Oded:

      I’m not sure what that error means, except that the build could nor be completed. There should be a more detailed error message above that.

      • Jan:

        I have the same problem

        after
        dpkg-buildpackage -us -uc -nc

        i get this:

        cp: cannot stat `./NVIDIA-Linux-x86_64-295.20-no-compat32/nvidia-current-updates-settings.png’: No such file or directory
        dh_install: cp -a ./NVIDIA-Linux-x86_64-295.20-no-compat32/nvidia-current-updates-settings.png debian/nvidia-current-updates//usr/share/pixmaps/ returned exit code 1
        make: *** [binary-install/nvidia-current-updates] Error 2
        dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

        • Mohsen:

          Run it in super user mode:
          sudo dpkg-buildpackage -us -uc -nc

          • Jim:

            I’ve got the same error, running it as Super user doesn’t help

            cp: cannot stat `./NVIDIA-Linux-x86_64-295.49-no-compat32/nvidia-current-updates-settings.png’: No such file or directory
            dh_install: cp -a ./NVIDIA-Linux-x86_64-295.49-no-compat32/nvidia-current-updates-settings.png debian/nvidia-current-updates//usr/share/pixmaps/ returned exit code 1
            make: *** [binary-install/nvidia-current-updates] Error 2
            dpkg-buildpackage: error: debian/rules binary gave error exit status 2

  9. Moustafa:

    Yea.. I noticed that when I run:

    “sudo apt-get build-dep nvidia-current-updates -y”

    apt-get changes the package to “nvidia-graphics-drivers-update” is that fine?

  10. OStanley:

    Thank you! It works fine on Dell Vostro 3750.

  11. Ben:

    Dude! really awesome! one thing that I got lost on was on step 6 “Save the file after all the changes have been complete, and start the service again:
    sudo start bumblbeed” should say: sudo start bumblebeed
    Great work!

  12. Nvidia Optimus no Ubuntu 12.04 « My Blog:

    […] eu tive a sorte de trabalhar em um laptop Lenovo T420 ( 1 ) que tem esta configuração, e ele funciona muito bem no MS-Windows com o driver Nvidia Optimus […]

  13. hari:

    very nice guide to get optimus working.i did everything as mentioned and got everything fine without any error.but finally when i run “optirun glxspheres” its trying to do the job ,but returning error “cannot access secondary GPU – error : x did not start properly”
    I’ve checked system log file.in that nvidia kernel module is able to start but bumblebee returning error “x did not start properly”

    help!!!

    thanks

    • Adam:

      I have a similar issue.

      This is what I get when I run optirun glxspheres (with and without sudo)

      ******
      brucey@brucey:~$ optirun glxspheres
      [ERROR]You’ve no permission to communicate with the Bumblebee daemon. Try adding yourself to the ‘bumblebee’ group
      [ERROR]Could not connect to bumblebee daemon – is it running?
      brucey@brucey:~$ sudo optirun glxspheres
      [ERROR]Cannot access secondary GPU – error: [XORG] (EE) NVIDIA(0): No display devices found for this X screen.

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

      I had a look in syslog and this is what it says

      ******
      Mar 13 18:16:15 brucey kernel: [ 113.993077] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 295.20 Mon Feb 6 21:07:30 PST 2012
      Mar 13 18:16:15 brucey acpid: client connected from 2197[0:1001]
      Mar 13 18:16:15 brucey acpid: 1 client rule loaded
      Mar 13 18:16:15 brucey AptDaemon.Worker: INFO: Finished transaction /org/debian/apt/transaction/d1a6dc73e53542be875b578bddceb75a
      Mar 13 18:16:22 brucey bumblebeed[997]: [XORG] (WW) `fonts.dir’ not found (or not valid) in “/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType”.
      Mar 13 18:16:22 brucey bumblebeed[997]: [XORG] (EE) NVIDIA(0): No display devices found for this X screen.
      Mar 13 18:16:22 brucey bumblebeed[997]: [XORG] (EE) Screen(s) found, but none have a usable configuration.
      Mar 13 18:16:22 brucey bumblebeed[997]: X did not start properly
      ******

      Thanks for your detailed tutorial, any insight into fixing this issue would be greatly appriciated

      Adam

      • hari:

        first try starting bumblebeed service again using

        “sudo start bumblebeed” or “sudo service bumblebeed start”.

        if this results error again, then it might be the problem with nvidia graphics driver installation.i recommend to purge the nvidia installation and go through the guide again.

  14. Pranav:

    I just did a partial upgrade on my 12.04 installation. I think it also upgraded the kernel version. Now, somehow, my wireless stopped working. Can this be something to do with “acpi” I know that bumblebee uses acpi call to turn off the card. Do I have to reinstall the nvidia driver?

  15. hari:

    thanks for the guide.i got it working 🙂

  16. TygerStar.net » Blog Archive » Habilitar Nvidia Optimus (Gráficos Híbridos) no Linux:

    […] Instalando no Ubuntu 12.04 […]

  17. Denis:

    i have a problem with the installing on step 3 “cd nvidia-graphics-drivers*
    dpkg-buildpackage -us -uc -nc”. cp
    Here is log:
    cannot stat `./NVIDIA-Linux-x86_64-295.33-no-compat32/nvidia-current-updates-settings.png’: No such file or directory
    dh_install: cp -a ./NVIDIA-Linux-x86_64-295.33-no-compat32/nvidia-current-updates-settings.png debian/nvidia-current-updates//usr/share/pixmaps/ returned exit code 1
    make: *** [binary-install/nvidia-current-updates] Error 2

    Help, plz!
    Thanks

  18. Jeremy:

    I have one major problem: Bumblebee is working fine, but if I log off I get an error that my graphics card isn’t configured and I can’t get to the log in screen

  19. aris:

    i had installed bubmlebee and from what i could understand everything was fine. then i tried to unistall the nouveau driver and work only with the nvidia.

    after i was trying to make my pc disable the card on boot using sudo tee /proc/acpi/bbswitch <<<0FF ass mentioned in bumblebee site.

    in the end when i run glxshperes i get strange stuff

    $ optirun glxspheres
    [ERROR]Cannot access secondary GPU, secondary X is not active.

    [ERROR]Aborting because fallback start is disabled.

    any help aprecciated

  20. mike:

    I followed all the steps which appeared to run successfully on Ubuntu 12.04 b2 on T420 and I was left with low res screen and a Ubuntu desktop that would no longer install nvidia driver packages via apt.

    Did not make any real difference whether integrated, discrete or optimus was selected in bios.

    U12.04 fresh install did offer 2D ‘unknown’ driver/display.

    However was amazed that Skype wouldnt install (lib32) and stupid side layncher froze repeatedly.

    Better than my experiences with 10.10, 11.10 but still crap and wasted so much time.
    10.04 seems to be the last usable Ubuntu distro.

  21. Michael K.:

    I installed Bumblebee right now on an AKOYA P6634-Laptop with Ubuntu 12.04 beta2 and Kernel 3.2.0.22. I used ubuntu-x-swat like descript on Bumblebee. Everything works fine. Bumblebee-Team has made a great job. Seems to be an update, that links “precise” to “oneiric” without any problems.

  22. Ricky:

    Great guide. But when i run the command:

    root@ricky-N53Jf:~# optirun glxspheres
    [ERROR]Cannot access secondary GPU – error: Could not load GPU driver

    [ERROR]Aborting because fallback start is disabled.

    I have an ASUS N53JF with NVIDIA OPTIMUS, the strange is when i start with the live CD all go the best: i have the graphics effect. After the installation and the reboot ubuntu 12.04 have only 2D graphics. I follow your guide and the guide proceed with no problem (no error) but now i can’t use the discrete card. You know why? There’s a method to restore the installation equal to LIVE CD ? Thanks in advance and excuse me for my bad english.

  23. Sterli Snax:

    Its take so long

    Im downloading woww….

  24. Sterli Snax:

    I got Ubuntu Software Center error… and select repair but not luck, still error.. how to fix?

  25. wolfi:

    it works perfectly for me! (Thinkpad T420) I get about 100 frames per second.

    Thanks a lot!

  26. tank:

    Still has problem with second displays
    I’m using Thinkpad T420 with Nvidia Optimus.
    After setup all things according to this article. I still get problems with second vga displays.

    After I connect my second display with laptop through vga, ubuntu only shows it as Unknown, and only give screen res no more than 1024*768

  27. Rijalul Fikri:

    Hi, just wanted to say thanks for the great tutorial, it saves me from headaches. Before I follow this tutorial, I can’t use gnome shell on my machine because of the driver now I’m able to use it, but I’m a little bit confuse with why can’t I run optirun glxspheres. It shows me no error but It also shows nothing. What have I done wrong?

  28. hari:

    i did everything and all set well, but with optirun its giving 14 to 16 fps without it its giving 1 to 3 fps.i’m using dell xps-15 with nvidia geforce 540M.

    what might be the problem?

    • hari:

      i figured out what the problem with mine.while changing nvidia-curent to nvidia-current-udates ,instead of nvidia-current-updates i entered nvidia-current_updates.now i changed it and now its pulling 80 to 90 frames.

      now i got question. even though i set wrong path in config file,it was giving 15 fps with optirun, with out that 2 r 3 fps.what was making it to pull 15 frames with out nvidia card set to work?

  29. MShaik:

    Hey,

    I’m planning to get a Lenovo T420 with the Nvidia Optimus NVS4200 with a 9-cell battery. I had a question regarding battery life. On Ubuntu 12.04, how much battery life are u guys getting? Is it comparable to that in windows? (~10 hours) Also, would it be possible to follow all this method in CentOS 6.2 (since I prefer something very stable and not requiring regular updates).

    Thanks for your reply.

    Munaf.

  30. G D:

    Just wanna confirm this guide has worked great for me on Ubuntu 12.04 LTS on an Alienware M11xR2. Big thanks.

  31. Buzz:

    Having an error when running: dpkg-buildpackage -us -uc -nc

    dh_bugfiles -pnvidia-current-updates
    dh_install -pnvidia-current-updates
    cp: cannot stat `./NVIDIA-Linux-x86_64-295.40-no-compat32/nvidia-current-updates-settings.png’: No such file or directory
    dh_install: cp -a ./NVIDIA-Linux-x86_64-295.40-no-compat32/nvidia-current-updates-settings.png debian/nvidia-current-updates//usr/share/pixmaps/ returned exit code 1
    make: *** [binary-install/nvidia-current-updates] Error 2
    dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

    Please help.

  32. Rakesh:

    ammu@ammu:~$ sudo dpkg -i nvidia-current-updates_*.deb
    dpkg: error processing nvidia-current-updates_*.deb (–install):
    cannot access archive: No such file or directory
    Errors were encountered while processing:
    nvidia-current-updates_*.deb

    • kanoka42:

      I have the same problem!!!! Please help!!

      • Jak:

        From this website:
        cd nvidia-graphics-drivers*
        dpkg-buildpackage -us -uc -nc
        cd ..
        sudo dpkg -i nvidia-current-updates_*.deb

        Let’s say we’re in the nvidia-graphics-drivers* dir.
        In my case,
        dpkg-buildpackage -us -uc -nc
        hasn’t created the .deb file so after going cd .. I did this:

        sudo dpkg-source -x nvidia-graphics-drivers-updates_295.49-0ubuntu0.1.dsc
        cd nvidia-graphics-drivers*
        sudo dpkg-buildpackage -rfakeroot -b
        sudo dpkg -i nvidia-current-updates_*.deb

  33. Rakesh:

    Same Error as Buzz’s. Please help

    dh_bugfiles -pnvidia-current-updates
    dh_install -pnvidia-current-updates
    cp: cannot stat `./NVIDIA-Linux-x86_64-295.49-no-compat32/nvidia-current-updates-settings.png’: No such file or directory
    dh_install: cp -a ./NVIDIA-Linux-x86_64-295.49-no-compat32/nvidia-current-updates-settings.png debian/nvidia-current-updates//usr/share/pixmaps/ returned exit code 1
    make: *** [binary-install/nvidia-current-updates] Error 2
    dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
    ammu@ammu:~/nvidia-graphics-drivers-updates-295.49$

  34. bobit:

    hi thanks for the guide

    sudo modprobe nvidia_current_updates

  35. bobit:

    sudo modprobe nvidia_current_updates

    gives me

    FATAL: Error inserting nvidia_current_updates (/lib/modules/3.2.0-24-generic/updates/dkms/nvidia_current_updates.ko): No such device

    on msi ge620dx geforce gt555m

    thanks

  36. bobit:

    updates:
    optirun glxspheres
    works fine
    i get 100+fps

    i think
    sudo modprobe nvidia_current_updates
    not important?

  37. Fertony:

    Thank you a lot, here is the test result for “optirun glxspheres” at my levono T420, thank you
    149.571769 frames/sec – 166.922094 Mpixels/sec
    171.472425 frames/sec – 191.363226 Mpixels/sec
    170.859481 frames/sec – 190.679181 Mpixels/sec
    160.312447 frames/sec – 178.908691 Mpixels/sec
    136.165859 frames/sec – 151.961099 Mpixels/sec
    138.440109 frames/sec – 154.499162 Mpixels/sec
    136.312657 frames/sec – 152.124925 Mpixels/sec
    137.332816 frames/sec – 153.263422 Mpixels/sec
    132.376045 frames/sec – 147.731666 Mpixels/sec
    136.396864 frames/sec – 152.218901 Mpixels/sec

  38. Fertony:

    Hi Oded,

    I’m Fertony, I install the nvidia driver with your help, but I find that in the “normal” mode, there are a lot desktop effects were gone, like press and hold the key(Super/win) would show a KeyTips Panel,but now it does not effect. And I run “glxgears”, it shows “xlib: extension “GLX” missing on display “:0.0″.”., run “optirun glxgears” workes properly. Can you help me to fix it? Thank you.

  39. Fairmonk:

    Hi,
    I get “FATAL: Error inserting nvidia_current_updates (/lib/modules/3.2.0-24-generic/updates/dkms/nvidia_current_updates.ko): No such device”

    after running “sudo modprobe nvidia_current_updates”

    Can someone advice on how to proceed from here? Until this command everything went smooth.

  40. Ari:

    This is great I’ve been trying to fix it for few days now and this is exactly what I needed. Thank you so much!!

  41. Yazilim Amelesi:

    Hey, thanks for this great article! My previous attempts were complete failure, but these instructions ran smoothly on my Dell XPS L502x. With your permission, I’ll write down your instructions in my blog in Turkish.

    It’s time to install games.

  42. Make use of NVIDIA optimus technology on Ubuntu 12.04 » Schindler's Tech List:

    […] Nvidia Optimus on Ubuntu. Saturday, June 2nd, 2012 […]

  43. danny:

    I got this error when i try to run

    sudo apt-get build-dep nvidia-current-updates -y

    Picking ‘nvidia-graphics-drivers-updates’ as source package instead of ‘nvidia-current-updates’
    E: Unable to find a source package for nvidia-graphics-drivers-updates

    Is there a solution for this?

  44. Unable to Install ANY Linux distro:

    […] This could possibly be due to Nvidia Optimus, which has been problematic with Linux, since Nvidia does not support Optimus on Linux. Perhaps you could try installing Ubuntu 12.04 from the alternate install CD. this is a text based installer that should bypass any graphics related problems. See this about Nvidia Optimus on Linux: http://geek.co.il/wp/2012/02/19/nvid…n-ubuntu-12-04 […]

  45. RK:

    fantastic guide, mine with Dell L502X is working now..thanks a lot

  46. sameer:

    after running

    dpkg-buildpackage -us -uc -nc

    i m getting error…

    dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector –param=ssp-buffer-size=4 -Wformat -Wformat-security
    dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): -D_FORTIFY_SOURCE=2
    dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector –param=ssp-buffer-size=4 -Wformat -Wformat-security
    dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
    dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions -Wl,-z,relro
    tail: cannot open `debian/changelog’ for reading: No such file or directory
    dpkg-buildpackage: error: tail of debian/changelog gave error exit status 1

  47. bd:

    Sorry but i didn’t get the part “create a new directory to hold the Nvidia package sources and change into it”
    Where i should put that folder, and what should be the exact name of that folder. I simply created a folder named NVIDIA to the home folder.
    I managed to reach this step:

    user@userpc:~$ sudo dpkg -i nvidia-current-updates_*.deb
    dpkg: error processing nvidia-current-updates_*.deb (–install):
    cannot access archive: No such file or directory
    Errors were encountered while processing:
    nvidia-current-updates_*.deb

    Thanks for any help!

  48. jobzaaclub:

    after install complete.Why image icon menu lost?

  49. Mell:

    I’ve made it till step3 all right, but now my wlan doesn’t funktion, still jet.
    how can i get the old state of my system back.
    please help me, i’m a beginner. so i don’t know how to do this.

    a lot of thanks

  50. Tod:

    i got optimus running on a fresh ubuntu 12.04 installation (m11x r2, gt 335m) without any problems by following the directions on bumblebee’s site:


    Installation

    Bumblebee 3.0 is supported up to Ubuntu version 12.04.

    Currently, you need to open your terminal and enter the commands below.

    sudo add-apt-repository ppa:bumblebee/stable

    If you are on Ubuntu 11.04 or older and want newer drivers (recommended) than the ones available in the official repos, run:

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

    sudo apt-get update
    Install Bumblebee using the proprietary nvidia driver:

    sudo apt-get install bumblebee bumblebee-nvidia

    Reboot or re-login

    Formerly, you had to add a user manually to a group with sudo gpasswd -a $USER bumblebee. As of version 3.0-2, which was released on April 30th, this is not necessary anymore for new installations. With that version, the 32-bit libraries are also installed automatically on Oneiric and later.

    For advanced users, if you do not want to use the proprietary nvidia driver or 32-bit libraries (for example, if you are only interested in power savings), install bumblebee with: sudo apt-get install –no-install-recommends bumblebee

    source: https://wiki.ubuntu.com/Bumblebee#Installation

    i suspect that when this article was written that these instructions did not exist or work, but… when i did optirun glxspheres i got 60 fps (not great from what i read above, but hey) it appears that the proper gpu is kicking in.

    good luck!

Leave a Reply