PDA

View Full Version : Guide to Installing NVIDIA Drivers under 2.6.6



naventus
06-27-2004, 09:43 PM
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.

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.

su
cd /usr/src (you need to start here. I had problems because I started in root)
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
cp linux-2.6.6.tar.bz2 /usr/src
tar jxvf linux-2.6.6.tar.bz2 (check to see if these files have been put into /usr/src)
rm -f linux
ln -s 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
rm -f gcc (the kernel image was compiled with gcc-2.95 but symlink is to gcc-3.3)
ln -s 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)

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 ..
dpkg -i nvidia-kernel-2.6.6_1.0.5336-6_i386.deb
apt-get install nvidia-glx
cd /usr/bin (typo here)
rm -f gcc
ln -s gcc-3.3 gcc

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?

kelmo
06-28-2004, 07:11 AM
Good to see you had some success. I must have missed your request. Did you say that this procedure works after a 'beginner' type install?

naventus
06-28-2004, 05:26 PM
Yea. This worked under a 2.4 kernel beginner install of knoppix 3.4. I used, however, the 2.6 option in the lilo list (and even removed the other two from the lilo.conf file). I found that under the debian install that the 2.6 kernel had a few more problems booting.

shah
06-29-2004, 03:15 AM
Tip :

If you get " configure: error: C preprocessor "/lib/cpp" fails sanity check" while compiling package; after installing NVIDIA Driver; or you screw up somewhere;it means that your kernel headers are missing from /usr/include. To repair this just simply run as SU :

cd /usr/src
rm -f linux
ln -s linux-2.6.6 linux (you can change to whatever kernel you use)
cp /boot/config-2.6.6 linux/.config (answer no to overwrite)
cd linux/include
ln -s asm-i386 asm

Done.[/b]

Cuddles
07-05-2004, 07:26 PM
Ok, I need some serious help here...

My current situation, and how I got here, can be found in the Froum: General ... Topic: "Nvidia kernel 2.6.6 crash - help" started by myself...

Summary:
Did Kano scripts for Nvidia 6106, and did the sources script, died, it appears, because I can't get into KDE, and am stuck in textual login boot...

I have an "on-motherboard" via kt133 video that appears to be getting the agp and "knocking out" the nvidia - I can't disable this agp within the BIOS, but was working this way back in Knoppix v3.3 fine - so, unless something seriously changed in v3.4 - it should still work in v3.4...

Can I resolve all of this by doing all that you have here?
Also, I can get into KDE, under 2.6.6 if I re-edit XF86Config-4 and replace the "nvidia" back to "nv" - but I get noise lines in my desktop...

I have used the "nv" attempt to just get into KDE to get KPPP running - then do a ctrl-alt-F1 to get root console ( text login ) - but with a internet connection - used this a few times to be able to get the scripts and downloads...

If I go with this re-compile of the kernel - I need more information... ( serious newbie when it comes to kernel source compiling )

1 ) is this done in k2.4 - or can it be done in k2.6.6 boot
2 ) I installed with "debian-like" during the hdd install - does that effect anything
3 ) do I get into KDE and the run a terminal window, or do I drop to ctrl-alt-F1 to do these things
4 ) if I am running outside KDE, I have no clue how to get dial-up internet from a textual boot login prompt

Please explain everything, and where it is done... I have had way too many surprises on this "upgrade" from v3.3 already, and spent since Friday trying to get a "working" v3.4 system ( like I had it, only Thursday, running v3.3 )

I need help, and I hoped to have all this "done" before work Tuesday, and I don't think I'm gonna make it now....

Thanks immensely, forever gratituide,
Ms. Cuddles

Cuddles
07-06-2004, 02:45 PM
Nevermind, it worked flawlessly - pardon some of my "never done a kernel compile" issues...

I do have one question though, considering you did it, and the "cleanness" of your LILO, you must have the answer...

Following through your steps, word for word, and step for step... I kept waiting for a "cp" command to copy the new compiled kernel to the /boot area, or something... and found that, I guess, I compiled "directly" into my "working" booted kernel, right???

