Since I'm doing the Linux thing, I'm going to start writing more informational articles describing handy tips that I feel are useful. If you read my last post, you'd know I'm now using a Debian GNU/Linux system that has an Nvidia video card.
Video has always been a bit of a sore spot in the Linux and Unix world. It wasn't until the late 1980's that Unix systems even had a graphical subsystem (XWindows, as it is still known). Even today, the hardest part of bringing up a useable Unix-based system is getting the video adapter to work with XWindows. Today, most systems use a fork called Xorg.
While it would seem that the only video card you can buy will either contain an Nvidia or ATI chip, that's not entirely true. It is interesting (at least to someone like me) that Nvidia graphics cards are more often seen on Linux-based systems and ATI-based cards are more often seen in the BSD world (Free/Net/Open). Probably just a coincidence, but when I read forum posts, that's what I tend to see. Since we're talking about Linux in this article, let's get down to the business of installing some accelerated drivers for our Nvidia-based card.
One of the first places to look is the Nvidia Driver Debian wiki. Per the wiki, there are two ways to install the driver. The first method is the Debian method, which, while it may be easier, it also may be lagging behind driver versions. I chose the second method, which involves downloading the driver binary from Nvidia's website and manually installing it. There are a few caveats, namely that it's possible to screw up the install, not work, or require a reinstall if you upgrade your kernel since the driver compiles a kernel module. I didn't run into any installation problems but I would imagine that I'd have some difficulties if I upgraded my kernel. Nothing terrible to worry about though.
One thing to note is that driver availability for older Nvidia cards (made before 2005) is probably non-existant. So while you can probably get by using the generic VESA driver, you probably will no longer be able to use the latest Nvidia driver and therefore the 3D acceleration. See this section on the Debian Nvidia wiki for more info.
First, download the driver from here: driver download. Do remember that this driver is a propriatary, closed source driver. If that offends you, you should probably stop here. My understanding is that there is an open source Nvidia driver on the way so if you don't need 3D acceleration (obviously you haven't tried Compiz Fusion), this article isn't for you. I'm willing to bit the bullet and install a non-free driver for the sake of fully utilizing my hardware and will certainly move to the open source version when it shows up.
Next, you'll want to download your kernel source. Actually, I got by just getting the header files. Open your favorite terminal and type 'sudo apt-get install linux-headers-2.6-686'. If you don't have the sudo program installed (and you SHOULD), just su to root and issue the apt-get command again without the sudo part. I'm assuming you're running a 2.6 kernel on 686 hardware. Most people should no longer be running an i386 kernel.
Now for the fun part. You might want to write this down or open this article on another machine. To install the driver, you need to fully exit your X session. No, you can't open a terminal session from GDM. I'm particularly lazy, so I just rebooted into single user mode. Either way, you need to completely get out of X and be at a root prompt. Change to the directory where you downloaded the driver and chmod it to 755 if needed. Now run it, ignoring the runlevel error. Accept the license. You may get an error about the version of GCC installed on your system not matching what was used to compile the kernel. Do NOT just ignore this. Exit the installer. In my case, GCC 4.1 was used to compile my kernel so I just did a '#apt-get install gcc-4.1'. Next, you'll want to export the location, so first do a 'which gcc-4.1'. In my case, I did a 'export CC=/usr/bin/gcc-4.1'. Now rerun the installer. You should be good to go from here. The installer will build a custom kernel module, back up and modify your X config, and tell you if things have completed successfully. If that's the case, exit the installer and reboot!
Once I was back up I did a test by running Doom3 and was happily surprised to see it come right up. I have to admit, it's nice to run a system with no proprietary drivers, but I can't complain that Nvidia is gracious enough to provide a driver. After all, they don't have to since the majority of their customers are on a Windows system and developing and testing a Linux driver takes resources from that. So I say kudos to Nvidia for making a solid driver that installs easily and just works!