# NVIDIA Drivers not compiling on 2.6.9-gentoo-r9

## metalmaniac1759

I have the following kernels on my system (sources, compiled kernel image and kernel modules):

* 2.6.9-gentoo-r3

* 2.6.7

* 2.4.24

I have an Asus A7N8X-VM Motherboard. The following drivers from nVIDIA:

* NVIDIA-Linux-x86-1.0-6111-pkg1.run

* NFORCE-Linux-x86-1.0-0292-pkg1.run

With 2.6.7 and 2.4.24 both of these packages used to compile and run properly. But the NVIDIA video drivers refuse to compile/install with 2.6.9-gentoo-r3

/usr/src/linux was pointing to /usr/src/linux-2.6.9-gentoo-r3 when I tried installing the NVIDIA drivers.

What could be the problem?

TIA

Nandz.

----------

## dsd

posting the compile error might be a good idea...

----------

## mayday147

Do you have RivaFB compiled in the kernel?

----------

## rohit_nanda1443

There is some problem. Even if you download the latest drivers from the nvidia site ie 6629 they will compile but the X will hang after showing the nvidia screen.......... I am also facing exactly the same problem.....

----------

## sonicwave

Yesterday I finished compiling my 2.6.9-r4 kernel with the nvidia 6629 driver. Works like a charm.

I previously had 2.4.26 running with 6111 drivers. Worked ok, but quiting X (log off) would hang my whole system. I did

- emerge --unmerge nvidia-glx

- emerge --unmerge nvidia-kernel

- opengl-update xorg-x11

Then emerged and installed the 2.6.9-r4 kernel and

- emerge nvidia-glx (this will install nvidia-kernel through a dependancy)

- opengl-update nvidia

Then I ran : sh <nvidia driver 6629 file>

Et voila! Problem solved, no compile errors. Has been running pretty stable since.

----------

## PMT

Honestly? That makes NO sense to me.

What you just did is:

* Uninstalled nvidia kernel modules

* Uninstalled nvidia glx extensions

* changed your libGL to the standard xorg one

* installed the nvidia kernel modules

* installed the nvidia glx extensions

* switched to the nvidia libGL

* installed the IDENTICAL nvidia kernel modules

* installed the IDENTICAL nvidia glx extensions

So...I'm befuddled.  :Smile: 

----------

## metalmaniac1759

 *dsd wrote:*   

> posting the compile error might be a good idea...

 

There's no such "error" message. The dialog box just says, that it failed to load nvidia.ko, which in all probablity is caused by compilation against the wrong kernel headers. (Which I presume is not the case).

Nandz.

----------

## dsd

so its not a compile error? you may wish to rename the topic.

i'm unsure which dialog you are referring to also. can you be more specific as to what you are doing?

----------

## metalmaniac1759

 *dsd wrote:*   

> so its not a compile error? you may wish to rename the topic.
> 
> i'm unsure which dialog you are referring to also. can you be more specific as to what you are doing?

 

I really dont know what the error is. NVIDIA has this automated installation tool, which asks you a couple of questions and then compiles the driver for you kernel. So I dont know what goes on in the backend.

----------

## mayday147

 *metalmaniac1759 wrote:*   

> 
> 
> I really dont know what the error is. NVIDIA has this automated installation tool, which asks you a couple of questions and then compiles the driver for you kernel. So I dont know what goes on in the backend.

 

But it must give you an error. I haven't seen anything to compile in the background, yet.

----------

## roxtar

 *Quote:*   

> 
> 
> I really dont know what the error is. NVIDIA has this automated installation tool, which asks you a couple of questions and then compiles the driver for you kernel. So I dont know what goes on in the backend.
> 
> 

 

Hi,

Did you do an emerge nvidia-glx or just ran the .run files.

----------

## metalmaniac1759

 *roxtar wrote:*   

> Did you do an emerge nvidia-glx or just ran the .run files.

 

Just ran the .run files. They are complete in all respect - used to work with 2.4.24 and 2.6.7

----------

## dsd

you should emerge nvidia-kernel in portage. we include fixes that are not present in nvidias own release.

----------

## metalmaniac1759

 *dsd wrote:*   

> you should emerge nvidia-kernel in portage. we include fixes that are not present in nvidias own release.

 

This is going off the topic a bit... because of this problem, I've now been using the "nv" driver that comes bundled with XFree. Haven't experienced any problems so far, infact I feel the system has become somehow more stable (no random lockups - yet).

What's so special about the "nvidia" driver?

TIA

Nandz.

----------

## Pepek

 *metalmaniac1759 wrote:*   

> What's so special about the "nvidia" driver?

 

"nvidia" driver gives you 3D hardware acceleration.

Cheers.  :Cool: 

----------

## metalmaniac1759

[quote="mayday147"]But it [b]must[/b] give you an error. I haven't seen anything to compile in the background, yet.[/quote]

No, it doesnt. It's a curses based interface which does everything in the background and all that I can see is pretty progress bars on the screen. If anything fails - it gives the same error message in a dialog box.

Nandz.

----------

## stahlsau

why not trying to emerge nvidia-kernel? It´s the same version of the driver, and as noticed before, there are some necessary patches included.