I mean, when you compile a program, it gets created where you are compiling, and when it becomes executable, you move it to where it should be, this appears not to be the case with a kernel compile ( I'm lost )

Here is what I did: (for fear of messing something more up during this)
cd /boot
cp config-2.6.6 config-2.6.6pre
cp initrd.img-2.6.6 initrd.img-2.6.6
cp vmlinuz-2.6.6 vmlinuz-2.6.6

added a "duplicate" entry in lilo.conf to point to the 2.6.6pre - and booted under the "...pre" lilo setup...
I then did all the steps you had on your initial post here...

What can I do now? Do I need the ...pre, can I just go back to the 2.6.6 in LILO, or should I rename the 2.6.6pre files back to the 2.6.6 and boot those? Right now, I am booting the 2.6.6pre in LILO thinking that these were the files that the "compile" was done under, can someone give me a clue what I did, or where my "kernel" is, what is my LILO?

Here is what my /boot area looks like, maybe you can figure out from that???

root@Morpheus:/boot# ls -l
total 17484
lrwxrwxrwx 1 root root 17 Jul 2 08:01 System.map -> System.map-2.4.26
-rw-r--r-- 1 root root 582790 Apr 17 13:59 System.map-2.4.26
-rw-r--r-- 1 root root 758043 May 14 14:39 System.map-2.6.6
-rw-r--r-- 1 root root 758043 Jul 5 19:56 System.map-2.6.6pre
-rw-r--r-- 1 root root 512 Jul 2 08:28 boot.0200
-rw-r--r-- 1 root root 512 Jul 2 08:27 boot.0300
-rw-r--r-- 1 root root 512 Jul 2 08:27 boot.1600
-rw-r--r-- 1 root root 42923 Apr 17 13:33 config-2.4.26
-rw-r--r-- 1 root root 53510 May 14 14:37 config-2.6.6
-rw-r--r-- 1 root root 53510 Jul 5 19:56 config-2.6.6pre
lrwxrwxrwx 1 root root 34 Jul 2 08:01 debian.bmp -> /usr/share/lilo/contrib/debian.bmp
lrwxrwxrwx 1 root root 38 Jul 2 08:01 debianlilo.bmp -> /usr/share/lilo/contrib/debianlilo.bmp
drwxr-xr-x 2 root root 4096 Jul 2 08:27 grub
lrwxrwxrwx 1 root root 17 Jul 2 08:27 initrd.img -> initrd.img-2.4.26
-rw-r--r-- 1 root root 3455157 Jul 2 08:27 initrd.img-2.4.26
-rw-r--r-- 1 root root 4062664 Jul 2 08:27 initrd.img-2.6.6
-rw-r--r-- 1 root root 4062664 Jul 5 19:57 initrd.img-2.6.6pre
-rw-r--r-- 1 root root 512 Jul 2 08:27 knoppix-old-mbr.2004-07-02
-rw------- 1 root root 240128 Jul 5 20:05 map
lrwxrwxrwx 1 root root 33 Jul 2 08:01 sarge.bmp -> /usr/share/lilo/contrib/sarge.bmp
lrwxrwxrwx 1 root root 31 Jul 2 08:01 sid.bmp -> /usr/share/lilo/contrib/sid.bmp
lrwxrwxrwx 1 root root 14 Jul 2 08:27 vmlinuz -> vmlinuz-2.4.26
-rw-r--r-- 1 root root 994807 Apr 17 13:59 vmlinuz-2.4.26
-rw-r--r-- 1 root root 1370454 May 14 14:39 vmlinuz-2.6.6
-rw-r--r-- 1 root root 1370454 Jul 5 19:58 vmlinuz-2.6.6pre
root@Morpheus:/boot#

Thanks for any help on the "clean-up" after getting my NVidia working perfectly :D

kelmo
07-07-2004, 07:30 AM
Ms. Cuddles,

If you want to differentiate between two kernels of the same page, chande the Makefile in the root dir of your kernel sources before configuring anything.

The extraversion section is appended to the kernel and all it's important files. Here is an exert from my kernel:-

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 7
EXTRAVERSION = -kls-ck4
NAME=Zonked Quokka

Only lower case, no funny symbols.

This saves your confusion post-install. Also if you install a kernel with the exact same name, the modules in /lib/modules/$KV will cause the install process to tell you so.

Cuddles
07-07-2004, 04:33 PM
Ms. Cuddles,

If you want to differentiate between two kernels of the same page, chande the Makefile in the root dir of your kernel sources before configuring anything.

The extraversion section is appended to the kernel and all it's important files. Here is an exert from my kernel:-

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 7
EXTRAVERSION = -kls-ck4
NAME=Zonked Quokka

Only lower case, no funny symbols.

This saves your confusion post-install. Also if you install a kernel with the exact same name, the modules in /lib/modules/$KV will cause the install process to tell you so.

So, Kelmo, If I understand you correctly...

If I didn't do the above during my kernel compile, it doesn't matter what boot I was under...

Looking at my /boot folder listing, in my previous post, then

...2.6.6 files are the same as ...2.6.6pre files - and that I can removed one "set" of them, and just boot one of them - since nothing was changed other than copying them for LILO to use...

So, even though I booted under the ...2.6.6pre files in /boot (during the kernel compile), the 2.6.6 files will also work to boot off of ????? (and the 2.6.6pre files can be deleted, and the eroneous 2.6.6pre entry in LILO can also be removed)

Thanks for giving me any understanding of what I did, and am, doing here...

Ms. Cuddles
PS - now if someone can make a "Guide to installing ALSA as simple as this, with the NVidia"...

Markus
07-07-2004, 09:18 PM
There's a few howtos on alsa and debian kernel compiling if you google, like:
http://www.desktop-linux.net/debkernel.htm
http://www.sonic.net/~rknop/linux/debian_alsa.html
http://www.osnews.com/story.php?news_id=2949&page=1
http://newbiedoc.sourceforge.net/tutorials/kernel-pkg/index-kernel-pkg.html

BTW, seems to be a matter of taste while I set a kernel version when compiling as in:
fakeroot make-kpkg --append-to-version=.160604 kernel_image (use any date)
And so my lilo.conf contains:
image=/boot/vmlinuz-2.6.6-16.06.04
label="Linux-2.6.6"
read-only

Cuddles
07-08-2004, 04:35 PM
I think I understand now...

So, Markus, if, lets say, I want to rip out the knx-alsa and replace it, in the kernel compile proceedure above, the one I used to get NVidia running, where, and what, would I do???

I assume that I would get the alsa-source tarball, un-tar it into the /usr/src folder, thus creating a sub-folder that contains the source for alsa [?]

Where in the steps above would I "insert" and "remove" this "code" -=- remove = knx-alsa and insert = alsa-source [?]

I looked at the "alsa" information in the link you provided, and, again, I am lost... I am thinking that "some" of the steps in "both" of these articles, the "nvidia compile" and the "alsa compile" get "merged" somewhere, right???

Assuming I did all the steps in this article, as far as the apt-get installs for nvidia, do I need to repeat them again, or can I just "skip" those because I already did them???

Since alsa did not "inherit" from the CD hard drive install proceedure, like it did in v3.3 - I am working with a "seriously" partial install of alsa at the time, so my thought is, since I already went through a kernel compile already, why not do it again, and this time, get alsa working the "right" way...

Thanks to anyone for "further" assistance in this,
Ms. Cuddles

kelmo
07-08-2004, 10:53 PM
Once your kernel source is set up, you can easily compile modules against it. The easiest way is to get the debian source packages through apt.

apt-get install alsa-source nvidia-kernel-source i2c-source etc ...

These tarballs will appear in /usr/src/. When they are extracted they will be in /usr/src/modules.

Then:-
cd /usr/src/linux
make-kpkg modules_image

This will look for all source packages in the modules directory and build them against your kernel creating .deb packages for your convinience.

Cuddles
07-09-2004, 07:03 AM
Kelmo, I think I "kinda" understnad...

Say I did the:
apt-get install alsa-source nvidia-kernel-source i2c-source
cd /usr/src/linux
make-kpkg modules_image

... but I already have the nvidia-kernel-source from the "initial guide" here, so that can be removed from the apt-get install

I would add those .deb packages that I created above, in the steps - looking at the "initial" posting here to get NVidia into the kernel, either just before, or just after the following step:

...
dpkg -i nvidia-kernel-2.6.6_1.0.5336-6_i386.deb
...

and then continue with the rest of the "initial" Guide here...

Right? ( am I getting it now? Is a large 500 watt light bulb going on over my head? )
Ms. Cuddles

Markus
07-10-2004, 01:16 PM
Sorry for the delay, I was at a summer cottage -> no computer/internet :)
You don't have to recompile your kernel as long as you have alsa module support compiled in it.
So compiling alsa etc. will make modules that match your current nvidia kernel and you can just install them with dpkg -i. If I understood you correctly you already went through with the howto, so you can just make and install the modules and be done. Well, you might want to run alsaconf and -mixer but with the kernel you should be done.
EDIT: As often I forgot the question :)
You can install the kernel and alsa and whatnot modules in one go as in: dpkg -i kernel.......deb alsa........deb

Slay3r
07-15-2004, 06:04 AM
Nice very helpfull.

shah
07-15-2004, 08:14 AM
I just installed nvidia new driver (Version: 1.0-6106), but this time I used a different approach. The procedure:
1) To create kernel header
su
cd /usr/src
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
cp linux-2.6.6.tar.bz2 /usr/src
tar jxvf linux-2.6.6.tar.bz2
rm -f linux
ln -s linux-2.6.6 linux
cp /boot/config-2.6.6 linux/.config
cd linux/include
ln -s asm-i386 asm
cd ..
make oldconfig
patch -p1 <../knoppix-kernel26.patch
cd /usr/bin
rm -f gcc
ln -s gcc-2.95 gcc
cd /usr/src
make
(You can skip above procedure if you already done it before. I believe you should uninstall previous NVIDIA driver.)

2) Download NVIDIA installer
http://download.nvidia.com/XFree86/Linux-x86/1.0-6106/NVIDIA-Linux-x86-1.0-6106-pkg1.run

3) Installing the driver
Log out from X , you can just end session and choose console login.
cd /to where you save your NVIDIA installer, and type:
sh NVIDIA-Linux-x86-1.0-6106-pkg1.run

4) 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"

And you're done.
Why I install this new driver? Because it's cool and has "nvidia-settings" utility.

