# [SOLVED] Nvidia drivers9629 & kernel 2.6.18 [9629 is bugged]

## Lowrider

i just switched to the 2.6.18-r2 kernel, i was was wondering if it has some problems with the direct rendering and/or Nvidia-drivers 1.0.9629, becasue i get a strange error message when i compile theese drivers : 

```
echo;                                                           \

echo "  ERROR: Kernel configuration is invalid.";               \

echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";      \

echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \

echo;  
```

Except of that, the merge just went fine and i got my final nvidia module.

But direct rendering simply seems to not work

```
>>glxinfo

name of display: :0.0

Segmentation fault

```

now i tryed to run 'make oldconfig && make prepare' as suggested above and reemerge the nvidia-drivers but everything went the same way, and still no DR.

somebody has any clue ? since i don't figure out what's the problem

----------

## PaulBredbury

The ebuilds for kernels have a symlink USE flag, which is very useful, because the nvidia code looks in /usr/src/linux (which should be a symlink) to find the kernel code it needs to create a customized kernel module.

It sounds like your /usr/src/linux points to the wrong directory.

----------

## wynn

 *Lowrider wrote:*   

> i just switched to the 2.6.18-r2 kernel, i was was wondering if it has some problems with the direct rendering and/or Nvidia-drivers 1.0.9629, becasue i get a strange error message when i compile theese drivers : 
> 
> ```
> echo;                                                           \
> 
> ...

 This isn't an error message â I had to look at it hard to realize that â it's the shell commands from the script which runs the nvidia compilation which are written on the screen but not executed. The telltale signs are the semicolon after the first "echo" and the backslashes after the following lines.

You'll have to provide more information for people to see what's going on.

From your error message

```
>>glxinfo

name of display: :0.0

Segmentation fault
```

you might not be running X at all, and where does the ">>" come from? It's not a shell prompt.

Does "modprobe nvidia" work? That is, no error messages and "lsmod" shows the nvidia module loaded.

Have you run "eselect opengl set nvidia"? What does "eselect opengl list" show?

----------

## Lowrider

i used glxinfo inside an X server.

i used eselect to set opengl to nvidia

```
eselect opengl list

[1] nvidia *

[2] xorg-x11
```

i upgrade to ustable drivers (hard unmasked the ebuild in package.unmask) to see if it worked that way, but no luck. 

now i get:  

```
modprobe nvidia

FATAL: Error Inserting  nvidia (/lib/modules/2.6.18-gentoo-r2/video/nvidia.ko): No such device
```

and so i can't run X

----------

## PaulBredbury

It doesn't work by luck, it works by fixing this error message:

 *Lowrider wrote:*   

> echo "  ERROR: Kernel configuration is invalid.";

 

You need /usr/src/linux because that is where the nvidia ebuild is looking.

----------

## wynn

 *Lowrider wrote:*   

> i upgrade to ustable drivers (hard unmasked the ebuild in package.unmask) to see if it worked that way, but no luck. 
> 
> now i get:
> 
> ```
> ...

 From HOWTO nVidia Drivers *Quote:*   

> When I attempt to load the kernel module I receive a "no such device"
> 
> Copied From Gentoo.org Guide
> 
> This usually occurs when you don't have a matching video card. Make sure that you have an nVidia-powered graphical card (you can double-check this using lspci).
> ...

 The last item may help but make sure the first two don't apply.

----------

## Lowrider

i have USE="symlink" for gentoo-sources ebuild, and my /usr/src/linux point to the right kernel

```
# ls -l /usr/src/linux

lrwxrwxrwx 1 root root 22 Nov 17 02:24 /usr/src/linux -> linux-2.6.18-gentoo-r2
```

i 've read the standard guide, and i dont have nothing wrong with bios conf. and/or nvidia framebuffer, since i use vesafb

i think there's something wrong inside kernel configuration as suggested above let me tell you how i configured the kernel :

```
 Device Drivers -> Character devices

<M>  /dev/agpart (AGP support)

<M>   SiS chipset support 

<M>   VIA chipset support

< > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

```

