LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-30-2002, 12:46 AM   #1
jspencerg
LQ Newbie
 
Registered: Dec 2002
Location: oregon
Posts: 2

Rep: Reputation: 0
geforce 4 on redhat


I need a step by step guide to install the nvidia driver for redhat. I loaded redhat 7.2 with no problem, but X window will not run and startx gets an error. There was no driver available during the load for my Asus geforce 4 (8420). I found the Nvidia site to get the proper redhat driver. It even comes in an RPM package. How can I get this installed and get x windows running?

Thanks for reading!

Jeff
 
Old 12-30-2002, 02:02 AM   #2
membrax
Member
 
Registered: Nov 2002
Location: 50'48''N - 4'21''E
Distribution: SuSE7.1 - SuSE8.1 - SuSE8.2 - RH6.2 - RH7.1 - RH7.3 - RH8.0 - RH9.0 - Fedora Core 1
Posts: 281

Rep: Reputation: 30
for anyone who cares, here are the exact steps i follow when ever i install the latest Nvidia Drivers on my desktop. i would imagine you should see nearly the exact same thing, as far as compile output.

here are links to the source files downloaded from nvidia.com:
http://download.nvidia.com/XFree86_4....0-3123.tar.gz
http://download.nvidia.com/XFree86_4....0-3123.tar.gz

edit: also, make sure you have kernel headers and kernel source rpms installed for what ever kernel you are currently running. VERY IMPORTANT!

so now, we begin.

