GNU/Linux has became one of the operating systems that are preinstalled in the new computer right now. Two of the main reason was the license problems that haunted many users when they wanted to use Microsoft's product and also GNU/Linux has been developed so that home users can use it as destop operating system, these means a lot of graphical menus, splash screen, combo box, radio button, mouse interactions, and etc. GNU/Linux developers had tried to build a generic 3D driver, but it Unfortunately, there is one componen that were lacking until now, which is 3D componen with OpenGL. That means, you need to install additional driver from your vendor when you want to play some 3D games, like TuxRacer, CanonSmash, Chromium, etc. This article will simply explains to you how to install NVidia driver into your Linux box. I'm using Slackware 11.0 for the installation, but you can use any other distro (exception for SuSE Linux, which had other methods. Please read SuSE HOWTO). This articles will use kernel 2.6.x, but can be applied with kernel 2.4.x either. It also uses the new Xorg 6.9 package which is included in Slackware-Current. Note that that new modular XOrg package is not fully supported until NVidia release their update to their drivers, since up to now, they still locate the old path on the installation process, but it can be solved by giving an extra parameters. We will tackle with this later on.
Please note that this installation assumes that you are not buying a commercial distro, such as Mandriva Power Pack which already include precompiled Nvidia modules for kernels. If you have bought this kind of distro, you can simply install it with rpm -ivf package-name.rpm.
In order to install NVidia driver, you should already had installed Xorg, kernel-source and also development package, such as GCC (GNU C Compiler), binutils, GNU Make and glibc (if you have to build the NVidia kernel module). After installing all the requirement, download the latest NVidia driver from NVidia. The latest version as this writing is 1.0-9755. You should download the README file also, which also include instructions to install NVidia driver. Download the latest version of NVidia driver package and place it in some directory, like /usr/local/src.
Note : Please use the same GCC (GNU C Compiler) that is being used to compile your kernel. I had an error message when i tried to compile a kernel interface for the NVidia driver when using a different GCC version.First of all, NVidia installer insist that you should not install NVidia driver while you are logged in X Server, so you have to boot into text mode. There are 2 methods to reach the text mode. First, you edit your /etc/inittab file with your favourite editor and find a line : id:4:initdefault or perhaps id:5:initdefault in other distro. The default runlevel in Slackware is 3, so you don't actually have to change anything if you haven't modify them to directly start X Window. If you do, change the default number into 3 and save. Reboot your computer, and when it boots, it will boot into text mode. The second methods is simpler. You don't have to change anything in the /etc/inittab. When LiLo (Linux Loader) appears, press ESC (it will display boot: prompt). Write down Linux 3 or whatever your OS choices and add "3" at the back of the text and you will boot into text mode.
Login with root user, and go to the directory where you placed your NVidia driver package (for example, cd /usr/local/src). Next, you can install the NVidia driver package using sh NVIDIA-Linux-x86-1.0-9755-pkg1.run (change it with your package name). Wait for a moment, and the NVidia installer will perform some preparations. When the NVidia Installer couldn't find any precompiled kernel interface for the kernel you are running, it will try to download from the Internet. If you have installed kernel-source package, then you should answer NO, and the installer will try to compile a new kernel interface for you. After it is all finished, then the installer will display some message that the installation process is done. You can find log files about the installation process in /var/log/nvidia-installer.log (it depends on the distro that you are using).
If you are using Slackware-Current, then you should have used the new modular XOrg package. Therefore, you must use different parameter in order to install NVidia driver. Use this code:sh NVIDIA-Linux-x86-1.0-9755-pkg1.run --x-prefix=/usr --x-module-path=/usr/lib/xorg/modules
Is it done yet? Well.. not yet actually. You still have to edit your Xorg configuration file, so it will load the new driver instead of the generic driver. The configuration file is located in /etc/X11/xorg.conf. Open it with your favourite text editor and go to Section Modules. Add a new line : Load "glx" and remove Load "dri" and Load "GLcore" if they exists. Next, go to Device Section, and replace Driver "nv" or Driver "mesa" with Driver "nvidia".
That's it. You are done with the installation process. It's time to test the driver. if you edit your /etc/inittab file previously, restore the initdefault number into 4 and restart your computer. Make sure that NVidia splash screen is displayed before the login manager (KDM or GDM). You can do another test by opening konsole, and execute glxgears and it will produce three gears that are spinning fast. Now you can set your OpenGL Screen saver, or playing 3D Games, like TuxRacer.
If you are having trouble with the size of the fonts after you install NVidia driver (in my case, it was so big), then it was caused by a monitor reporting an incorrect physical size, which causes various X applications to render fonts at the wrong size. You can check what X thinks the physical size of your monitor is, by running: xdpyinfo | grep dimensions. This will report the size in pixels, and in millimeters. If the sizes in millimeters are drastically incorrect, then you can correct this by adding the DisplaySize field to the monitor section of your xorg.conf file (see the xorg manpage for details). I solved that problem by adding DisplaySize 360 270 in Section "Monitor". (Thanks to Andi Ritger from NVidia who helped me to solve this).
Another troubleshooting that had already fixed can be found on the README file. Make sure you have read this file first before you ask NVidia Support.
Last Update : 14 April 2007 :: 08:56:38
Comments