# error inserting nvidia: invalid module format {SOLVED}

## yuiichi

I just upgraded my 2.4 kernel to 2.6.7, and am having major problems with xserver.  It just won't load.  I've tried many things to get my nvidia drivers going, such as

```
ACCEPT_KEYWORDS="~x86" emerge nvidia-kernel

```

to get the newest one, and 

```
modprobe nvidia
```

do load the module.  But i got the error

```
Error inserting nvidia (/lib/modules/2.6.7-gentoo-r9/video/nvidia.ko): invalid module format
```

I really want to get back into my DE.  Please help!

----------

## NeddySeagoon

yuiichi,

Have  you updated modutils ?

The old one does not work with 2.6 kernels.

Also, the kerenl options 4k stacks is only just fixed for nvida-kernel and regparams still breaks binary modules.

----------

## yuiichi

I'll try that, but what exactly would it change?

----------

## NeddySeagoon

yuiichi,

It updates modprobe and friends to work with the new format 2.6 modules. Backwards compatibility is obtained be renaming the old tools, and callign them when requred.

If you have things like modinfo.old, modprobe.old etc, tou already have the update.

----------

## yuiichi

Well, i updated modutils, but that sort of messed me up even more.  It will not locate the nvidia module any more, and also it keeps screaming FUNCTION HAS NOT BEEN IMPLEMENTED at me.  Any more suggestions?

----------

## yuiichi

Ok, i fixed that problem... but the nvidia driver still won't load.  This is driving me nuts!

----------

## dfy

With 2.6.7, you need the ~x86 versions of the nvidia tools.

Do:

ACCEPT_KEYWORDS="~x86" emerge nvidia-kernel nvidia-glx

and everything should be fine.

----------

## yuiichi

Yeah, but they wouldn't build with the kernel version that i had, 2.6.7-r9.  I think that was the problem.  I'm emerging the 2.6.7 kernel as we speak, the latest stable version, so i expect that to work.  Thanks for your replies!

----------

## yuiichi

Yes, the stable version of 2.6.7 solved my problems.  Now, it is working perfectly!

To emerge the latest stable version do: 

```
emerge development-sources
```

Then compile it.  After you boot it, emerge the nvidia drivers.  Hope anyone with the same problem as i had will fix it by looking at this thread!

----------

## think-x

this helped me so much. the only prob was i got a little confused when NeddySeagoon said "Have you updated modutils?" because you really need to: 

```
emerge module-init-tools
```

 Otherwise, this was exactly the help i needed. Thanks guys.

----------

## kostja

Thank you!

mfG Konstantin

----------

## 00tux

I have exactly the same prob and this link was given to me by radonsg   :Very Happy:  . I have gentoo-dev-sources 2.6.7-r8 so this means that I MUST recompile my kernel if I have the latest version of or will using non tested ~x86 packages work.

EDIT: I just went and looked did a emerge -p of nvidia-kernel and it wants me too install a 2.4 version kernel as a dependancy! I'm extremely confused

----------

## 00tux

Is there some way to get around my problem? Will injecting the 2.4 kernel it wants work?

----------

## hadfield

 *00tux wrote:*   

> Is there some way to get around my problem? Will injecting the 2.4 kernel it wants work?

 

Check your world file (/var/cache/edb/world) for the 2.4 kernel. It's probably still in there somewhere. And if it is, delete the line that specifies it.

----------

## RexM

dfy, your fix worked prefectly for me.  Thank you.

----------