[root@europa source]# tar zxvf NVIDIA_kernel-1.0-3123.tar.gz
NVIDIA_kernel-1.0-3123/
NVIDIA_kernel-1.0-3123/nv.c
NVIDIA_kernel-1.0-3123/os-interface.c
NVIDIA_kernel-1.0-3123/os-registry.c
NVIDIA_kernel-1.0-3123/os-interface.h
NVIDIA_kernel-1.0-3123/nv-linux.h
NVIDIA_kernel-1.0-3123/nv-misc.h
NVIDIA_kernel-1.0-3123/nv.h
NVIDIA_kernel-1.0-3123/nv-ids.h
NVIDIA_kernel-1.0-3123/rmretval.h
NVIDIA_kernel-1.0-3123/nvtypes.h
NVIDIA_kernel-1.0-3123/nv_ref.h
NVIDIA_kernel-1.0-3123/README
NVIDIA_kernel-1.0-3123/makedevices.sh
NVIDIA_kernel-1.0-3123/Makefile
NVIDIA_kernel-1.0-3123/Module-nvkernel
[root@europa source]# tar zxvf NVIDIA_GLX-1.0-3123.tar.gz
NVIDIA_GLX-1.0-3123/
NVIDIA_GLX-1.0-3123/usr/
NVIDIA_GLX-1.0-3123/usr/lib/
NVIDIA_GLX-1.0-3123/usr/lib/libGLcore.so.1.0.3123
NVIDIA_GLX-1.0-3123/usr/lib/libGL.so.1.0.3123
NVIDIA_GLX-1.0-3123/usr/X11R6/
NVIDIA_GLX-1.0-3123/usr/X11R6/lib/
NVIDIA_GLX-1.0-3123/usr/X11R6/lib/modules/
NVIDIA_GLX-1.0-3123/usr/X11R6/lib/modules/extensions/
NVIDIA_GLX-1.0-3123/usr/X11R6/lib/modules/extensions/libglx.so.1.0.3123
NVIDIA_GLX-1.0-3123/usr/X11R6/lib/modules/drivers/
NVIDIA_GLX-1.0-3123/usr/X11R6/lib/modules/drivers/nvidia_drv.o
NVIDIA_GLX-1.0-3123/usr/X11R6/lib/libXvMCNVIDIA.a
NVIDIA_GLX-1.0-3123/usr/X11R6/lib/libXvMCNVIDIA.so.1.0.3123
NVIDIA_GLX-1.0-3123/usr/include/
NVIDIA_GLX-1.0-3123/usr/include/GL/
NVIDIA_GLX-1.0-3123/usr/include/GL/gl.h
NVIDIA_GLX-1.0-3123/usr/include/GL/glx.h
NVIDIA_GLX-1.0-3123/usr/include/GL/glxtokens.h
NVIDIA_GLX-1.0-3123/usr/share/
NVIDIA_GLX-1.0-3123/usr/share/doc/
NVIDIA_GLX-1.0-3123/usr/share/doc/NVIDIA_Changelog
NVIDIA_GLX-1.0-3123/usr/share/doc/XF86Config.sample
NVIDIA_GLX-1.0-3123/usr/share/doc/README
NVIDIA_GLX-1.0-3123/usr/share/doc/README.DE
NVIDIA_GLX-1.0-3123/usr/share/doc/license.txt
NVIDIA_GLX-1.0-3123/Makefile
[root@europa source]# cd NVIDIA_kernel-1.0-3123
[root@europa NVIDIA_kernel-1.0-3123]# make install
echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -1`\" > nv_compiler.h
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparen
theses -Wpointer-arith -Wcast-qual -Wno-multichar -O -MD -D__KERNEL__ -DMODULE
-D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -D
__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=3
123 -DNV_UNIX -DNV_LINUX -DNVCPU_X86 -I. -I/lib/modules/2.4.18-14smp/
build/include -Wno-cast-qual nv.c
In file included from nv-linux.h:75,
from nv.c:14:
/lib/modules/2.4.18-14smp/build/include/linux/highmem.h: In function `bh_kmap':
/lib/modules/2.4.18-14smp/build/include/linux/highmem.h:20: warning: pointer of
type `void *' used in arithmetic
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparen
theses -Wpointer-arith -Wcast-qual -Wno-multichar -O -MD -D__KERNEL__ -DMODULE
-D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -D
__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=3
123 -DNV_UNIX -DNV_LINUX -DNVCPU_X86 -I. -I/lib/modules/2.4.18-14smp/
build/include -Wno-cast-qual os-interface.c
In file included from nv-linux.h:75,
from os-interface.c:25:
/lib/modules/2.4.18-14smp/build/include/linux/highmem.h: In function `bh_kmap':
/lib/modules/2.4.18-14smp/build/include/linux/highmem.h:20: warning: pointer of
type `void *' used in arithmetic
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparen
theses -Wpointer-arith -Wcast-qual -Wno-multichar -O -MD -D__KERNEL__ -DMODULE
-D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -D
__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=3
123 -DNV_UNIX -DNV_LINUX -DNVCPU_X86 -I. -I/lib/modules/2.4.18-14smp/
build/include -Wno-cast-qual os-registry.c
In file included from nv-linux.h:75,
from os-registry.c:14:
/lib/modules/2.4.18-14smp/build/include/linux/highmem.h: In function `bh_kmap':
/lib/modules/2.4.18-14smp/build/include/linux/highmem.h:20: warning: pointer of type `void *' used in arithmetic
ld -r -o Module-linux nv.o os-interface.o os-registry.o
ld -r -o NVdriver Module-linux Module-nvkernel
size NVdriver
text data bss dec hex filename
894637 55508 52396 1002541 f4c2d NVdriver
Warning: loading /lib/modules/2.4.18-14smp/kernel/drivers/video/NVdriver will ta int the kernel: non-GPL license - NVIDIA
See http://www.tux.org/lkml/#export-tainted for information about tainted modu les
Module NVdriver loaded, with warnings
NVdriver installed successfully.
[root@europa NVIDIA_kernel-1.0-3123]# cd ../NVIDIA_GLX-1.0-3123
[root@europa NVIDIA_GLX-1.0-3123]# make install
Removing all old and conflicting files!
rm -f //usr/lib/libGL.*
rm -f //usr/lib/libGLcore.*
rm -f //usr/X11R6/lib/libGL.*
rm -f //usr/X11R6/lib/libGLcore.*
rm -f //usr/X11R6/lib/modules/extensions/libGLcore.*
rm -f //usr/X11R6/lib/modules/extensions/libglx.*
Installing new drivers
install usr/lib/libGL.so.1.0.3123 //usr/lib
install usr/lib/libGLcore.so.1.0.3123 //usr/lib
install usr/X11R6/lib/modules/drivers/nvidia_drv.o //usr/X11R6/l ib/modules/drivers
install usr/X11R6/lib/modules/extensions/libglx.so.1.0.3123 //usr/X11R6 /lib/modules/extensions
if [ `uname -m` != "ia64" ]; then \
install usr/X11R6/lib/libXvMCNVIDIA.a //usr/X11R6/lib/libXvMCNVIDIA.a; \
install usr/X11R6/lib/libXvMCNVIDIA.so.1.0.3123 //usr/X11R6/lib/libXvMCN VIDIA.so.1.0.3123; \
fi
/sbin/ldconfig -n //usr/lib
/sbin/ldconfig -n //usr/X11R6/lib
cd //usr/lib/; ln -fs libGL.so.1.0.3123 libGL.so
cd //usr/X11R6/lib/modules/extensions; \
ln -fs libglx.so.1.0.3123 libglx.so
Installing documentation in //usr/share/doc/NVIDIA_GLX-1.0
mkdir -p //usr/share/doc/NVIDIA_GLX-1.0/include
cp -r usr/include/* //usr/share/doc/NVIDIA_GLX-1.0/include
cp -r usr/share/doc/* //usr/share/doc/NVIDIA_GLX-1.0
[root@europa NVIDIA_GLX-1.0-3123]#pico /etc/X11/XF86config
UW PICO(tm) 4.2 File: /etc/X11/XF86Config Modified


# File generated by anaconda.

Section "ServerLayout"
Identifier "Anaconda Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
#

InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"

# The location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.

RgbPath "/usr/X11R6/lib/X11/rgb"

# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.

FontPath "unix/:7100"

EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
# Load "dri"
# Load "GLcore" <-- this is not on RH8.0, older versions only!!
Load "glx"
Load "record"
Load "freetype"
Load "type1"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"

# Option "AutoRepeat" "500 5"

# when using XQUEUE, comment out the above line, and uncomment the
# following line
# Option "Protocol" "Xqueue"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"

# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"

# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
#Option "XkbVariant" ""
#Option "XkbOptions" ""
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection

#


Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
HorizSync 30.0-95.0
VertRefresh 50.0-160.0
Option "dpms"


EndSection

Section "Device"
# no known options
Identifier "NVIDIA GeForce 2 GTS (generic)"
Driver "nvidia"
VendorName "NVIDIA GeForce 2 GTS (generic)"
BoardName "NVIDIA GeForce 2 GTS (generic)"

#BusID
EndSection

Section "Screen"
Identifier "Screen0"
Device "NVIDIA GeForce 2 GTS (generic)"
Monitor "Monitor0"
DefaultDepth 24

Subsection "Display"
Depth 24
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

EndSection
Section "DRI"
Mode 0666
EndSection


after you save the file, then restart X (or reboot your computer, which ever you prefer) with a ctrl-alt-backspace, and if necessary, then startx. a lot of people make this much harder than it really needs to be. its really very simple, anyone can do it!!
 
Old 12-30-2002, 12:44 PM   #3
jspencerg
LQ Newbie
 
Registered: Dec 2002
Location: oregon
Posts: 2

Original Poster
Rep: Reputation: 0
Hello,
Thanks for the detailed reply. I have downloaded the two files. What directory should I copy them to? I am not able to get to the internet through linux.
Please give me more explanation for:
edit: also, make sure you have kernel headers and kernel source rpms installed for what ever kernel you are currently running. VERY IMPORTANT!

Thanks again. I am eager to try this!

Jeff
 
Old 12-30-2002, 02:20 PM   #4
membrax
Member
 
Registered: Nov 2002
Location: 50'48''N - 4'21''E
Distribution: SuSE7.1 - SuSE8.1 - SuSE8.2 - RH6.2 - RH7.1 - RH7.3 - RH8.0 - RH9.0 - Fedora Core 1
Posts: 281

Rep: Reputation: 30
Pal, hereunder the COMPLETE & DETAILED procedure :

First, visit the Linux section of the nVidia driver download area and get the following two files:

NVIDIA_GLX-1.0-4191.src.rpm (at top of page)
NVIDIA_kernel-1.0-4191.src.rpm (at bottom of page)

Save these files to your machine. Now, open up a terminal (konsole, gnome-terminal) and become root (also called superuser). Change to the directory containing the packages and install them with:

cd /path/to/packages

rpm -i NVIDIA* (or rpm -ivh NVIDIA* for verbose output and to print hash marks [#] indicating installation progress)

Since these are only source packages, we haven't actually installed any drivers yet, we've just placed the necessary files onto the system to get us started. To verify that everything is where it should be, issue the command:

ls /usr/src/redhat/SPECS/

You should see two files listed: NVIDIA_GLX.spec and NVIDIA_kernel.spec These two files simply tell RPM how to create packages using the source files. These source files were installed into /usr/src/redhat/SOURCES. Once you're satisfied everything went according to plan:

cd /usr/src/redhat/SPECS

This is the directory the source packages were installed into. /usr/src also contains the source code for the Linux kernel itself (assuming it was selected when you installed Psyche). Once inside the /usr/src/redhat directory, you might want to take a look around and see if you can get a feel for what the various directories are for. If you aren't comfortable with that, don't worry, it's not necessary. Next, the hard part (if you've been exploring, before you proceed make sure your working directory is /usr/src/redhat/SPECS – you can use the pwd command to display this for you):

rpmbuild -bb NVIDIA* (“rpmbuild” should be self-explanatory, the bb means “build binary” -- man rpmbuild at the console or #rpmbuild into Konqueror's address bar or a command box for more information)

It should only take a few minutes for the two packages to be built. You'll see information scrolling by as your request is carried out. Don't worry if you don't know what any of it means, since not many people do. Once the build process finishes, you're almost there. Now, to install the packages we just built:

cd /usr/src/redhat/RPMS/i386/ (this is where rpmbuild puts the packages after they are ready)

rpm -Uvh NVIDIA*

RPM will process for a moment, indicating its progress with hash marks and by displaying a percentage. If all has gone well, you should see both packages install and then be returned to a command prompt. At this point, I would suggest you view the README located on nVidia's website, as it contains a great deal of information about using, troubleshooting and customizing the nVidia drivers. For the impatient, I'll include here the minimum changes you need to make to your system to get the drivers working.

At this point the drivers themselves are installed and ready to go. Now all we have to do is tell XFree86 we want to use them instead of its own drivers. Since this requires making changes to the (vitally important!) XFree86 configuration file, we'll make a backup copy of it before going any further. This is extremely important! Without a clean working copy of this file, you will not be able to access your desktop.

cp /etc/X11/XF86Config /etc/X11/XF86Config-original

Now if you manage to mangle XF86Config you can copy XF86Config-original to XF86Config and start over with a known-good configuration. For those of us who aren't vi or emacs aficionados, Red Hat has included an excellent screen-based text editor called pico. Considering the number of capable and friendly GUI-based editors included with modern Linux distributions, you might question the need for using or even being aware of console-based alternatives -- until, like now, you're doing something that has the potential to render your GUI unavailable. As a general rule, you should always have a familiar console-based editor available for just such times. There are few things more frustrating than needing to make a simple change to a configuration file and being stumped because you have no idea how to do so from the command line. That being said, still as root user, issue the command:

pico -w /etc/X11/XF86Config (always use the -w switch with configuration files, since it prevents pico from applying any line wrapping and thus mangling the file)

Locate the line containing Driver "nv" and replace it with Driver "nvidia". To search in pico you press CTRL+W and enter the search term (shortcuts are displayed at the bottom of the interface). Now, find the section called Module and make sure Load "glx" is one of the entries. If not, add it to the list. Also in the Module section, remove or comment out any lines that contain Load "dri" and Load "GLcore". (You comment out a line by prefacing it with a hash mark, as in #Load "GLcore".)

That's it! You should be ready to go. Save all your work, and press CTRL-ALT-BACKSPACE to restart the X server. If all went well, you should see the nVidia splash screen pop up briefly and then be presented with the standard GDM login screen. Once your desktop has loaded, press ALT+F2 to bring up a command box and type in tuxracer (this assumes TuxRacer is installed, of course) to test your new drivers. If something has gone wrong along the way, make sure the nVidia packages are installed correctly and that your changes to XF86Config are correct (now you'll see why I pointed out the need for a backup file and an easy-to-use editor!).

rpm -qa |grep NVIDIA will query the RPM database for any installed package with "NVIDIA" in its name (as always, case matters). If you don't see both packages listed, something has gone wrong. Back up to the section that explains building the packages and try again.


This should be quite helpful.
 
Old 08-03-2003, 04:02 PM   #5
tbh_grey_fox
LQ Newbie
 
Registered: Aug 2003
Distribution: Red Hat 9.0
Posts: 7

Rep: Reputation: 0
Hi,

Sorry to ask dumb questions but I'm having trouble locating the rpms and on attempting to install the tarballs I get compile errors on running "make install".

Could you give me a link to the correct driver

Thanx
 
Old 08-03-2003, 04:06 PM   #6
tbh_grey_fox
LQ Newbie
 
Registered: Aug 2003
Distribution: Red Hat 9.0
Posts: 7

Rep: Reputation: 0
My appologies,

After using my eyes I've found them

However I get this on attempting to install

Quote:
#rpm -i NVIDIA_kernel-1.0-4191.src.rpm
warning: user buildmeister does not exist - using root
warning: group buildmeister does not exist - using root
warning: user buildmeister does not exist - using root
warning: group buildmeister does not exist - using root

Last edited by tbh_grey_fox; 08-03-2003 at 04:23 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GeForce FX 5200 and Redhat 9 Dyne Linux - Hardware 27 12-26-2004 06:20 PM
GeForce FX 5200 Redhat 8.0 ksalopek Linux - Hardware 1 12-18-2004 05:01 AM
radeon, geforce, and redhat 9 JC404 Linux - Hardware 4 04-09-2003 08:54 AM
Using a GeForce 2 GO on RedHat 8.1 hamster Linux - Hardware 2 04-03-2003 11:03 PM
geforce 4 mx and redhat 8 Gregor Linux - Hardware 2 03-09-2003 07:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration