Trying to install Proprietory Nvidia Graphics Drivers

Solution 1:

I installed cuda on ubuntu 12.04 as package as shown on NVIDIA website.

The graphic samples where not working saying:

hasan@ubt:~$ glxinfo | grep renderer 
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".

The link http://forum.ubuntuusers.de/topic/kubuntu-und-nvidia-mit-proprietaere-treiber/2/#post-5901377 helped me.

essentially:

sudo apt-get purge nvidia-319-updates nvidia-settings-319-updates nvidia-prime
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install xserver-xorg-lts-raring
sudo apt-get install nvidia-319-updates nvidia-prime
sudo reboot

Check with glxinfo | grep renderer. It showed on my Laptop:

OpenGL renderer string: GeForce GT 650M/PCIe/SSE2  

The Cuda graphic demos worked!

Solution 2:

This is a Nvidia Optimus laptop. That means there are two video cards in it, a low-powered Intel integrated one with nice open source drivers to handle most things and then the Nvidia 630M to offload things for rendering.

The standard driver setup cannot handle this yet. To use this you currently need to install The Bumblebee Project and then run things with optirun (also on that page).