If that fails, recompile your kernel (same options, just recompile). The "invalid module format"-error which you´ll see when modprobing nvidia often comes from booting a previous build kernel when in meantime another one has been build. Those drivers don´t seem to like that.

----------

## rusxakep

dds root # emerge info

Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r9 i686)

=================================================================

System uname: 2.6.9-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz

Gentoo Base System version 1.4.16

ccache version 2.3 [enabled]

Autoconf: sys-devel/autoconf-2.59-r5

Automake: sys-devel/automake-1.8.5-r1

Binutils: sys-devel/binutils-2.15.90.0.1.1-r3

Headers:  sys-kernel/linux26-headers-2.6.8.1-r1

Libtools: sys-devel/libtool-1.5.2-r7

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CFLAGS="-march=pentium4 -mcpu=pentium4 -O3 -pipe -fforce-addr -falign-functions=4 -fprefetch-loop-arrays -fomit-frame-pointer -ffast-math"

CHOST="i686-pc-linux-gnu"

COMPILER=""

CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-march=pentium4 -mcpu=pentium4 -O3 -pipe -fforce-addr -falign-functions=4 -fprefetch-loop-arrays -fomit-frame-pointer -ffast-math"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"

GENTOO_MIRRORS="http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X acl alsa apm arts avi bcmath berkdb bitmap-fonts bzlib calendar caps crypt ctype cups curl curlwrappers dio doc encode exif foomaticdb fortran ftp gd gdbm gif gnutls gpm gtk gtk2 gtkhtml guile hal howl iconv imap jack java jpeg kde kerberosldap libwww lm_sensors mad memlimit mhash mikmod mime ming motif mpeg mysql ncurses nls nptl oggvorbis opengl oss pam pcre pdflib perl php png python qt quicktime readline samba sasl sdl session shared simplexml snmp soap sockets spell sqlite ssl svga sybase-ct sysvipc tcpd tidy tiff tokenizer truetype wddx xml xml2 xmlrpc xmms xpm xsl xv zlib linguas_ru linguas_en"

dds root # emerge -v nvidia-kernel

Calculating dependencies ...done!

>>> emerge (1 of 1) media-video/nvidia-kernel-1.0.6111-r3 to /

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found sources for kernel version:

 *     2.6.9-gentoo-r9

 * Checking for suitable kernel configuration options

 * Using KV_OBJ=ko

 * Checking for MTRR support...                                                                                       [ ok ]

>>> Unpacking source...

/usr/portage/distfiles/-.run: /usr/portage/distfiles/-.run: No such file or directory

/usr/lib/portage/bin/ebuild.sh: line 89: cd: /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/-/usr/src/nv: No such file or directory

 * Applying 2.6 kernel patches

 * Applying power-suspend-2.6.9-changes.patch ...

 * Failed Patch: power-suspend-2.6.9-changes.patch!

 *

 * Include in your bugreport the contents of:

 *

 *   /var/tmp/portage/nvidia-kernel-1.0.6111-r3/temp/power-suspend-2.6.9-changes.patch-28659.out

!!! ERROR: media-video/nvidia-kernel-1.0.6111-r3 failed.

!!! Function epatch, Line 402, Exitcode 0

!!! Failed Patch: power-suspend-2.6.9-changes.patch!

!!! If you need support, post the topmost build error, NOT this status message.

dds root # ACCEPT_KEYWORDS="~x86" emerge -v nvidia-kernel

Calculating dependencies ...done!

>>> emerge (1 of 1) media-video/nvidia-kernel-1.0.6629-r1 to /

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found sources for kernel version:

 *     2.6.9-gentoo-r9

 * Checking for suitable kernel configuration options

 * Using KV_OBJ=ko

 * Checking for MTRR support...                                                                                       [ ok ]

>>> Unpacking source...

/usr/portage/distfiles/-.run: /usr/portage/distfiles/-.run: No such file or directory

/usr/lib/portage/bin/ebuild.sh: line 89: cd: /var/tmp/portage/nvidia-kernel-1.0.6629-r1/work/-/usr/src/nv: No such file or directory

 * Applying NVIDIA_kernel-1.0-6629-1155389.patch ...

 * Failed Patch: NVIDIA_kernel-1.0-6629-1155389.patch!

 *

 * Include in your bugreport the contents of:

 *

 *   /var/tmp/portage/nvidia-kernel-1.0.6629-r1/temp/NVIDIA_kernel-1.0-6629-1155389.patch-29027.out

!!! ERROR: media-video/nvidia-kernel-1.0.6629-r1 failed.

!!! Function epatch, Line 402, Exitcode 0

!!! Failed Patch: NVIDIA_kernel-1.0-6629-1155389.patch!

!!! If you need support, post the topmost build error, NOT this status message.

dds root #

----------

## mko

Yes rusxakep, I got the exact same thing happening here!

I suppose this is the problem:

/usr/portage/distfiles/-.run: /usr/portage/distfiles/-.run: No such file or directory

----------

## rusxakep

https://bugs.gentoo.org/show_bug.cgi?id=75267

----------

## res0r9lm

```
USE="x86" emerge nvidia-kernel
```

 works

----------

