View Full Version : New to Linux, installing nvidia drivers

11-19-2005, 05:30 AM
Hi, I'm having a real hard time getting these drivers installed, so far i have got to the stage of of running sh NVIDIA-Linux-x86-1.0-*DRIVERVERSION*-pkg1.run from the boot to console option when you start up as to avoid closing x server or whatever it is as i couldent figure out how to shut it down. The installer runs and tells me something about compiling my kernel, then it tries to download a precompiled kernel or something and fails and tells me i should tell it where my kernel headers are??? so basically im stabbing in the dark here anyway being a complete linux noob and struggling with the terminology.. Can you tell me where to find/download the kernel headers and step by step tell me what to do / what to write in the console to install the nvidia drivers. I've installed knoppix to my harddrive by the way.
Many Thanks
Appreciate any help

If you can it would very helpful for a 1 to 1 convo on irc
irc.quakenet.org #linux as DigitalMaster or billzZzoOo :?

Thought I would add the Nvidia Log file, Ive searched the forums for this and found someone else dating from June with the same problem, but noone answered his problem

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Sat Nov 5 16:05:10 2005

option status:
license pre-accepted : false
update : false
force update : false
expert : false
uninstall : false
driver info : false
no precompiled interface: false
no ncurses color : false
query latest driver ver : false
OpenGL header files : false
no questions : false
silent : false
XFree86 install prefix : /usr/X11R6
OpenGL install prefix : /usr
Installer install prefix: /usr
kernel include path : (not specified)
kernel install path : (not specified)
proc mount point : /proc
ui : (not specified)
tmpdir : /tmp
ftp site : ftp://download.nvidia.com

Using: nvidia-installer ncurses user interface
-> License accepted.
-> No precompiled kernel interface was found to match your kernel; would you li
ke the installer to attempt to download a kernel interface for your kernel f
rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: Yes)
-> No matching precompiled kernel interface was found on the NVIDIA ftp site;
this means that the installer will need to compile a kernel interface for
your kernel.
-> Kernel include path: '/usr/src/linux/include'
-> Performing cc_version_check with CC="cc".
-> Cleaning kernel module build directory.
executing: 'cd ./usr/src/nv; make clean'...
rm -f nv.o os-agp.o os-interface.o os-registry.o nv-linux.o nv_compiler.h *
.d NVdriver nvidia.o
-> Building kernel module:
executing: 'cd ./usr/src/nv; make nvidia.o SYSINCLUDE=/usr/src/linux/include
echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -n 1`\" > nv_compiler.h
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wp
arentheses -Wpointer-arith -Wno-multichar -Werror -O -MD -D__KERNEL__ -DMO
RANGE_4 -I. -I/usr/src/linux/include -Wno-cast-qual -Wno-error nv.c
In file included from /usr/src/linux/include/linux/vmalloc.h:8,
from nv-linux.h:72,
from nv.c:14:
/usr/src/linux/include/linux/highmem.h: In function `bh_kmap':
/usr/src/linux/include/linux/highmem.h:20: warning: pointer of type `void *'
used in arithmetic
nv.c: In function `nvos_malloc_pages':
nv.c:397: warning: use of cast expressions as lvalues is deprecated
nv.c: In function `nvos_create_alloc':
nv.c:525: warning: use of cast expressions as lvalues is deprecated
nv.c:535: warning: use of cast expressions as lvalues is deprecated
nv.c: In function `nv_alloc_file_private':
nv.c:1173: warning: use of cast expressions as lvalues is deprecated
nv.c:1184: warning: use of cast expressions as lvalues is deprecated
nv.c: In function `nv_kern_open':
nv.c:1246: warning: use of cast expressions as lvalues is deprecated
nv.c: In function `nv_kern_ctl_open':
nv.c:1910: warning: use of cast expressions as lvalues is deprecated
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wp
arentheses -Wpointer-arith -Wno-multichar -Werror -O -MD -D__KERNEL__ -DMO
RANGE_4 -I. -I/usr/src/linux/include -Wno-cast-qual -Wno-error os-agp.c
In file included from /usr/src/linux/include/linux/vmalloc.h:8,
from nv-linux.h:72,
from os-agp.c:24:
/usr/src/linux/include/linux/highmem.h: In function `bh_kmap':
/usr/src/linux/include/linux/highmem.h:20: warning: pointer of type `void *'
used in arithmetic
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wp
arentheses -Wpointer-arith -Wno-multichar -Werror -O -MD -D__KERNEL__ -DMO
RANGE_4 -I. -I/usr/src/linux/include -Wno-cast-qual -Wno-error os-interface
In file included from /usr/src/linux/include/linux/vmalloc.h:8,
from nv-linux.h:72,
from os-interface.c:26:
/usr/src/linux/include/linux/highmem.h: In function `bh_kmap':
/usr/src/linux/include/linux/highmem.h:20: warning: pointer of type `void *'
used in arithmetic
os-interface.c: In function `os_alloc_contig_pages':
os-interface.c:292: warning: use of cast expressions as lvalues is deprecate
os-interface.c: In function `save_wb':
os-interface.c:736: warning: use of cast expressions as lvalues is deprecate
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wp
arentheses -Wpointer-arith -Wno-multichar -Werror -O -MD -D__KERNEL__ -DMO
RANGE_4 -I. -I/usr/src/linux/include -Wno-cast-qual -Wno-error os-registry.
In file included from /usr/src/linux/include/linux/vmalloc.h:8,
from nv-linux.h:72,
from os-registry.c:14:
/usr/src/linux/include/linux/highmem.h: In function `bh_kmap':
/usr/src/linux/include/linux/highmem.h:20: warning: pointer of type `void *'
used in arithmetic
ld -r -o nv-linux.o nv.o os-agp.o os-interface.o os-registry.o
ld -r -o nvidia.o nv-linux.o nv-kernel.o
-> done.
-> Kernel module compilation complete.
ERROR: Unable to load the kernel module 'nvidia.o'. This is most likely
because the kernel module was built using the wrong kernel header files.
Please make sure you have installed the kernel header files for your
kernel; on Red Hat Linux systems, for example, be sure you have the
'kernel-source' rpm installed. If you know the correct kernel header
files are installed, you may specify the kernel include path with the
'--kernel-include-path' commandline option.
-> Kernel module load error: insmod: error inserting './usr/src/nv/nvidia.o':
-1 Invalid module format
ERROR: Installation has failed. Please see the file
'/var/log/nvidia-installer.log' for details. You may find suggestions
on fixing installation problems in the README available on the Linux
driver download page at www.nvidia.com.

11-19-2005, 11:50 PM
Some help maybe please?

Harry Kuhman
11-20-2005, 12:13 AM
Some help maybe please?
Knoppix is a live CD. It doesn't contain the Nvidia drivers, to my understanding this is because Nvidia licensing doesn't make their driver freely redistributable in this way.

There is Games Knoppix (DVD) that does contain the driver. Apparently the author of Games Knoppix is not quite as concerned about honoring Nvidias intilectual property rights as Klaus is, but I personally think Klaus is taking the proper approach.

If you are asking this because you plan to remaster the Knoppix disc, then it woul be best asked in the remastering forum, not the new to Linux forum.

If you have decided that Installing Knoppix to hard disk is a good idea, then you must know or at least think you know a lot more than many of the posters here. So it's not clear why you would think we can help you, but such a post would belong in the hard disk install forum.. Personally I would install Debian instead, and then installing a Nvidia driver should be straight forward.

11-20-2005, 01:13 AM
I've already installed it to my harddrive, And got quite far into the nvidia install process, the only information i need is how to run the installer to tell the drivers where the kernal headers are and whats it called, basically i need the command, something like this id imagine, sh NVIDIA-installer-package-pg1.run kernel-headers /blah/knoppix-kernel-headers

11-20-2005, 01:59 AM
ok, so I've tried this from the console login
u root
modprobe -q agpgart
sh NVIDIA-Linux-x86-1.0-7167-pkg1.run --kernel-source-path linux-kernel-headers-knoppix
it tells me something about Linux-kernel-headers-knoppix not a directory or smt
Any help please

11-21-2005, 06:59 PM

Here is, a very old, posting, I had hoped would have been made into a WiKi, but, after looking, didnt find it. It may be a little "out-dated", but, the process is, probably, still the same, just the download files, and gcc version information, may need to be made "current".

Not sure what version of Knoppix, I had this document made for, but, if you search through the document, I am quite sure, code will tell you... I was running v3.2, or v3.3 at the time this document was "created"... Since then, I have moved to Kanotix, and this document has been "left behind"... This "posting" is probably, on of my "pre-1000" posts, so, it is quite dated.

Hopefully, it can help... It had everything "inclusive" - from getting kernel source, kernel headers, changing gcc version, getting NVidia drivers, compiling a new Knoppix kernel, and including the NVidia driver and settings. PLUS, had the documentation for changing your gcc version BACK to its original version ( was a problem back in the v3.x days, kernels were compiled with a earlier version of gcc, than what was current, so you needed to compile your kernel with the early gcc version. This may have also changed with newer versions of Knoppix. )

Ms. Cuddles

After I made the BIG mistake of doing a Dist-Upgrade, and stomping all over my NVidia Video Card Drivers, installed into the kernel, through a source compile, I took a "step-by-step" someone had created, and I used to "initially" get them running, doctored it up a little, added clues to getting your drivers back, after the fact, etc...

If this can be "polished" a little better, and maybe added somewhere, so that maybe others can benefit from this HELL I went through, it might make someone's life a little easier Question

This process was created by Naventus, in the Knoppix Forum "Hdd Install", under the topic of
"Guide to Installing NVIDIA Drivers under 2.6.6", I cleaned up some commands, like having to
remove a symlink, when you can just create a symlink with the "-f", or force, option... I also
added a little more for "future" usage, like checking what gcc's symlink is previously, so that
you can point it back to its original version after completing the process, and since I made the mistake of doing a Dist-Upgrade, how to get back your drivers, still using this step-by-step...

Thanks to the helpful posts of Miilltek, Shah, and Kelmo, I am proud to say that I have
successfully installed the NVIDIA drivers under 2.6.6. I am going to quickly put all the
instructions and some clarifications so that newbs like me can also make this work.

( authors addition: I have successfully installed NVidia, twice, once straight through this
process, completely, and the second, after doing the Dist-Upgrade mistake, using this same
step-by-step, from where I marked it )

I will use http://knoppix.net/forum/viewtopic.php?t=10677&sid=817d4a9f875eadd33d4f7083a3639b31
as the core of this guide. I will just fix up some typos and try to explain what's going on with
my limited knowledge of linux.

( Authors Note: lines beginning with "..." are comments from myself, do not enter them )

Fire up a ROOT Konsole. If you have a "normal" user Konsole, do the following: su

cd /usr/src
... Fire up your internet connection ... <--- this is a comment...
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
... You can either leave your internet connected, or drop it here ...
cp linux-2.6.6.tar.bz2 /usr/src
tar jxvf linux-2.6.6.tar.bz2
ln -sf linux-2.6.6 linux
cp /boot/config-2.6.6 linux/.config
cd linux/include
ln -s asm-i386 asm
cd .. (again, check to see if linux-2.6.6 is in the folder usr)
make oldconfig
patch -p1 <../knoppix-kernel26.patch
... (*) ...
cd /usr/bin
... Check which version gcc is pointing to... and use it after completion ...
... I am going to use the gcc-3.3 as an example, the below command would show:
... gcc -> gcc-3.3
... So, in that case, the "current" gcc version is 3.3 - remember this for after we finish
. the compiling
ls -la gcc
ln -sf gcc-2.95 gcc
cd /usr/src
make (this will compile your kernel, will take sometime to finish- on my 2.4 around 1 hour) ...
( authors note: on my 2.6, it went a little faster, but still takes some time )

***** If you accidently do a Dist-Upgrade, and your NVidia Drivers are "stomped" on, you can
just continue here, and not do the above steps... ( counted that you previously did all the
above steps before... i.e. you did all of this before, and then messed it all up with a
Dist-Upgrade, and had NVidia update on you. ) You will still need to do the following from above
though: ( goto above steps marked (*), and follow down... ( Exclude the "make" from above
though! ) ) )


... If you didnt leave your internet connection still connected, connect it now ...
apt-get update
apt-get install nvidia-kernel-common nvidia-kernel-source
tar zxvf nvidia-kernel-source.tar.gz
cd modules/nvidia-kernel
debian/rules KSRC=/usr/src/linux-2.6.6 KVERS=2.6.6 kdist_image
cd ..
... Change the below .deb package to reflect the file you have, each "version" of the NVidia
... Drivers will create a specific file, with the "version" being changed in the file name
... Below is assuming you used NVidia Drivers 1.05336-6, I used the newer 1.06111-1 Drivers,
... and my .deb file was "nvidia-kernel-2.6.6_1.0.6111-1_i386.deb" - just as a side note...
dpkg -i nvidia-kernel-2.6.6_1.0.5336-6_i386.deb
apt-get install nvidia-glx

... If the above "apt-get install" or the one that installs the "nvidia-kernel" -common and
... -source packages, reports that they are already current, and you are trying to recover from
... an accidental Dist-Upgrade, you might want to change those "apt-get install" 's to the
... following: "apt-get --reinstall install" -=- you can never be "too" careful :)

... You no longer need a internet connection from this point on, you can drop it now ...
cd /usr/bin
... repoint the symlink for gcc back to what it was previously... See above, if the previous
... version was 3.3 you can use the below command exactly, if your version is 3.4, then use
... "gcc-3.4" instead
ln -sf gcc-3.3 gcc

... Now, some updating of files, to make the drivers installed above, "active"
Edit /etc/X11/XF86Config-4 :

Drivers Section
Replace "nv" with "nvidia"

Modules Section
Remove or comment out lines including "dri" and "GLCore"
Ensure there is a line with Load "glx"

Hopefully I added just a miniscule amount of polish; I think most people will now be able to use
these instructions without having to play around too much/meet troubles.

On a side note, my glxgears fps jumped from 290 to 1560ish... how acceptable is 1560 for a
Geforce 2 MX200 PCI 32 MB card?
( as a side note from this author, my glxgears are running at 284 FPS, with a GeForce 4 MX440
AGP, now if we want to compare "five second" timings, which I think thats what your "15xx"
number is, I am around 2000 per 5 second timings )