# nvidia & gentoo-dev-sources-2.6.7

## joeljkp

Looks like nvidia is broken again. I just upgraded to gentoo-dev-sources-2.6.7, and remerged nvidia-kernel (4496-r3). When I tried to start X, I got a message saying it couldn't load the nvidia drivers.

So I tried to load them myself:

```
# modprobe nvidia

FATAL: Error inserting nvidia (/lib/modules/2.6.7-gentoo/video/nvidia.ko): Invalid module format

#
```

And yeah, I checked, it's compiling it for the right kernel. /lib/modules/2.6.7-gentoo has nvidia.ko in it.

----------

## spb

Go to your kernel config. First, under 'Processor type and features'. Make sure that 'use register arguments' is off. Then, under 'Kernel Hacking'. Make sure that 'Use 4K for kernel stacks instead of 8K' is also off.

----------

## joeljkp

Yes, both are off. nvidia-*-5336 works fine, btw.

----------

## NiK[IT]

Could you tell me if in your conf works glx too? I upgraded form 2.6.5 to 2.6.7 and now everything works fine except glx. I could not start Americas Army anymore!!! Buuuuuhhhh!!!   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## dfy

I've got the same problem. Seems like there's something wrong with the 4496 and 2.6.7. Would be very nice if someone had a solution, because I have a GF4MX and would like to keep the 44-drivers instead of upgrading to 5xxx.

edit: I was looking around a bit, and it seems like the best way is upgrading to 5xxx. I don't have a really good feeling about that because it's still in ~arch, but well, it's officially released by nvidia, so I hope everything will work.... we'll see.

----------

## joeljkp

My glx does work with the 5336 drivers.

----------

## NiK[IT]

right! I tried upgrading to newest (unstable) nvidia-glx and nvidia-kernel and now all works faster than before.

I did an 

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

thx to all!!!  :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## robfish

Thanks from me as well. That worked to fix the same problem here.

----------

## Lance

I have exactly the same problem. 

I have tried 

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

even worse, my box freezed at bootup.

----------

## Mythos

did you make

```
 modules-update
```

 ???

don't use accept_keywords ...

do this:

```
mkdir /etc/portage;echo " media-video/nvidia-kernel ~x86" >> /etc/portage/package.keywords;echo "media-video/nvidia-glx ~x86" >> /etc/portage/package.keywords;emerge nvidia-kernel nvidia-glx
```

----------

## joeljkp

Has anyone posted a bug about this?

----------

## steel300

It's a known thing.

----------

## linuxkrn

 *joeljkp wrote:*   

> Yes, both are off. nvidia-*-5336 works fine, btw.

 

They DO NOT work fine.  The 5xxx driver tree is CRAP.

They have a SERIOUS bug in them that has been talked about on the kernel mailing list.  

Here is some sample ouput.

```
Badness in pci_find_subsys at drivers/pci/search.c:167

Call Trace:

 [<c023f734>] pci_find_subsys+0x114/0x11c

 [<c023f76b>] pci_find_device+0x2f/0x33

 [<c023f537>] pci_find_slot+0x27/0x49

 [<f8d164aa>] os_pci_init_handle+0x39/0x68 [nvidia]

 [<f8baa85f>] _nv001243rm+0x1f/0x24 [nvidia]

 [<f8cf1115>] _nv000816rm+0x2f5/0x384 [nvidia]

 [<f8c5992c>] _nv003801rm+0xd8/0x100 [nvidia]

 [<f8cf0c4f>] _nv000809rm+0x2f/0x34 [nvidia]

 [<f8c5a750>] _nv003816rm+0xf0/0x104 [nvidia]

 [<f8c5900e>] _nv003795rm+0x6ea/0xaec [nvidia]

 [<f8bc3267>] _nv004046rm+0x3a3/0x3b0 [nvidia]

 [<f8cc4ba7>] _nv001476rm+0x277/0x45c [nvidia]

 [<f8bad39a>] _nv000896rm+0x4a/0x64 [nvidia]

 [<f8baebb4>] rm_isr_bh+0xc/0x10 [nvidia]

 [<f8d13b49>] nv_kern_isr_bh+0xf/0x13 [nvidia]

 [<c0125b03>] tasklet_action+0x65/0xae

 [<c0125888>] do_softirq+0xc0/0xc2

 [<c0109a3b>] do_IRQ+0x13e/0x192

 [<c0107d70>] common_interrupt+0x18/0x20

 [<c010501e>] default_idle+0x0/0x2c

 [<c0105047>] default_idle+0x29/0x2c

 [<c01050b0>] cpu_idle+0x33/0x3c

 [<c04fa86c>] start_kernel+0x191/0x1c0

 [<c04fa433>] unknown_bootoption+0x0/0x110

```

