# nvidia module isn't loaded correctly (solved)

## disi

I am at work and cannot provide much information right now, but I will later (using links or something) just ask what you need.

Before I changed to the 2.6.22 gentoo sources I used the 2.6.20 hardened sources.

Made a total new .config from scratch with all the settings needed I thought...

It is a Geforce 7950 gt and it worked fine with the nvidia-drivers before I changed the kernel

Did the following:

```
make menuconfig

make && make modules_install && make install && emerge nvidia-drivers madwifi-ng

```

xorg doesn't start anymore, because it "cannot find a compatible nvidia module" it says

when I do lsmod it shows me the following

```
nvidia              0

```

the module is loaded but not used   :Rolling Eyes:  (reloading the module didn't help)

modules-rebuild is in the emerge nvidia included it says switching to nvidia module...

```
eselect set opengl nvidia 

```

didn't help

I made no changes to my xorg.conf at all (copied my old over):

```
nvidia-config

cp /etc/X11/xorg.conf.save /etc/X11/xorg.conf

```

So I guess I forgot something in the kernel   :Idea: 

only thing I can see could make problems is the PCI Express setting and this is both set to yes in the kernel (as before)

framebuffer console is vesa vga

can you give me a hint, what else needs to be turned off or on to use nvidia drivers?Last edited by disi on Tue Aug 14, 2007 6:40 pm; edited 1 time in total

----------

## trawler

I'm assuming you're using nvidia-drivers?

If so, did you try to re-emerge it? You need to re-emerge every package you installed which compiles its own kernel modules.

----------

## disi

i was aware of that, this should have done it...

```
make && make modules_install && make install && emerge nvidia-drivers madwifi-ng 
```

//edit: I'll check later those again: http://gentoo-wiki.com/HOWTO_nVidia_Drivers#Required_Kernel_Settings

----------

## PaulBredbury

 *disi wrote:*   

> make && make modules_install && make install

 

Recompile the kernel properly, without taking shortcuts:

```
make clean bzImage modules modules_install
```

----------

## cchildress

That's strange, I thought that 

```
make && make modules_install
```

 was accepted, I think it's the way described in the gentoo manual.  Maybe I'm wrong?  And also, what about that way of compiling is wrong, and what problems can crop up as a result?

----------

## disi

got it to work now... thx for the ideas

there was a bad module or something, thats what I did:

```
emerge -C nvidia-drivers

rm -r /lib/modules/2.6.22-gentoo-r2

cd /usr/src/linux

make mrproper

cp /boot/config .config

make menuconfig (didn't change anything)

make && make modules_install && make install

emerge nvidia-drivers

eselect opengl set nvidia

emerge madwifi-ng

reboot
```

I think removing the whole kernel modules folder solved the problem   :Shocked: 

//edit: grrr just noticed (audacious makes no noise) I forgot to emerge alsa   :Evil or Very Mad: Last edited by disi on Tue Aug 14, 2007 6:44 pm; edited 1 time in total

----------

## PaulBredbury

The subtlety is that the crappy method is OK for a NEW kernel. But it's not OK for a recompilation.

For a recompilation which actually works reliably after you've changed some random thing, you want to recompile everything.

Problems that can crop up? The kernel fails in weird and incredibly hard-to-debug ways.

 *Quote:*   

> removing the whole kernel modules folder

 

Or, better, you could have used the command I gave.

----------

## NeddySeagoon

cchildress,

Neither,

make && make modules_install, nor make clean bzImage modules modules_install actually installs the new kernel into boot.

You also need 

```
mount /boot

cp arch<your_arch>/boot/bzImage /boot/<nice-kernel-name>
```

then fix grub.conf so it will boot <nice-kernel-name>

----------

## disi

hehe, just to clarify, the command 

```
make install
```

copies the compiled bzImage to /boot (it doesn't mount /boot that needs to be done manually before)

Also is copies the .config to boot and system.map and creates a link on the /boot partition named "vmlinuz" that links to the new kernel, it renames the old kernel to vmlinuz-2.6.22-soemthing.old.

Anyway just "make install" is enough, if /boot is mounted before, to use the new kernel.

But this has not really anything to do with the problem I had, because it was really only solved by removing the /lib/modules/2.6.whatever folder and recompile the kernel (create new modules).

----------

