Category Archives: gcc

Nvidia Driver on Linux – Easy, and Quick

Image representing NVidia as depicted in Crunc...
Image via CrunchBase

There is a buzz that installing the Linux based Nvidia accelerated graphics driver is complicated. I consider it rather straight forward. First install build-essential, and the headers for your kernel. Those may appear to be some bigs words in the previous sentence, but it is really one line in a terminal window. Build essential installs GCC and its dependencies:

sudo apt-get install build-essential linux-headers-$(uname -r)

Now download the latest and greatest Nvidia driver. Choose the correct build type for your architecture. Conveniently save the file to your desktop and rename it to nvidia.run. The change your tty to another. To change to tty2 press control-alt f2.

Shut down gdm, which will stop X11:

sudo /etc/init.d/gdm stop

Or if you are using the new process manager in Ubuntu 9.10 you can use also:

sudo service gdm stop

Then execute the Nvidia installation script. Login to the command prompt and navigate to the desktop:

cd Desktop
sudo sh nvidia.run

Basically answer yes to everything, let the driver compile, and then when it asks you to configure the xorg.conf file, let it. Nowadays the Nvidia driver basically works out of the box. In the past, with Ubuntu in particular, you had to comment out the included driver in Ubuntu’s modules package, otherwise the custom compiled driver would not load on startup. The open source driver used to be commented out in /etc/default/linux-restricted-modules-common (comment NV); note that this is not needed any more except in Hardy (8.04).

Then start your gdm session, which will take you back to the login window, or your desktop depending on your startup settings:

sudo /etc/init.d/gdm start

Reblog this post [with Zemanta]