This results in the keyboard/mouse locking up on my system.  It happens with both GeForceFX 5600s and on Quadro4 900GLX cards.  

If you read the mailing list they are pissed (as I am) off at nVidia for having this problem for so long in the 5xxx branch.  The 4xxx do not have these issues.

That becomes a major problem now with 2.6.7 because you can't use 4xxx anymore.  I'm rather upset that I have to deal with either lockups or use a old kernel with security holes.   :Evil or Very Mad: 

----------

## stoffe

I'm not too happy about having to use the 5x.xx drivers either - I develop games and the 5x.xx series has some serious performance issues under certain conditions, with large 3D objects and suchlike (which is unavoidable with this game  :Wink: ), and I do mean really serious.  These problems are exactly the same on Windows 5x.xx series also. On both Windows and Linux, 4x.xx drivers work just fine, and on Windows, there also is available 6x.xx beta drivers (forceware) that has all of these issues fixed.

For now, since we are still in development, we are using the beta drivers while waiting for the final ones to be released... anybody has any idea how long it takes before Linux drivers follows (or, for now, know of any way to find betas for that too)?

----------

## JinxterX

Download patched 44.96 drivers that work with dev-sources 2.6.7 here.

----------

## Larcen

Help! I'm pulling my hair out.  :Sad: 

```
Building modules, stage 2.

make -rR -f /usr/src/linux-2.6.7-gentoo-r5/scripts/Makefile.modpost

  scripts/modpost -i /usr/src/linux-2.6.7-gentoo-r5/Module.symvers /var/tmp/portage/nvidia-kernel-1.0.5336-r4/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nvidia.o

/bin/sh: line 1: scripts/modpost: No such file or directory

make[3]: *** [__modpost] Error 127

make[2]: *** [modules] Error 2

nvidia.ko failed to build!

make[1]: *** [module] Error 1

make: *** [module] Error 2

!!! ERROR: media-video/nvidia-kernel-1.0.5336-r4 failed.

!!! Function src_compile, Line 118, Exitcode 2

!!! Failed to build module

(root@shell)[/]#
```

----------

## stoffe

 *JinxterX wrote:*   

> Download patched 44.96 drivers that work with dev-sources 2.6.7 here.

 

What is the procedure for using those, and will it need other stuff (re)installed?

----------

## JinxterX

 *stoffe wrote:*   

>  *JinxterX wrote:*   Download patched 44.96 drivers that work with dev-sources 2.6.7 here. 
> 
> What is the procedure for using those, and will it need other stuff (re)installed?

 

Ok I did this:

```
emerge -kv nvidia-kernel nvidia-glx
```

But of course it won't work with dev-sources 2.6.7, so you then download the drivers from the link above, quit any X server or edit inittab and reboot to console and:

```
sh ./NVIDIA*.run
```

in the location you put the file, when the driver requests to compile a module, say Yes.

Worked for me.

----------

## pajoma

 *Larcen wrote:*   

> Help! I'm pulling my hair out. 
> 
> /bin/sh: line 1: scripts/modpost: No such file or directory
> 
> make[3]: *** [__modpost] Error 127
> ...

 

phew, that was quite some...

the modpost script in your kernel directory is not compiled. Just 'make' your kernel, the scripts should be there afterwards.

----------

## DeZZa

Hi.

I have the CONFIG_4STACKS option off, and 'use register arguments' off ..

And i use the patched 4496 drivers from minion.de ..

Still it gives me the bad format error  :Evil or Very Mad: 

```
FATAL: Error inserting nvidia (/lib/modules/2.6.7-ck1/video/nvidia.ko): Invalid module format
```

Please help, this is a very evil  :Twisted Evil:  error!  :Wink:  ..

----------

## xcable

