# Problems with nvidia driver installation

## Jykke

I am desperately trying to install nvidia drivers for my GeForce 6200.

First it would not even compile until I enabled modular support for /dev/agp something.

I do emerge nvidia-glx 

after modprobe nvidia I get 

FATAL: Error inserting nvidia (/lin/modules/2.6.15.1/video/nvidia.ko): Invalid module format

I look at the dmesg and I have nvidia: version magic '2.6.15.1 SMP 586 4KStacks gcc-3.4' should be '2.6.15.1 SMP 486 4KSTACKS gcc-3.4'

I suppose I have wrong CPU support in kernel? I had 486 but I have Athlon XP shouldn't it be 586 rather than 486?

----------

## NeddySeagoon

Jykke,

Welcome to Gentoo.

The problem is not so much wrong kernel support in the kernel as changed CPU support in the kernel between compiling the kernel and the nvidia module.

The version magic must match between the kernel file and its modules, or the modules will not load.

If you force them to load they may not work.

You should not need agp support for the nvidia driver, it can provide its own. You do need mtrr support though. Also, be aware that driver version 1.0.6629 will not work with your kernel. Do e

```
merge -s nvidia-glx
```

to check the version. You may well need to unmask the testing version.

Post back about that if you need more help. You can read about it in 

```
man portage
```

look at the section on package.keywords

----------

## ashtrash

Refering to cpu support in kernel - there should be an option to choose Duron/Athlon support. I had also some weird settings according to my cpu. I changed it some time ago to Duron, and all is well (but it didn't solve my nVidia problems, I doubt it'll solve yours).

I'd aware you that installing nVidia can sometimes take some time, but (after success in installing mine) - i belive each of their card can be properly installed. Just don't give up.

----------

## Jykke

Ok I have 1.06629r7 it seems. I tried recompiling kernel with 486 support but I still get the same error message in dmesg!?!

there are some instructions for masking newer drivers but I have no idea how to unmask 

a testing version?

----------

## NeddySeagoon

Jykke,

Hmm 486 support is not what you need for an Athlon-XP.  Choose Athon, instead, its a i686 compatible CPU. While you are there, turn off SMP, its only needed if you. have 2 or more CPUs.

Create a new file called /etc/portage/package.keywords

```
nano -w /etc/portage/package.keywords
```

Enter two lines ...

```
media-video/nvidia-kernel ~x86

media-video/nvidia-glx ~x86
```

and save the file. This unmasks the testing nvidia driver.

I have a feeling it has other testing dependancies (2), in which case 

```
emerge nvidia-glx
```

will fail because they are masked. Add them to this file too. The error message will give the names one at a tiem.

----------

## jonnevers

 *Jykke wrote:*   

> Ok I have 1.06629r7 it seems. I tried recompiling kernel with 486 support but I still get the same error message in dmesg!?!
> 
> there are some instructions for masking newer drivers but I have no idea how to unmask 
> 
> a testing version?

 

put

```
media-video/nvidia-kernel ~x86

media-video/nvidia-glx ~x86

media-video/nvidia-settings ~x86

app-admin/eselect ~x86

app-admin/eselect-opengl ~x86
```

into /etc/portage/package.keywords.

```
emerge -upv nvidia-kernel nvidia-glx
```

This should get you up to the 8xxx series of Nvidia drivers. While they are in the ~ARCH (unstable) branch on gentoo they are still binary drivers delivered by nvidia. So in my opinion, I think the newest in portage should always be used.

also in your kernel you should specify that you have an athlonxp CPU (k6 amd, is another name I believe). OH and make sure /usr/src/linux points to the kernel source for the currently running kernel.

- Jon

----------

## Jykke

Still no luck - 

in dmesg earlier I still have this note about gcc compiler. I don't get it, I changed the stuff in kernel - 

However, I used normal make menuconfig should I have used genkernel?

then in the end of dmesg I get:

nvidia:disagrees about version of symbol struct_module

???

----------

## Jykke

Ash seems to be my mixup with genkernel and make menuconfig - I need to 

change lilo.conf - funny I had this feeling it changed something but obviously 

boot image is not taken ... beats me

----------

## jonnevers

 *Jykke wrote:*   

> Still no luck - 
> 
> in dmesg earlier I still have this note about gcc compiler. I don't get it, I changed the stuff in kernel - 
> 
> However, I used normal make menuconfig should I have used genkernel?
> ...

 

and you recompiled the kernel and then copied the new kernel to /boot and actually booted the newly configured kernel? then while in this new kernel re-emerged nvidia-kernel nvidia-glx?

genkernel will not solve this problem.

the kernel and the nvidia module (afaik) need to be compiled with the same version of gcc.

unfortunately, i don't use lilo so i cannot be of any help there (i use grub)

----------

## Jykke

Ok thx a lot guys after two bottles of red wine, two reinstalls I finally got kernel up to the task and

nvidia drivers in. X starts

funny encounter after I got kernel in and booting with net support I did an unworldy deed

"emerge links" cause I thought it would be kinda cool to have terminal browser.

It installed at least X-server and I believe kde as well 44 packages went and watched a film

should teach me something about option -p

----------

