NVIDIA Optimus is a technology that is used on notebooks that have a CPU with integrated graphics hardware in addition to a discrete NVIDIA mobile graphics hardware. It enables the notebook user to get maximum battery life while not compromising on graphics performance. It intelligently switches between the CPU graphics and discrete NVIDIA graphics hardware so that performance is not compromised but battery life is conserved. Notebooks which have this technology have a NVIDIA Optimus sticker on them. Sadly, Optimus works only on Windows. In Ubuntu, the discrete NVIDIA graphics card is not even detected.
Bumblebee is a solution to use the discrete graphics hardware on Optimus notebooks. It is not intelligent or seamless like Optimus on Windows. Rather, it sets up the Linux system such that the NVIDIA drivers for the discrete hardware are installed and setup. Bumblebee enables you to run a specific application fully on the discrete graphics hardware.
These steps can be used to install Bumblebee on Ubuntu 14.04:
$ sudo apt-get install bumblebee bumblebee-nvidia primus nvidia-331
This also compiles and installs the necessary kernel modules to support NVIDIA hardware.
Reboot the system.
To run a program named foobar using the discrete NVIDIA graphics hardware:
$ optirun foobar
Tried with: NVIDIA GeForce GTX 765M and Ubuntu 14.04