# Nvidia-kernel not found after updating kernel.

## MdaG

I just updated to the new gentoo-dev-sources-r4 kernel. Now when I try to start X I get an error message saying that it couldn't find the nvidia kernel. My screen resolution right now is around 640x480 (I disabled the nvidia driver in my xorg.conf to be able to start X). Does anyone know anything about this?

----------

## MdaG

When I do: # modprobe nvidia

I get:

FATAL: Module nvidia not found.

What gives?

----------

## Frodg

MdaG

Check your previous thread about your kernel for replies to this issue.....

----------

## hds

emerge the nvidia stuff again - you have a new kernel and the module has gone. not really a problem, thats normal.

----------

## MdaG

Hehe, I've learned far more by running Gentoo for a week than I did running Mandrake for two months!

Thanks guys!

----------

## Frodg

That seems to be the major comment from most of us.  :Smile: 

Keeps you really busy ....

----------

## Naib

I will have at a guess that the /usr/src/linux symlink is linked to your old linux source and not the new source.

The nvidia-kernel looks for this symlink and then compiles the driver against this source. It then installes it in

 /lib/modules/THE KERNEL VERSION THAT THE SYMLINK POINTS TO/video

I have fallen into that trap soo many times. I always have 2 kernels (compiled and source) on my system - a stable and testing kernel. I always forget when upgrading nvidia driver to relink and emerge again against ney symlink

and you Gentoo has an extrealy high learning curve - but you do learn.

I used Mandrake for about 5year (until switch to getnoo last year) The only thing I learnt from Mandake was RPM dependancy hell!!!!  esp with a big package like a new version of GNOME

----------

## einstein1981

ok, I have a similar problem... It seems that the unmasked nvidia kernel and glx drivers, are not happy with 2.6.9...

I don;t know why..

anyways, the first time I fixed this, it was masking the packages as to get an unstable version... worked perfect , until, emerge world updated my kernel to r4

so i recompile, my kernel, then add the entry in grub ( kept a backup kernel fortunately), and then recompiled the nvidia drivers, ( with the symlink pointing in the right direction) now, all I get, and after trying numerous things ( new driver, old driver..), is the nvidia splash.. then black.. then nvidia splash .. about four times. then, just blank....

could anyone tell me how to fix this... also, 

modprobe nvidia, loads the driver. ls mod, shows the driver is loaded....

----------

## addeman

I have the same trouble... I have no real solution, but what I do is to use the driverpackage from nvidia, which will compile the kernel module, then just modprobe it and run X

Regards

addeman

----------

## sunoterra

At first everything appeared good, but then I noticed and error when the "autoload" runs and all my modules in there load EXCEPT for nvidia. So, I am thinkin' "weird", so I check the following:

 *Quote:*   

> 
> 
> # ls -l /lib/modules/kernel-2.6.9-gentoo-r6/video/
> 
> 

 

And I see...

 *Quote:*   

> 
> 
> -rw-r--r--  1 root root 5180489 Nov 26 10:34 /lib/modules/2.6.9-gentoo-r6/video/nvidia.ko
> 
> 

 

Oooh... even weirder...

Re-emerged nvidia-kernel again, ran "modules-update", rebooted, same problem....

So, stumped, I started unmerging and re-emerging stuff like...

udev

nvidia-glx

nvidia-kernel

Still no luck... Anyone have some insight?

Big thanks in advance.

----------

## sunoterra

Have completed the gentoo migration plan to 2.6. Using udev and most of my system has been recompiled against the linux26-headers. I also have been using gensplash/fbsplash without issue.

OK, built 2.6.9-gentoo-r6 kernel, rebooted, fbsplash working, the modules I want loaded at boot (yenta_socket, agpgart, intel_agp, soundcore, usbcore, uhci_hcd, evdev & psmouse) are loading as expected, it's all good. 

Rebuilt the nvidia-driver against the 2.6.9-gentoo-r6 sources, added "nvidia" to my /etc/modules.autoload.d/kernel-2.6 file and rebooted...

module not found...

----------

## hds

what gives "modprobe nvidia"?

you did run "opengl-update"?

----------

## sunoterra

 *hds wrote:*   

