My Community
January 06, 2009, 10:42:29 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: No News Is Good News
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: NVIDIA Installation  (Read 1600 times)
Vern Heesch
Administrator
Jr. Member
*****
Posts: 67


View Profile
« on: July 18, 2005, 11:26:22 PM »

You've got that nice NVIDIA video card and want to use it's 3D functions in linux. This will explain how to do it on Mandriva Linux, other distro's may differ.

You may want to print this because most of the procedure requires you to be out of the X environment and working from the command line.

The first thing you need to do is to install the kernel-source that matches the running kernel that you are using. You can find your version of your running kernel with:
Code:
uname -r

For purposes of this howto, I'll be talking about LE2005 versions. The running kernel is 2.6.11-6mdk which means that I would need the 2.6.11-6mdk kernel-source. To install that package:
Code:
urpmi kernel-source-2.6-2.6.11-6mdk

The above command may say it's already installed if you had installed it previously. The key thing here is that the output of the following two commands show the EXACT same versions.
Code:
uname -r
ll /usr/src/linux

Now get the nvidia driver from nvidia.com http://www.nvidia.com/object/unix.html
In most cases it's the driver for the IA32 architecture...if your machines architecture was different then that, you'd know it.  Smiley

The actual installation of the NVIDIA drivers must be done while you are out of the X environment, so log out of your window manager. We need to get to the command line, so if you are now sitting at the graphical login screen, hit the CTRL+ALT+F1 keys combination to get there and login as root.

Once you are at the command line you shut down the X environment with one of the following:
Code:
telinit 3
or
service dm stop
or
init 3

Now change directories to wherever you had downloaded the NVIDIA driver to and run the following command:
Code:
sh NVIDIA-Linux-<version-here>.run

The installation begins after issueing the above command. Accept the license agreement, and answer 'YES' to the questions it asks. The drivers will install and tell you at the end that it was successful.

Now you need to edit the xorg.conf file to use the nvidia driver. You can use any command line editor you want, I'll be using the vi editor:
Code:
vi /etc/X11/xorg.conf

Hit the 'i' or insert key to get into edit mode. Find the 'Section Device' section in the config and change Driver "nv" to Driver "nvidia" as shown here:


Now go up in the file and find the "Section Module" section and add the line Load "glx" if it isn't there. If it is there, be sure it is not commented out.


If you have either of these two lines then remove them:
Code:
Load "dri"
Load "GLCore"

Save and exit the file by hitting the Esc key to get to vi's command mode and enter the following command:
Code:
:wq

Now we'll edit one more file to tell the system to load the nvidia module when the machine boots:
Code:
vi /etc/modprobe.preload

Again, hit the 'i' key to get into insert mode and add the word nvidia to the bottom of the file:


Save and exit the file by hitting the Esc key to get to vi's command mode and enter the following command:
Code:
:wq

The configuration is done and now all you need to do is restart the X environment and login to your window manager:
Code:
telinit 5
or
service dm start
or
init 5

Once back in your window manager, you can verify the installation by running the following command and looking for direct rendering: Yes
Code:
glxinfo | grep render


« Last Edit: December 24, 2005, 11:13:49 PM by Vern Heesch » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!