Configuración de placa de video NVIDIA para correr CUDA en Ubuntu 13.04

Hace unos meses me compré un nuevo PC de escritorio con el objetivo de comenzar a aprender acerca de la programación CUDA . El nuevo PC tenía una tarjeta de video Intel integrada y una NVIDIA GeForce GT620 . La idea fue utilizar la tarjeta de video integrada para el servidor X , dejando a la GeForce dedicada a ejecutar simulaciones .Cuando traté de instalar el controlador de la tarjeta NV , las cosas empezaron a ir mal , porque el conductor NV reemplazar las librerías OpenGL Mesa con los suyos. Debido a que el xserver realmente funciona en la tarjeta de vídeo Intel , que es incompatible con las librerías OpenGL de propiedad, OpenGL dejó de funcionar y, en consecuencia , también la unidad se rompió .Después de un par de noches tratando de hacer que funcione , me encontré con que el truco para hacer que todos de trabajar es , después de la instalación del driver de nvidia , vuelva a instalar las bibliotecas originales del mesa glx . Este es el procedimiento correcto :* Desinstalar los componentes NV en el sistema



   
# sudo nvidia-uninstall

   
# sudo apt-get purge nvidia*

  
* Descargue los últimos drivers oficiales desde el sitio web NV: http://www.nvidia.com/object/linux-display-amd64-319.60-driver.html* Instale los paquetes necesarios para el instalador

    
# Sudo apt-get install linux -headers -`uname -r`
* Los siguientes pasos requieren el xserver detuvo. Por lo tanto , ir a un terminal ( Ctrl + Alt + F1) y detener el xserver . Por ejemplo ,

     #
sudo stop lightdm


* Instale el controlador# cd ruta/donde/están/los/drivers # sudo chmod +x NVIDIA-Linux-x86_64-319.60.run # sudo
./NVIDIA-Linux-x86_64-319.60.run 
* En este punto , el conductor está bien, pero nuestra xserver mostraría problemas con las librerías de Open GL . Sin embargo, la GPU está listo :# sudo nvidia-smidebe mostrar el estado de la GPU.* Ahora , para evitar el problema de las bibliotecas Open GL , hay que ( re)instalar tanto el servidor X y de las bibliotecas Mesa:# sudo apt-get install -reinstall xserver-xorg-core  xserver-xorg-video-(tu driver de video) xserver-xorg-libgl1-mesa-glx* Reinicie el sistemaAhora, usted puede instalar el Kit de herramientas CUDA , evitando volver a instalar los drivers NV ...

Configuring CUDA in Ubuntu 13.04

Some months ago I bought a new Desktop PC with the aim to start learning about CUDA programming. The new PC had an integrated INTEL video card, and a NVIDIA GeForce GT620. The idea was use the integrated video card for the xserver, leaving the GeForce dedicated to run simulations.

When I tried to install the driver for  the NV card, things started to go wrong, because the NV driver replace the mesa OpenGL  libraries with theirs. Because the xserver actually works on the Intel video card, which is incompatible with the proprietary openGL libraries, openGL stopped working and as a result, also Unity got broken.


After a couple of evenings trying to make it work, I found that the trick to make all be working  is, after the installation of the nvidia driver, reinstall the original  mesa glx libraries. Here is the right procedure:


* Uninstall all NV components on the system

   # sudo nvidia-uninstall
   # sudo apt-get purge nvidia*

   
* Download the last official drivers  from the NV web site: http://www.nvidia.com/object/linux-display-amd64-319.60-driver.html


* Install the required packages for the installer
 
   # sudo apt-get install linux-headers-`uname -r`


* The next steps requires the xserver stopped. So,   Go to a terminal (Ctrl + Alt + F1) and stop the xserver. For instance,

     # sudo stop lightdm


* Install driver

# cd path/where/you/save/drivers
# sudo chmod +x  NVIDIA-Linux-x86_64-319.60.run
# sudo ./NVIDIA-Linux-x86_64-319.60.run


* At this point, the driver is OK, but our xserver would show problems with the Open GL libraries.  However, the GPU is ready:

# sudo nvidia-smi

should show the status of the GPU.

* Now, to avoid the problem with the Open GL libraries, we (re) install  both our xserver and the mesa libraries:

# sudo apt-get  install --reinstall xserver-xorg-core  xserver-xorg-  libgl1-mesa-glx


* Reboot the system

Now, you can install the CUDA Toolkit, avoiding to reinstall the NV drivers...