# nVidia failure after kernel upgrade

## T-O7

Okay,

So I just upgraded my old 2.6.8-r3 kernel to the new 2.6.9-r1 one, and now my nvidia kernel is not loading at startup.  I have already done emerge nvidia-kernel and added nvidia to /etc/modules.autoload.d/kernel-2.6 (and then modules-update), but nvidia still refuses to load.  Instead, on the X server output, i get:

```
(EE) Failed to load module "speedo"

(EE) NVIDIA(0) Failed to initialize the NVIDIA kernel module!

(EE) *** Aborting ***

```

Anyone know what i forgot to do, or what i'm doing wrong?  :Crying or Very sad: 

----------

## ninjabadger

did you emerge nvidia-glx as well, iirc that and nvidia-kernel need to be the same version

do an emerge search and check

----------

## T-O7

Yes, my nvidia-glx is up to date as well.  I just re-emerged it anyway, but that didn't seem to do anything.

----------

## gentoo-Ben

I always have to re-emerge nvidia-kernel after installing a new kernel. The driver always works then.

----------

## T-O7

Yes, the things i did in the first post were after I changed the kernel

----------

## T-O7

Just on another note, when i try modprobe nvidia, i get the following message:

```
FATAL: Error inserting nvidia (/lib/modules/2.6.9-gentoo-r1/video/nvidia.ko)  Unknown symbol in module, or unknown parameter.  See dmesg
```

I'm still nowhere closer to a solution...  :Sad: 

----------

## barcodez

I have the exact same problem too.

----------

## barcodez

OK, this can be fixed by upgrading the nvidia drivers

Add 

```

media-video/nvidia-kernel ~x86

media-video/nvidia-glx ~x86

```

to /etc/portage/package.keywords

and then

emerge nvidia-kernel nvidia-glx

Should all work fine.

----------

## Apreche

I am having this problem as well. I'm typing this from a framebuffer right now. It is very sad. 2.6.9 and nvidia do not seem to be happy together. I did the usual remerging of nvidia-kernel and nvidia-glx after a very standard kernel upgrade. modprobe nvidia cannot find nvidia despite modules-update. I would fix it, but I don't know how.

----------

## hegga

When i installed the masked nvidia drivers in portage all 

problems were solved for me.  :Smile: 

btw: what is the best way of installing masked packages?

----------

## T-O7

Yes!  :Very Happy:    I added the two lines into a (new) file /etc/portage/package.keywords and it worked.  Now, I also had to add another line to the file:

```
x11-base/opengl-update ~x86
```

and emerge opengl-update before I emerge nvidia-glx, because the nvidia-glx depended on it.  But thanks a lot barcodez!

----------

## Apreche

I had this problem, but I just fixed it.  If you had the problem with the same cause that I did, then this is the solution.  Allow me to explain.  

In 2.6.9 there is a new kernel option for local version naming.  The option is called Local version - append to kernel release aka CONFIG_LOCALVERSION. It takes a string parameter as opposed to Y/N/?.  What it does is let you give different kernels different local version names.  Prior to this change let us say that I built a kernel using 2.6.8-r1 gentoo-dev-sources.  The command uname -r would say 2.6.8-gentoo-r1.  Even if I had 2 or 3 differently configured kernels from the same sources uname -r would have the same output.  With localversion you can change this.  Let us say I set localversion to equal -safe.  Then uname -r will print 2.6.9-gentoo-r1-safe.  I can then build the sources again with the name -test, you get the idea. 

I made the mistake when doing make oldconfig of putting in "n".  I thought it was a Y/N/? field, but it was a string.  So uname -r put out 2.6.9-gentoo-r1n.  However, the ebuild for the nvidia-kernel put the modules in /lib/modules/2.6.9-gentoo-r1 while the kernel was looking in /lib/modules/2.6.9-gentoo-r1n.  It is a problem in the ebuild and not any problem in the kernel, drivers or else.  The ebuild needs to figure out where to put the modules based on the localversion instead of whatever it currently uses.  

So at present, if you want to use the nvidia drivers you can either copy them manually from one /lib/modules/dir to the other.  Or refrain from setting the CONFIG_LOCALVERSION option in your kernel to anything but an empty string.  I stuck with the empty string since I usually just stick with one kernel at a time.  And I have a feeling I'm going to be using 2.6.9 for a very long time to come.

----------

## T-O7

Okay, after successfully upgrading my kernel above(several months ago), i am now trying to upgrade my kernel to 2.6.9-gentoo-r9, and after compiling the kernel etc, and re-emerging opengl-update, nvidia-kernel, and nvidia-glx, and then finally doing opengl-update nvidia, my nvidia kernel still refuses to work again!

As above, I still have the three lines of code in my /etc/portage/package.keywords file, but i'm not sure if that still applies now.

Does anyone know what I should do?

----------

## bMd

what version of nvidia-kernel you hav installed?

if nvidia-kernel-1.0.6629-r1, might want 2 check https://forums.gentoo.org/viewtopic.php?t=268416

----------

