# Problems getting my nVidia driver to work..

## chix4mat

Hey all, 

I run a laptop using a GeForce Go 5200, and I have had it work in previous installs of Gentoo. I have referred to this page and repeated the steps over and over. Then the time comes to modprobe nvidia, I get this error: 

```
localhost rwilliams # modprobe nvidia

FATAL: Module nvidia not found.

```

I have tried recompiling the kernel with NVIDIA support and then with VESA support, and emerged both nvidia-glx and nvidia-kernel and nothing seems to help. I'm not sure if my xorg file would be of any help, but you can view it here. 

Am I simply overlooking something? I appreciate any help!

----------

## bmk789

i would take all video drivers out of the kernel and just install the latest drivers from nvidia

----------

## kfiaciarka

Change :

```
Driver      "nv" 
```

 to nvidia, uncomment Dri at the end. If it won't help try to install nvidia drivers in a standard way (sh NVIDIA-....).

----------

## PaulBredbury

 *chix4mat wrote:*   

> FATAL: Module nvidia not found.

 

I would guess that your /usr/src/linux is pointing to the wrong directory. Try this:

```
find /lib/modules -name nvidia.*
```

I recommend to use the symlink USE flag with the kernels, e.g. gentoo-sources.

There are several versions of the nvidia driver in portage, including the latest - no need to install "manually".

----------

## kfiaciarka

 *PaulBredbury wrote:*   

>  *chix4mat wrote:*   FATAL: Module nvidia not found. 
> 
> I would guess that your /usr/src/linux is pointing to the wrong directory. Try this:
> 
> ```
> ...

 

Somotimes it is hard to emerge nvidia drivers, i.e. after changing kernel. But normally emerge nvidia-kernel nvidia-glx should be enough.

----------

## chix4mat

Thanks for the help so far!

```
rwilliams@localhost ~ $ find /lib/modules -name nvidia.*

/lib/modules/2.6.15-gentoo-r1/video/nvidia.ko

rwilliams@localhost ~ $ ls -l /usr/src

total 4

lrwxrwxrwx   1 root root   22 Mar 10 13:11 linux -> linux-2.6.15-gentoo-r1

drwxr-xr-x  20 root root 4096 Mar 12 20:34 linux-2.6.15-gentoo-r1
```

Everything looks ok to me, but I could be wrong. When I try to run the installer from the NVIDIA site, it gives me an error about a problem finding an nvidia.ko. So... what am I overlooking? 

 :Shocked: 

----------

## PaulBredbury

I think modprobe is failing because you need to run:

```
depmod
```

If modprobe still fails, then try the more direct method:

```
insmod /lib/modules/2.6.15-gentoo-r1/video/nvidia.ko
```

----------

## chix4mat

```
localhost rwilliams # insmod /lib/modules/2.6.15-gentoo-r1/video/nvidia.ko

insmod: error inserting '/lib/modules/2.6.15-gentoo-r1/video/nvidia.ko': -1 Invalid module format
```

I tried the depmod prior to this. If there's a problem out there, I'm bound to run into it.   :Confused: 

----------

## PaulBredbury

Search these forums  :Wink: 

----------

## augury

 *Quote:*   

> insmod: error inserting '/lib/modules/2.6.15-gentoo-r1/video/nvidia.ko': -1 Invalid module format

 

You need to build the module w/ the same gcc version.  If you did not change it:  

```
# cp -a /usr/i686-pc-linux-gnu/gcc-bin/{your-gcc-version}/* /usr/bin
```

should fix this (gcc-config screws stuff up sometimes).

----------

## chix4mat

For the past two hours I have tried all of this, and nothing seems to work. 

I unemerged anything nvidia, emerged GCC, recompiled my kernel, emerged the nvidia drivers and still have the exact same problem. I tried all the methods in the threads you mentioned PaulBredbury, but they didn't seem to work for me. I know nvidia.ko must be getting recompiled properly with the new GCC version because it's timestamp updates everytime I re-emerge nvidia-glx. 

Ugh, this problem has me so   :Neutral: 

----------

## PaulBredbury

What does /var/log/messages or dmesg say about it?

----------

## chix4mat

This is what I get when I try to insmod the file: 

```
nvidia: no version for "struct_module" found: kernel tainted.

nvidia: version magic '2.6.15-gentoo-r1 SMP preempt PENTIUM4 gcc-3.4' should be '2.6.15-gentoo-r5 SMP 686 4KSTACKS gcc-3.4'
```

I Googled up the error, but there's no real fix for it by the looks of things. I could be wrong..

----------

## PaulBredbury

 *chix4mat wrote:*   

> -r1 ... should be ...  -r5

 

You have compiled a new kernel, but not rebooted into it, it seems.

----------

## chix4mat

Alright.. since you said that, I looked around a little bit.

```
localhost home # ls -l /lib/modules/

total 8

drwxr-xr-x  4 root root 4096 Mar 13 19:29 2.6.15-gentoo-r1

drwxr-xr-x  3 root root 4096 Mar 13 19:30 2.6.15-gentoo-r5
```

I have r5 listed in the modules and 'uname -a' shows it also. But when I 'ls -l /usr/src/', it only shows r1. It really makes no sense to me. If I reemerge nvidia, it won't create the ko file in the /lib/modules/2.6.15-gentoo-r5 directory. 

I've looked around further, but I don't even really know what my problem is to begin with =/

----------

## PaulBredbury

 *chix4mat wrote:*   

> But when I 'ls -l /usr/src/', it only shows r1.

 

So use the symlink USE flag for whatever-sources you're using. Then recompile the kernel, and your kernel modules such as nvidia. Then reboot. Then check that you're in the kernel you think you should be in.

When you've got it right, the kernel modules will load  :Wink: 

----------

## chix4mat

I have symlink in my make.conf already, but I will start over and try again.

/prays it decides to work. 

Thanks a ton for all of your help.

----------

