How to install drivers for Nvidia optimus cards

This is a how-to article to install nvidia-352 in laptops running Nvidia optimus cards. Compatible operating systems are Ubuntu 14.04.x LTS and above. Tested on Ubuntu 14.04.2 running on NVIDIA Corporation GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M].

Remove all existing nvidia and nouveau drivers

sudo apt-get remove --purge nvidia*
sudo apt-get --purge remove xserver-xorg-video-nouveau

Back up the blacklist.conf file

sudo cp /etc/modprobe.d/blacklist.conf /etc/modprobe.d/blacklist.conf.bak

Blacklist remaining nouveau drivers

sudo vim /etc/modprobe.d/blacklist.conf

adding the following lines at the end of file.

# Necessary to install nvidia drivers
 blacklist nouveau
 blacklist lbm-nouveau
 blacklist nvidia-173
 blacklist nvidia-96
 blacklist nvidia-current
 blacklist nvidia-173-updates
 blacklist nvidia-96-updates
 alias nvidia nvidia_current_updates
 alias nouveau off
 alias lbm-nouveau off
 options nouveau modeset=0

Add bumblebee and xorg-edgers ppa

sudo apt-add-repository ppa:bumblebee/stable -y
 sudo add-apt-repository ppa:xorg-edgers/ppa -y
 sudo apt-get update && sudo apt-get upgrade -y

Install the linux headers & source files

sudo apt-get install linux-source && sudo apt-get install linux-headers-'uname -r'

Install nvidia-352 driver

sudo apt-get install nvidia-352 nvidia-settings
sudo apt-get update && sudo apt-get dist-upgrade -y

Install bumblebee

sudo apt-get install bumblebee bumblebee-nvidia virtualgl virtualgl-libs virtualgl-libs-ia32:i386 virtualgl-libs:i386
sudo usermod -a -G bumblebee $USER

Replace nvidia-current with nvidia-352 in bumblebee.conf

sudo vim /etc/bumblebee/bumblebee.conf
[bumblebee] section: after "Driver=" insert "nvidia"
 [nvidia-driver] section: after "KernelDriver=" insert "nvidia-352"
 [nvidia-driver] section: after "LibraryPath=" insert "/usr/lib/nvidia-352, /usr/lib/nvidia-352:/usr/lib32/nvidia-352"
 [nvidia-driver] section: after "XorgModulePath=" insert "/usr/lib/nvidia-352,/usr/lib/xorg/modules"

Open xorg.conf.nvidia.

sudo vim /etc/bumblebee/xorg.conf.nvidia

Check if Option “UseDisplayDevice” “none” is present. if not, then Replace
Option “ConnectedMonitor” “DFP” with Option “UseDisplayDevice” “none”

Add nvidia-352 in the blacklist

sudo vim /etc/modprobe.d/bumblebee.conf
#352
blacklist nvidia-352
blacklist nvidia-352-updates
blacklist nvidia-experimental-352

Install bumblebee indicator

sudo apt-get install linux-headers-generic build-essential git
sudo apt-get install python-appindicator
mkdir git && cd git
cd git
git clone https://github.com/Bumblebee-Project/bumblebee-ui.git
cd bumblebee-ui/
sudo ./INSTALL

Reboot your pc/laptop to enable bumblebee

sudo reboot

Once you login to the desktop simply run optirun glxspheres or optirun glxspheres64 to test bumblebee and you’ll get output similar to the one below:

optirun glxspheres64 
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 820M/PCIe/SSE2
94.614565 frames/sec - 84.002595 Mpixels/sec
95.467759 frames/sec - 84.760095 Mpixels/sec
94.701004 frames/sec - 84.079340 Mpixels/sec
95.903520 frames/sec - 85.146982 Mpixels/sec
95.285090 frames/sec - 84.597915 Mpixels/sec

That’s it! When you are able to see the frame rates, that means bumblebee is working properly . You can now enjoy nVidia goodness for your optimus card.

Related Post

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.