I have the same problem with 2.6.7 and 1.0.5336.  I use k3ddesktop (which uses 3D Desktop, and opengl desktop switching program) to change virtual desktops in KDE and under heavy CPU load (compiling programs) it CRAWLS slowly to the next desktop.  Before it was extremely fast, with the 1.0.4496 version of the nvidia drivers.

Just another example of a large company half-assing the Linux drivers, just so there marketing brochure can say ".. we support Linux ..".

heath holcomb

----------

## embuste

I used the ~x86 drivers (5xxx) with kernel 2.6.7, but now x can't find the nvidia module!!!!

help!!!!!

----------

## xcable

Try this.

```

modprobe nvidia

```

heath

----------

## embuste

did that:

```
$ modprobe nvidia

$
```

but nothing, still doesn't work

----------

## ranmakun

Does anyone know what is the latest kernel where the 4496 driver works ok?, I've tried 2.6.7 and 2.6.6 and it doesn't work in any of them. Now I went back to 2.6.1 and it works fine.

The new 53xx series corrupts my screen when I'm using Maya.

----------

## xcable

I use gentoo-dev-sources-2.6.5.

So I guess that 2.6.5 is the latest.

heath

----------

## JinxterX

4496 drivers work fine up to 2.6.5 kernel but you can get them working with higher versions as well if you used the patched version.

----------

## ranmakun

 *JinxterX wrote:*   

> 4496 drivers work fine up to 2.6.5 kernel but you can get them working with higher versions as well if you used the patched version.

 

Thank you, I've tried the patched drivers that someone pointed out in this thread but didn't work either with 2.6.7 (same error)

I guess I will stick with 2.6.5 until there is a solution.

----------

## Cid

i'm also having this same problem, is there any 'generic' drivers that can be used that don't have 3d support or whatever so that i can use X for now until some fix comes along? thanks.

----------

## xcable

You can use the drivers that come with xfree86.  It has full 2D acceleration but no 3D. 

http://xfree86.org/4.3.0/nv.4.html

heath

----------

## Cid

cool...i'll try that until this gets fixed

----------

## Shiner_Man

 :Confused:  I'm getting the black screen of death as well with gentoo-dev-sources-rc8

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

# modules-update

# modprobe nvidia

# startx

bang...black screen of death and complete system lockup.

----------

## xanthax

exclude "nvidia riva support" from kernel and emerge the "nvidia-kernel-1.0.6106.ebuild" and the dido nvidia-glx.

Then restart new kernel and it works fine with gentoo-dev-sources-2.6.7-rc8.

If still problem try a "modules-update force"

----------

## Shiner_Man

I don't have "nvidia riva support" compiled into the kernel and it still doesn't work.  Haven't tried "modules-update -force" though.  I don't like to "force" anything really.

----------

## Lance

I get gentoo-dev-sources-2.6.7-r8 to work with nvidia kernel 1.0.6106 by:

1. disable NVIDIA nForce/nForce 2 chipset support [in Device Drivers->Character devices section]

2. disable nVidia Riva support [in Device Drivers->Graphics support setction]

compile and install the kernel, and emerge 1.0.6106 nvidia kernel and glx, it works like a charm! glxgears test result is notably higher than did in 1.0.4496

```

mkdir -p /etc/portage

echo media-video/nvidia-kernel ~x86 >>/etc/portage/package.keywords

echo media-video/nvidia-glx ~x86 >>/etc/portage/package.keywords

emerge nvidia-kernel nvidia-glx

modules-update

kdm[or gdm or whatever]

```

test with glxgears

```

glxgears

```

----------

## Shiner_Man

 *Quote:*   

> I get gentoo-dev-sources-2.6.7-r8 to work with nvidia kernel 1.0.6106 by:
> 
> 1. disable NVIDIA nForce/nForce 2 chipset support [in Device Drivers->Character devices section]
> 
> 2. disable nVidia Riva support [in Device Drivers->Graphics support setction]

 

Okay let me see if this does the trick.

<UPDATE>

bah!  Still getting the black screen of death.  Here is what I did using gentoo-dev-sources-2.6.7-r9:

1.  Disable NVIDIA nforce/nforce 2 chipset support and disable nvidia Riva support in the kernel config.

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

3  modules-update

4.  modprobe nvidia

5.  startx

Black screen and the computer just hangs.  Must do a hard reboot.  ho hum.

Is this a known bug with gentoo-dev-sources are am I just an unlucky idiot?

----------

