If you're going to try running Linux on your new laptop that has NVidia Optimus technology, you may be in for a surprise, as the proprietary NVidia display drivers won't work out-of-the-box. Optimus is a fairly new type of technology, but it looks like it's here to stay. It typically involves having a primary display chipset (usually integrated Intel) and a secondary high-power video card (usually a really good dedicated NVidia or ATI card, ATI has their own version of this kind of technology). This all seems fine and good, except there's a technicality in how the two video devices are put together, making your computer require some dedicated software to be able to use the better video card. That's right, there are usually no BIOS settings or any other built-in means to switch between video devices or to even use the secondary (a.k.a. "discrete") video card at all. For Windows, the video card manufacturers write device drivers that automatically utilize both cards and probably allow some configuration, however, as far as I know the manufacturers have no plans to ever support this type of technology on Linux. This is where the developers of the Bumblebee Project come to the rescue, at least for NVidia Optimus cards.
Bumblebee is a free software project made to address the need for support of NVidia Optimus on Linux, and it's currently in active development. Using bumblebee and some related software, you can have a setup where your power-hungry secondary video card gets shut off when you're not using it, saving hugely on power consumption. When you need to use the secondary card for a game or what-have-you, simply start the program with the "optirun" command. Your better video card will spring to life and do all the rendering for your program. The result of the rendering is then passed back to the primary display device, who shows the program's output on-screen using software called virtualgl.
It took me several days to figure out a good way to get the bumblebee setup to work with a Clevo W150ERM laptop containing an Optimus Intel / NVidia GeForce GT650M combination, and it was complicated by the fact that I wanted to keep the stock free OpenGL implementation working as a fallback when not using the NVidia card. It took a lot of tinkering to figure out how to get the NVidia proprietary driver onto the machine without it overwriting all the original driver's stuff, and after doing that, how to get bumblebee configured to be able to find all the NVidia libraries. The NVidia driver even tries to "proactively" search your entire system and remove anything related to OpenGL. I couldn't find much online about having two parallel OpenGL installations with the proprietary drivers coexisting nicely next to some free stock OpenGL drivers, and having it all work with bumblebee... So once again, I wrote a recipe for others who want to do the same.
This tutorial teaches you how to install a version of the official NVidia Linux proprietary video
driver that works with the GeForce GT650M, in a non-standard location, without
removing all your original OpenGL stuff. It goes on
to explain how to install a newer version of Bumblebee using git that's needed to support
To be clear, the GT650M I'm talking about is the 1GB GDDR5 one that shows up with the lspci command as this:
01:00.0 VGA compatible controller: NVIDIA Corporation Device 0fd1 (rev ff)
running lspci with the optirun command shows the card as this:
01:00.0 VGA compatible controller: NVIDIA Corporation Device 0fd1 (rev a1)
The tutorial has only been tested on Linux Mint 13 Cinnamon 64-bit, but probably works without modification on similar versions of Ubuntu, and with minor changes it should work with any version of Linux. I was especially inclined to keep the original OpenGL drivers because a working hardware OpenGL driver for the primary video device is required to run the Mint 13 Cinnamon desktop.
Please only follow these steps on a freshly installed operating system and make sure any important data on the system is backed up to a different piece of hardware before starting, as any mistakes may only be fixable by reinstalling your operating system.
By following this
tutorial, you formally acknowledge that you do so at your own risk, without any guarantees
implied or otherwise, and knowing full well that these steps may completely and irreversibly
break your computer and destroy everything on it. This may not be the best or "correct" way to do these things,
but it's the only way I could figure out, so if you know of a better way or have any suggestions or feedback,
please feel free to leave a comment below.
First, add some unofficial Ubuntu repositories:
Download a specific version of the NVidia official Linux proprietary
driver (version 304.22b or newer). Get the 64-bit driver here:
or get the 32-bit driver here:
If you don't know whether you need a 64-bit or 32-bit driver, you should probably learn a lot of things about computers before proceeding any further with these instructions.
If you see any output from that command, blacklist the nouveau module, otherwise skip the next two lines:
Once you're back on, check if the module was successfully blacklisted:
If the last command outputs nothing, you're good to continue. If instead
you see some references to nouveau, then you haven't blacklisted the module properly
and the method for doing so may be different on your system. Please make sure
you've blacklisted nouveau before continuing past this point.
Now start the NVidia driver installer with some special command line arguments. The arguments are super-important, and if you do this part wrong you'll break your existing OpenGL install, possibly not fixable without reinstalling your operating system!!:
During the install some errors may be reported, but this should be okay, and so long
as the install completes successfully there's nothing to worry about.
Configure your system to start bumblebeed during bootup. This procedure may need to be different on non-Debian-based Linux distributions:
And, you still have your stock OpenGL stuff installed, so when you don't want to use the better video card, you can run programs as normal and they will be run using the primary display device. You can easily see the performance difference (check the FPS):
If you try to do this setup the wrong way, you'll overwrite all the stock
OpenGL stuff, and on Linux Mint 13 Cinnamon this means you won't be able
to use the Cinnamon desktop. I hope it all worked out for you, thanks for reading /
If you followed these instructions correctly, but when running something with the
optirun command, it fails with an error similar to:
[29.675070] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the
[ 29.675096] [ERROR]Aborting because fallback start is disabled.
...and if your /var/log/Xorg.8.log looks similar to this: http://pastebin.com/GnFzaJcD
You should try changing a setting in your xorg.conf.nvidia like this:
Option "ConnectedMonitor" "DFP"
Option "ConnectedMonitor" "CRT"
Thanks to kudlata for figuring out this fix!
If nothing's working and you have a Lenovo or Toshiba brand system, try following the instructions outlined here: lenovo hack