and i load the modules agpart and via-agp from modules autoload file

```
 Device Drivers ->  Graphics support 

   < > nVidia Framebuffer Support    

   < > nVidia Riva support      

```

my xorg.conf

```

Section "Module"

        Load  "dbe" # Double Buffer Extension

##      Load  "dri" # libdri.a 

        Load  "glx" # libglx.a

        Load  "bitmap"

        Load  "vbe"

# This loads the miscellaneous extensions module, and disables

# initialisation of the XFree86-DGA extension within that module.

    SubSection  "extmod"

          Option    "omit xfree86-dga"   # don't initialise the DGA extension

    EndSubSection

Section "Device"

#    ==========  NVIDIA  device  ============

        Identifier  "GeForce4 MMX"

        Driver      "nvidia"

        VideoRam    65536 

#    ========= generic DRI setting ===========

#       === disable PnP monitor ===

        Option          "NoDDC"

#       === disable/enable XAA/DRI ===

#       Option "no_accel"                 "no"

#       Option "no_dri"                     "no"

        BusID       "PCI:1:0:0"

        screen  0

#   ========== no NVIDIA logo ================

        Option "NoLogo" "true"

EndSection

```

Don't know what to do since i didn't change xorg.conf, and DR worked fine before i upgraded to kernel 2.6.18

EDIT: tryed also to enable AGPgart to compile isnide kernel instead of Module, but nothing changed

----------

## Tolstoi

Well, I have the same issue. Just had a fresh Gentoo install with genkernel and switched to gentoo-sources 2.6.18-r2 .

First thing is: /usr/src/linux points to the right kernel

second: nvidia.ko exists in /lib/modules/2.618-gentoo-r2

third: modprobe nvidia fails and tells me nvidia.ko is not there and mentions a totally different kernel

I`m stuck here   :Crying or Very sad: 

----------

## wynn

 *Tolstoi wrote:*   

> Well, I have the same issue. Just had a fresh Gentoo install with genkernel and switched to gentoo-sources 2.6.18-r2 .
> 
> First thing is: /usr/src/linux points to the right kernel
> 
> second: nvidia.ko exists in /lib/modules/2.618-gentoo-r2
> ...

 Does the output of

```
uname -r
```

show "2.6.18-gentoo-r2"?

If not, then you're still booting up into the old kernel. You need to check your grub.conf.

----------

## Lowrider

```
 uname -r

2.6.18-gentoo-r2
```

i cant modprobe the module nvidia, since it says module not found

if i switch back to stable nvidia-driver i am able to to modprobe it, but someway glxinfo and other apps related to DR made me crash the server X[/code]

----------

## Tolstoi

Thanks, I solved it now. 

After checking my make.conf which I cleaned up a bit - the "USE" flags had a lot of stuff in it generated by the live cd, I reemerged the kernel and compiled it again. After that everything worked and modprobe nvidia gave no error. My grub was ok.

----------

## Lowrider

 *Tolstoi wrote:*   

> Thanks, I solved it now. 
> 
> After checking my make.conf which I cleaned up a bit - the "USE" flags had a lot of stuff in it generated by the live cd, I reemerged the kernel and compiled it again. After that everything worked and modprobe nvidia gave no error. My grub was ok.

 

i'm glad you are ok, but could you post your make.conf ? so i can take a peek and maybe i can solve the problem too, especially the old make.conf (tha one that made you crash the module, if you still have) thanks a lot

----------

## Tolstoi

I don't have the old one anymore, but here are my "USE" flags:

"X alsa dvd cdr jpeg svg png quicktime aac win32codecs" 

and of course

VIDEO_CARDS="nvidia"

Maybe you save your old .config, reemerge the kernel and compile it with your old config. Your config looks ok to me, though I compiled agpart in the kernel and not as module.

----------

## Lowrider

thank you,

 i noticed i had "live" in the USE flags in my make.conf .... i don't know how or why i set that, since it's deprecated... and it's used internally by livecd

Btw i recompiled EVERYTHING, with emerge -avDN world, to get rid of that use flag. after that i reemerged the kernel, compiled and istalled.

i still notice the strange warning message during compile time of nvidia-drivers :

```
echo;                                                           \