> what gives "modprobe nvidia"?
> 
> you did run "opengl-update"?

 

yep. I did both.

<xterm>

xandra root # opengl-update nvidia

xandra root # modprobe nvidia

FATAL: Module nvidia not found.

xandra root #

</xterm>

It's almost like there is something configged somewhere telling it to look where it is not supposed to look.

 :Idea:  I am going to try unloading the "intel_agp" & "agpgart" modules and then try to load it.

Thanks for the quick response  :Exclamation: 

 :Smile: 

----------

## hds

 *sunoterra wrote:*   

> 
> 
>  I am going to try unloading the "intel_agp" & "agpgart" modules and then try to load it.
> 
> 

 

yes! see also this thread:

https://forums.gentoo.org/viewtopic.php?t=255811&highlight=

unfortunately the other doode didnt report back if it worked for him ;(

----------

## sunoterra

 *sunoterra wrote:*   

> 
> 
>  I am going to try unloading the "intel_agp" & "agpgart" modules and then try to load it.
> 
> 

 

Hey hds,

I tried unloading those modules and still no luck. I kind of skipped over the the 2.6.8 series kernels on my two machines with nvidia video hardware, because I have been working through some dri issues with a two other machines running ati graphics hardware. End of last and early this week, I figured most of those ati issues out, so I set to work steppin' my other machines up the gentoo-dev-sources ladder.

Anyway, last night I emerged the last of the gentoo-dev-sources-2.6.8 (I think it was revision 9) and then went through the same steps that I did with the 2.6.9 version, rebooted, and guess what... the nvidia driver loaded!

Make me so curious...   :Wink: 

Well, on to trying to figure out what is up with the gentoo-dev-sources-2.6.9/nvidia and whether or not a bug has been submitted or not.

Thanks again,

----------

## XhwMikey

I'm having exactly the same problem...

I upgraded from 2.6.9-gentoo-r1 where nvidia was working properly to 2.6.9-gentoo-r4 where I can't get the nvidia module to install.  I did the emerge nvidia-glx, then modprobe nvidia;

(my /usr/src/linux IS symlinked to 2.6.9-gentoo-r4 btw)

Fatal nvidia module not found

I found nvidia.ko in 

/lib/modules/2.6.9-gentoo-r1/video (my "old" kernel)

Did not find the /video in;

/lib/modules/2.6.9-gentoo-r4 let alone a(n) nvidia.ko

I even tried in desperation to copy nvidia.ko from:

/lib/modules/2.6.9-gentoo-r1/video   to:

/lib/modules/2.6.9-gentoo-r4/video  BTW: had to mkdir video in -r4

no luck, modprobe cannot find module nvidia

Did a

# ACCEPT_KEYWORDS="~amd64" emerge --pretend nvidia-glx

and got

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  NS   ] media-video/nvidia-kernel-1.0.6629

[ebuild     U ] media-video/nvidia-glx-1.0.6629 [1.0.6111]

I'm wondering if just re-emerging nvidia-glx leaves the current nvidia-kernel as is (in the 2.6.9-gentoo-r1 tree) because I see that the new "~amd64" version is slotted...

I guess I have two options;

1) emerge --unmerge media-video/nvidia-kernel then re-emerge nvidia-glx

                 -or-

2) emerge the "~amd64" nvidia-glx which slots the new kernel module.

For option 1, I'm worried that I'll break my working 2.6.9-gentoo-r1 kernel and desktop...but wouldn't my symlink in /usr/src/linux to 2.6.9-gentoo-r4 leave my 2.6.9-gentoo-r1 kernel tree alone?

For option 2 I'm thinking that 2.6.9-gentoo-r1 SHOULD be left alone (as the kernel module is slotted) but now I'm wondering if I'm opening up a different can of worms with the ~amd64 branch of nvidia-glx and nvidia-kernel.

Of the two options, I'm leaning toward #2...

any suggestions? thoughts? See anything I've done wrong or missed?

Thanks,

MikeyB

----------

## XhwMikey

OK,

So I settled on option 1 because I was concerned that nvidia-glx 6629 would not play well with nvidia-kernel 6111 (I wanted desperately to keep my working desktop with 2.6.9-gentoo-r1).  I then booted into my -r4 kernel, and the NVIDIA SPLASH SCREEN COMES UP !!!!!!!??????