shah
07-15-2004, 09:55 AM
For people who already compile the kernel , you might want to run
export CC=/usr/bin/gcc-2.95 before running sh NVIDIA-Linux-x86-1.0-6106-pkg1.run

Slay3r
07-15-2004, 07:38 PM
After you have compiled the Kernel, how to you set the system to use it ?
Also what can be deleted now its all done ? as in dir's/files created.

shah
07-16-2004, 03:04 AM
For people that has NVIDIA driver up and running, you can just run command :
nvidia-installer --update to update your driver to latest version.

And for Slay3 r, just follow my instruction, then restartx, you will be
okay. You don't need to delete anything because you might want to use that compile kernel/header later on. You can delete all those tar .bz2 if you like.

Slay3r
07-16-2004, 03:16 AM
Thanks, got the NVIDIA drivers working so my screen dont look to bad now but dont look perfect as it isnt centerd etc.

http://www.knoppix.net/forum/viewtopic.php?t=12038

voldemort
07-16-2004, 07:21 PM
in case anyone else has this issue

read several posts and articles on getting nvidia to work with this kernel

all said use l

load glx

in lower case

only way it would work for me is in upercaes

load GLX

in fact im using lates nvidia

only catch dont seem to see the specific driver for my 5700LE

so im using vanilla but works great anyhow

voldemort
07-16-2004, 09:08 PM
in case anyone else has this issue setting up the nvidia driver under 2.6.6
v3.4 5-17 2000

ive read several posts and articles from multiple sources ann all of them said the same thing

load glx


this just wouldnt work for me
so out of the blue i tried

load GLX (note the caps)

and bam it worked

so if you got nvidia loaded but glx dosnt seem to be working try caps

in fact im running 1.0.6106 the lates instead of the 5223 or whatever version is on the posts

ony draw back ive had is dosnt seem to recognize my 5700LE but the vanilla verison seems to work find

shah
07-17-2004, 04:53 AM
Carefull, you might not able to log into kde if you use cap GLX.
I would suggest you use command :
1) glxinfo
2) xdpyinfo|more
to check either your glx working or not.

shah
07-17-2004, 05:05 AM
Another tip:
To test your frame rate, try this command :
glxgears