echo "  ERROR: Kernel configuration is invalid.";               \

echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";      \

echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \

echo; 

```

and after all i still get the same error when i try to use the DR : segmentation fault and after that the X server usually crashes.

i tryed to look at the server X log files in /var/log/Xorg*.log but there is nothing about the recent crash (i dont know where to look, because according to that log the nvidia enviroment is just working fine. no errors or warnings, just info about loading modules)

So i tryed dmesg | grep nvidia and i got :

```
 nvidia: module license 'NVIDIA' taints the kernel.
```

  the meaning of this is obscure to me, but i don't think it's something good ! 

Now at this point i am sure that:

- my make.conf is set good at least i think so :

```
 CFLAGS="-O2 -march=athlon-xp -pipe"

CHOST="i686-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j2"

CCACHE_SIZE="2G"

PORTDIR_OVERLAY="/usr/local/portage"

INPUT_DEVICES="keyboard mouse"

VIDEO_CARDS="nvidia vesa" 

ALSA_CARDS="usb-audio cmipci"

USE="aac acl acpi aim alsa audioscrobbler artworkextra bash-completion \

     bonobo bluetooth bzip2 bzlib cddb cdr cups directfb dbus dvdr ftp imap hal gtk gtk2 gnome \ 

     icq ipod ieee1394 java  jpeg jpeg2k matroska mjpeg mozilla mp3 mpeg4 mplayer mpc msn \

     nvidia ogg opengl pdf php png python perl quicktime real rar ruby samba tiff tga theora \

     truetype usb vcd vorbis win32codecs xine X xvid"

GENTOO_MIRRORS="http://gentoo.mirror.solnet.ch http://gentoo.ynet.sk/pub http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"

LINGUAS="it en" 
```

- my grub.conf is ok and i actually boot the right kernel (2.6.18-r2)

- my xorg.conf is ok since i don't see any errors in the logs (Xorg version is 7.1)

- my kernel configuration is ok since i "copied" it from the old kernel 2.6.17-r8 (everything worked fine in there)

- my nvidia-drivers ebuild is ok (i got 1.0.9629) and nvidia module is loaded with no errors (i tryed to emerge the ebuild with +/- dlloader with exact results)

- i tryed also the beta ebuild 1.0.9742 with worse results (i am unable to modprobe the nvidia module since i got "no such device")

i am completely stuck and panic around my house saying wicky words ! 

 Do i miss something ?

the last step is to switch back to 2.6.17-r8 ... but i dont want to keep that kernel forever ...

----------

## Lowrider

please help, i am getting mad !

from Nvidia forum :

an user: "I was unclear exactly as to what you wish for with the "glxinfo". In X, if I go to the nvidia x server settings tool and try to go to the "opengl/glx information" section, it crashes, exits. All other areas of the tool seem to work."

official response : " This is a known bug in 1.0-9629 which impacts NV2x GPUs (and has been discussed on several other threads on this forum). This bug will be resolved in the next driver release. The current workaround is to downgrade to an older driver. "

i am currently downgrading to drivers 8776. hope this will end my agony.

UPDATE: Finally it works ! that was the problem. an annoying bug. Thanks to everyone that helped me.

----------

## Tolstoi

You don't have nvidia framebuffer (nvidiafb) compiled in the kernel do you? The nvidiafb doesn't work with the nvidia-drivers. If you have - just take it out.

BTW don't care about that so called error message during the compilation of the driver - I mean this one:

echo;                                                           \

echo "  ERROR: Kernel configuration is invalid.";               \

echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";      \

echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \

echo; 

It's not a real error message, as someone above mentioned.

Good luck.

I'm doing an --update --newuse world too, at the moment   :Smile: 

----------

## Lowrider

that warning is just a message. the driver complains about that missing files, because the new kernel version don't use them anymore, but everyhting is working, so it's nothing to worry about

----------