I swear all that I did before booting into my new kernel was the "~amd64" --pretend emerge to see updated nvidia stuff....I *KNOW* that there was just the copied nvidia kernel module which did not work before...WTF over?

Now I'm thinking I've got a(n) nvidia.ko compiled against the -r1 kernel running in the -r4 kernel (since it was merely a copy).  It seems to be working, and generally speaking I'm the "if it aint broke don't fsck with it" type...but I'm thinking rm the /video/nvidia.ko in the -r4 tree, then umerge nvidia-kernel, the emerge nvidia-glx.  OK here goes...

----------

## XhwMikey

Ok

Its done, and the boot into -r4 worked fine.  Checked the /lib/modules/<kernel version>/video in both -r1 and -r4 and the mtimes were different (and made sense) so the symlink in /usr/src/linux "protected" my -r1 tree.  Guess that's not much of a surprise to those "in the know" so chalk it up to a "n00b Eureka moment".

In retrospect, I believe the root of my issue is that in the portage database of installed packages, there is no a-priori knowledge of a kernel change.  So when re-emerging just nvidia-glx (as mentioned in the Gentoo Kernel Upgrade Guide), the nvidia-kernel is not compiled and installed in the new kernel tree.  Therefore the "correct" proceedure would be to:

1)  unmerge nvidia-kernel

2)  emerge nvidia-glx

Does this seem correct to the gurus out there?

Hope this helps someone else out there...

MikeyB

----------

## headgap

ok. this is a little different:

in this situation a modprobe nvidia returns

error: invalid module format

a modprobe -f nvidia succeeds, but a subsequent 

launch of x hangs the box with the black screen of death

P4, MTTR, 8k stacks, no FB, no SMP; Riva Tnt2 Vanta

on another note, a recent kernel rebuild (with an existing

nvidia.ko in-place) gave a warning after make modules_

install:

nvidia.ko: reference to unknown function: smp_call_func()

any ideas?

kernel 2.6.7-r11, nvidia 6111; works great with 'nv' driver,

last known-good nvidia was 1.0-4661 on 2.4.20

----------

## Dud3!

Did you tack something on to the end of the kernel version?  I did that and nvidia did NOT like it.

----------

## XhwMikey

headgap,

Did you check the mtimes of the /lib/module/<kernel version>/video/nvidia.ko?

My experience was that it was REAL easy to not have what you think you have there in terms of a nvidia.ko that is compiled against your NEW kernel...  

Please excuse if you have already done this but...

1) Did you have your /usr/src/linux  symlinked to your NEW kernel?

2) emerge --unmerge nvidia-kernel ---> this tells portage that it needs to re-compile your nvidia kernel against your NEW kernel...

3) emerge nvidia-glx --> this will grab the new nvidia-kernel as well as the new nvidia-glx (nvidia-glx depends on nvidia-kernel) and will compile against your NEW kernel...

4) check the mtime of the new /lib/module/<kernel version>/video/nvidia.ko  ----> is it the time and date of your new emerge of nvidia-glx?  If not the emerge did not function as I believe it should  ---> meaning my assumptions are all wet...DOH!

5) do a opengl-update nvidia ---> just for good measure

It really smells of an nvidia-kernel not compiled for your current kernel...but I'm just a n00b so YMMV!  lol

Hope this helps,

MikeyB

ASUS A8V,  amd64 3500+, 1Gbyte PC3200 RAM, 2x SATA Samsung 80G drives, Sony DVD Drive, NEC dual layer DVD +/- RW

----------

## st3vie

hey all,

just a little update perhaps in this thread.

I had the same problem, but the steps by XhwMikey worked for me, meaning that i had to explicitly unmerge nvidia-kernel first. But now the nvidia module loads again, and everything is correct. =)

Might this have to do, that i use it on the same kernel, but first  i made it with 

```
genkernel all
```

, and after that with 

```
genkernel --menuconfig all
```

Linux n00b here! i'm just working with it for 1,5 weeks...

but it rocks so far!  :Cool: 

thnx XhwMikey and others for info and help! =))

-st3vie

----------

