João Paulo Cercal

Staff Security Engineer at LastPass

  • Others

How to install the nVidia video driver on Ubuntu 10.04

  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn

Read this article in

Assuming you’ve already downloaded the latest driver version directly from the manufacturer’s website:

http://www.nvidia.com.br/Download/index.aspx?lang=br

We can continue then…

  1. Removing other drivers and installing the recent NVIDIA driver version

Hello folks, as many nvidia graphics card users may have noticed, Compiz graphics performance and OpenGL playback are very slow in this new version of Ubuntu. To explain quickly, this is due to two factors:

  • Ubuntu 10.04 comes with a generic driver called Nouveau, so even if you install the nvidia driver provided by canonical, Nouveau will keep running.
  • The nvidia driver provided by canonical is very outdated compared to the one provided by nvidia.

So before anything else, we need to remove all video drivers installed on Ubuntu, until all of them are removed, when you try to install the recent nvidia driver, you’ll encounter the following problem:

1
2
3
4
5
6
7
8
ERROR: Unable to load the kernel module 'nvidia.ko'.
This happens most frequently when this kernel module was built against
the wrong or improperly configured kernel sources, with a version of gcc
that differs from the one used to build the target kernel, or if a driver
such as rivafb/nvidiafb is present and prevents the NVIDIA kernel module
from obtaining ownership of the NVIDIA graphics device(s), or NVIDIA GPU
installed in this system is not supported by this NVIDIA Linux graphics
driver release.

So let’s begin…

All commands should be run in superuser mode.

Command:

1
$ sudo su

Open the “Blacklist” module as superuser, using your favorite text editor:

1
# gedit /etc/modprobe.d/blacklist.conf

Add the following lines at the end of the file, then save:

1
2
blacklist vga16fb
blacklist nouveau

Now let’s start removing all video drivers, for this I recommend that you stop GDM:

1
# service gdm stop

Remove all nvidia installations:

1
2
# apt-get purge nvidia-*
# reboot

Now let’s remove Noveau:

1
2
3
# service gdm stop
# apt-get purge xserver-xorg-video-nouveau
# reboot

From now on, linux no longer has any video driver and is ready to install the new version of the driver distributed by nvidia.

Installing the new nvidia driver:

1
2
3
# service gdm stop
# chmod +x NVIDIA-Linux-x86_64-256.44.run
# sh NVIDIA-Linux-x86_64-256.44.run

Note: NVIDIA-Linux-x86_64-256.44.run is the name of the driver downloaded from the website. During installation, you’ll be asked a question, answer YES!

Once installation is finished, you can start GDM:

1
# service gdm start

Now you’ll need to update the X.Org settings, to do this, go to the terminal and type:

1
# nvidia-xconfig

You’ll need to set the configuration to load when the session starts, otherwise you’ll have to open NVIDIA X Server Settings to load the settings.

So go to “Startup Applications Preferences” > System > Preferences > “Startup Applications” > Add > Name: > Any name > Command:

1
# nvidia-settings-load-config-only

Done! Now you’re using the latest nvidia driver and can use Compiz, play videos in OpenGL without that enormous graphics slowdown.