Articles
Linux and NVidia Drivers
This article focuses on providing a straightforward series of steps for setting up 3D acceleration for NVidia-based graphics cards. I had to do a considerable amount of legwork to find out exactly what I needed to do to make sure my system didn't belly up in its first few days in fresh operation.
I recently cleared my system and reinstalled pretty much from the ground up. I'm using openSUSE at the moment, having converted from Fedore Core 3. openSUSE definitely loads faster. Anyway, part of my hardware setup was my NVidia GeForce4 MX440, which I know for a fact supports 3D acceleration. When I tried to run applications that used this 3D acceleration, openSUSE gave me a message that 3D support wasn't enabled. WTF?!, I thought, I have an NVidia card! Isn't that enough?!
Evidently, it isn't. Because of licensing restrictions on the part of NVidia, most Linux distros aren't actually allowed to ship their 3D accelerated driver. Instead, they replace it with a dummy driver, which works for normal stuff, but does not support 3D acceleration.
Step 1: Download the NVidia Driver
Not all of us are blessed with a direct internet connection. Fortunately, NVidia's website should make it fairly obvious what file it is you need to download. Their unified driver technology means that virtually all NVidia cards can use the same driver, which makes things easier for you.
Find the downloadable driver package. I don't have any links, because I'm not online at the moment and can't verify them. Go for a stable release. The package should be bundled as a ".run" file, over 10 MB in size. Transfer the file to a place that the root user will be able to access easily. I put it in the root's home directory, i.e. /root/, but anywhere's fine.
Step 2: Check Prerequisites
You'll need these:
- make - Old and ubiquitous project manager.
- gcc - GNU Compiler Collection.
- kernel-source - Source of your Linux kernel.
The first two you probably already have. If you don't, I doubt you'd get far with Linux, but grab them now anyway.
The third is probably something you don't have lying around on your system, unless you chose it when you installed your Linux distro. Seek it out for your specific version of your distro (you can search, right?). Install it, configure it if it needs it (there's always a README with these sorts of things)... actually, I think you could just get away with extracting the thing. It's just source, after all. But the NVidia driver installation needs it, so you gotta get it.
Step 3: Run level 3!
For some sick, twisted reason, the official NVidia driver install howto doesn't cover this topic. Long story short, you're probably running in graphical mode. Which means that the graphics modules and stuff are operating. Installing the NVidia graphics drivers now would be like operating on a person running in a race.
We have to exit the graphical mode, and deal with the ever lovable console. How? Type this in:
$ su
Password: [your superuser password]
# telinit 3
Wait a few seconds, and you should be out of the graphical mode, and in the text-based console mode. You type stuff in, and press Enter after each line to run commands and make the computer do your bidding. Not very threatening.
Step 4: Installation time
You may have to run the following. I accidentally forgot, but it still worked out fine for me. You should be logged in as root. You can tell if your prompt dealie looks like a hash symbol.
# rmmod nvidia
We should be ready to rock. Change directory to the location where you moved the NVidia driver download to (that .run file) using cd plus that directory. If you can't manage that without my explaining, you don't deserve a Linux box.
Run that installer by typing this:
# sh NVIDIA-Linux-x86-1.0-8178-pkg1.run -q
Just follow the prompts. You're almost home free! At this point, the installer may use the kernel sources to help build its nvidia module, which is why you needed it.
Step 5: Configuration
So the installer has done its stuff, and you're back on the console. Now all that's left to do is configure your X Server to actually use the NVidia driver, so you can take advantage of crisp, smooth 3D graphics.
I'm using openSUSE 10.0, so I typed this:
# sax2 -m 0=nvidia
That's a zero, not a capital "O". If you're not using SUSE or any of its derivatives, NVidia have made its own little utility that basically does the same thing:
# nvidia-xconfig
If you're prompted for anything, give the usual responses. You should know your monitor well enough to not make it fry, hopefully.
Step 6: Testing it out
Now we can get back into graphical mode. You can either reboot (with the, surprise surprise, reboot command), or run the following to jump straight back into the action:
# telinit 5
That should be it! You're done! Pat on the back, if everything is still standing.
Disclaimer
I'm not affiliated with NVidia or Novell Corporation. I just use their stuff and occasionally curse at them under my breath when things go wrong. Follow these instructions at your own risk. If something goes wrong, I relinquish any responsibility in regards to the matter, either directly or indirectly. In other words, if you stuff up... you backed up, didn't you?