# [SOLVED] nvidia-kernel & kernel-2.6.9-gentoo-r1 problem

## alekso

After installing kernel-2.6.9-gentoo-r1 and latest nvidia-kernel(1.0.611-r2), i try to modprobe nvidia and have this in dmesg (only in dmesg - no error message in console):

```
NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module  1.0-6111  Tue Jul 27 07:55:38 PDT 2004

Unable to handle kernel NULL pointer dereference at virtual address 00000000

 printing eip:

d4facfe2

*pde = 00000000

Oops: 0000 [#1]

PREEMPT 

Modules linked in: nvidia usblp usb_storage usbhid uhci_hcd ohci_hcd n_hdlc bsd_comp ppp_deflate zlib_deflate zlib_inflate ppp_synctty ppp_async crc_ccitt ppp_generic slhc usbcore

CPU:    0

EIP:    0060:[<d4facfe2>]    Tainted: P   VLI

EFLAGS: 00013292   (2.6.9-gentoo-r1) 

EIP is at os_string_compare+0x13/0x2d [nvidia]

eax: 00000046   ebx: d3ccede0   ecx: 00000000   edx: d3ccee40

esi: d3ccee41   edi: 00000000   ebp: d2099e2c   esp: d2099e08

ds: 007b   es: 007b   ss: 0068

Process X (pid: 12270, threadinfo=d2098000 task=d34d3020)

Stack: d3ccede0 d359b800 d4dec25a d3ccee40 00000000 c044ad48 d4800000 c014d8ee 

       d3f80330 d2099e5c d4dee1db d359b800 d3ccee40 00000000 c044ad48 00000000 

       d359b800 00000000 c044ad48 d48cc000 00001000 d2099e9c d4df1b74 d359b800 

Call Trace:

 [<d4dec25a>] _nv001530rm+0x16/0x1c [nvidia]

 [<c014d8ee>] map_area_pmd+0x7e/0xb0

 [<d4dee1db>] _nv001618rm+0x33/0x7c [nvidia]

 [<d4df1b74>] _nv001244rm+0x208/0x2e8 [nvidia]

 [<d4df2c35>] rm_access_registry+0x75/0x9c [nvidia]

 [<d4df3134>] _nv001139rm+0x3a4/0x4b8 [nvidia]

 [<d4df2147>] rm_ioctl+0x23/0x38 [nvidia]

 [<c02c464d>] snd_ensoniq_create+0x1cd/0x4d0

 [<d4faa52a>] nv_kern_ioctl+0x348/0x39b [nvidia]

 [<c02c464d>] snd_ensoniq_create+0x1cd/0x4d0

 [<c0169e60>] sys_ioctl+0x100/0x270

 [<c02c464d>] snd_ensoniq_create+0x1cd/0x4d0

 [<c010527b>] syscall_call+0x7/0xb

 [<c02c464d>] snd_ensoniq_create+0x1cd/0x4d0

Code: e8 f4 3d 24 eb 85 c0 b8 00 00 00 00 ba 08 01 01 08 0f 45 c2 83 c4 0c c3 83 ec 08 89 34 24 89 7c 24 04 8b 74 24 0c 8b 7c 24 10 ac <ae> 75 08 84 c0 75 f8 31 c0 eb 04 19 c0 0c 01 8b 34 24 8b 7c 24 

```

Any suggestions?

PS: my card: nvidia vantaLast edited by alekso on Sat Oct 23, 2004 9:29 pm; edited 1 time in total

----------

## ajburlet

I have NVIDIA GEFORCE FX 5200 and driver version 1.0.5336-r4, and the dmesg output its pretty like the one above.

----------

## dsd

seems to be a conflict between sound and nvidia.. does removing sound support help at all?

----------

## alekso

First, error message appears not after "modprobe nvidia" but after starting x.org (xorg-x11-6.8.0-r1), sorry for my incompetence  :Embarassed: 

After recompiling kernel with sound driver as module i have same trouble, but without "snd_ensoniq" in error message:

```
Unable to handle kernel NULL pointer dereference at virtual address 00000000

 printing eip:

d4fcffe2

*pde = 00000000

Oops: 0000 [#1]

PREEMPT 

Modules linked in: nvidia snd_ens1371 snd_rawmidi snd_ac97_codec usblp usb_storage usbhid uhci_hcd ohci_hcd n_hdlc bsd_comp ppp_deflate zlib_deflate zlib_inflate ppp_synctty ppp_async crc_ccitt ppp_generic slhc usbcore

CPU:    0

EIP:    0060:[<d4fcffe2>]    Tainted: P   VLI

EFLAGS: 00013292   (2.6.9-gentoo-r1) 

EIP is at os_string_compare+0x13/0x2d [nvidia]

eax: 00000046   ebx: c9ad1360   ecx: 00000000   edx: c9ad1d60

esi: c9ad1d61   edi: 00000000   ebp: d384fe2c   esp: d384fe08

ds: 007b   es: 007b   ss: 0068

Process X (pid: 7153, threadinfo=d384e000 task=d3a57aa0)

Stack: c9ad1360 d3a49c00 d4e0f25a c9ad1d60 00000000 c0436d48 d4800000 c014d8ee 

       d3f80330 d384fe5c d4e111db d3a49c00 c9ad1d60 00000000 c0436d48 00000000 

       d3a49c00 00000000 c0436d48 d48cc000 00001000 d384fe9c d4e14b74 d3a49c00 

Call Trace:

 [<d4e0f25a>] _nv001530rm+0x16/0x1c [nvidia]

 [<c014d8ee>] map_area_pmd+0x7e/0xb0

 [<d4e111db>] _nv001618rm+0x33/0x7c [nvidia]

 [<d4e14b74>] _nv001244rm+0x208/0x2e8 [nvidia]

 [<d4e15c35>] rm_access_registry+0x75/0x9c [nvidia]

 [<d4e16134>] _nv001139rm+0x3a4/0x4b8 [nvidia]

 [<d4e15147>] rm_ioctl+0x23/0x38 [nvidia]

 [<c02c464d>] sys_sendto+0xbd/0x100

 [<d4fcd52a>] nv_kern_ioctl+0x348/0x39b [nvidia]

 [<c02c464d>] sys_sendto+0xbd/0x100

 [<c0169e60>] sys_ioctl+0x100/0x270

 [<c02c464d>] sys_sendto+0xbd/0x100

 [<c010527b>] syscall_call+0x7/0xb

 [<c02c464d>] sys_sendto+0xbd/0x100

Code: e8 f4 0d 22 eb 85 c0 b8 00 00 00 00 ba 08 01 01 08 0f 45 c2 83 c4 0c c3 83 ec 08 89 34 24 89 7c 24 04 8b 74 24 0c 8b 7c 24 10 ac <ae> 75 08 84 c0 75 f8 31 c0 eb 04 19 c0 0c 01 8b 34 24 8b 7c 24
```

Here is my xorg.conf(comments and spaces are cuted)

```
Section "Module"

    SubSection  "extmod"

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

    EndSubSection

    Load        "type1"

    Load        "freetype"

    Load       "glx"

EndSection

Section "Files"

    RgbPath   "/usr/X11R6/lib/X11/rgb"

    FontPath   "/usr/share/fonts/cyrillic"

    FontPath   "/usr/share/fonts/corefonts/"

    FontPath   "/usr/share/fonts/freefont/"

    FontPath   "/usr/share/fonts/misc/"

    FontPath   "/usr/share/fonts/TTF/"

    FontPath   "/usr/share/fonts/Speedo/"

    FontPath   "/usr/share/fonts/Type1/"

    FontPath   "/usr/share/fonts/CID/"

    FontPath   "/usr/share/fonts/75dpi/"

    FontPath   "/usr/share/fonts/100dpi/"

    FontPath   "/usr/share/fonts/local/"

    FontPath   "/usr/share/fovts/ttf-bitstream-vera/"

EndSection

Section "ServerFlags"

EndSection

Section "InputDevice"

    Identifier   "Keyboard1"

    Driver   "kbd"

    Option "AutoRepeat" "500 30"

    Option "XkbModel"   "pc105"

    Option "XkbLayout"   "us,ru"

    Option "XkbVariant" "winkeys"

    Option "XkbOptions"   "grp:alt_shift_toggle,grp_led:scroll"

EndSection

Section "InputDevice"

    Identifier   "Mouse1"

    Driver   "mouse"

    Option "Protocol"    "IMPS/2"

    Option "Buttons" "5"

    Option "ZAxisMapping" "4 5"

    Option "Device"      "/dev/mouse"

EndSection

Section "Monitor"

    Identifier  "MAG770V"

    HorizSync   30-70

    VertRefresh 50-120

EndSection

Section "Device"

    Identifier  "VANTA"

    VendorName "nvidia"

    Driver   "nvidia"

    VideoRam    32768

    BusID   "PCI:1:0:0"

EndSection

Section "Screen"

    Identifier  "Screen 1"

    Device      "VANTA"

    Monitor     "MAG770V"

    DefaultDepth 24

    Subsection "Display"

        Depth       8

        Modes       "1280x1024" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       16

        Modes       "1280x1024" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       24

#        Modes       "1280x1024" "1024x768" "800x600" "640x480"

   Modes       "1024x768"

        ViewPort    0 0

    EndSubsection

EndSection

Section "ServerLayout"

    Identifier  "Simple Layout"

    Screen "Screen 1"

    InputDevice "Mouse1" "CorePointer"

    InputDevice "Keyboard1" "CoreKeyboard"

EndSection
```

----------

## Phr34K

I too am experiencing similar problems.  I can't make the exact error message come up, but it is very similar to the one in the above posts.  It happened out of no where it seems, and after I removed 'nvidia' from /etc/modules.autoload.d/kernel-2.6, the errror would go away and I was able to log in.  I tried to modprobe nvidia, and it seemed to work but after an 'lsmod' i got that error again, then after 'startx' I can not reproduce that error.  'lsmod' now just hangs and I have to close the terminal, ctrl+c does not work when 'lsmod' is going.  

I have tried re-emerging both nvidia-kernel and nvidia-glx.  both did not make a difference.  I can't seem to get the nvidia module to work correctly now.  It was just working fine this morning when I shutdown, then I get home and start the computer and this error keeps coming up.  

I am perplexed..

Any one have any ideas ???

----------

## gnac

I'm having the same problem.

One thing I noticed:

When I did a 

```
make modules modules_install
```

It created the modules in 

```
/lib/modules/2.6.9-gentoo-r1n
```

but when emerging nvidia-kernel, it put the kernel in: 

```
/lib/modules/2.6.9-gentoo-r1
```

notice the missing 'n'

I'm not sure what is up with the 'n' but I tried to copy the nvidia.ko kernel over the the same place in the tree of the 'n' directory with no luck (i.e. X still doesn't start).

Also, "make install" created the kernel (and config and system map) with an 'n' appended to the end, eg vmlinuz-2.6.9-gentoo-r1n.

I have no idea if this is causing the problem, or how to fix it, but I'd thought I'd point it out.

EditI found my error, I entered 'n' (instead of blank) in the kernel option for customized kernel name, which then appended itself to the kernel et all.  I now have the VMALLOC error, but I think that is a separate issue than this.  Sorry for the confusion.

----------

## benu

I had the same problem, except i only upgraded the kernel from 2.6.8.r10 to 2.6.9.r1 and typed in y in make oldconfig   :Cool: 

I will try putting that export line into the kernel sources now...

Update: putting "EXPORT_SYMBOL(__VMALLOC_RESERVE);" into /usr/src/linux/arch/i386/mm/init.c fixed it for me (gentoo-dev-sources 2.6.9-r1, xorg 6.8.0-r1 and nvidia kernel 1.0.5336-r4).

----------

## alekso

2 benu: Thanks, it works now  :Very Happy: 

So, one more time: for anybody who have same problem - just add this line:

```
EXPORT_SYMBOL(__VMALLOC_RESERVE);
```

after:

```
unsigned int __VMALLOC_RESERVE = 128 << 20;
```

in 

```
/usr/src/linux/arch/i386/mm/init.c
```

 and recompile kernel

----------

## DAharon

Thanks for the above instructions, I followed them and now the nvidia driver works.  But when I dmesg it still says that the nvidia 'taints' the kernel.  I also get AGP related error messages (from dmesg) sometimes.

There is supposed to be a patch for this problem.  And in the portage tree I installed a 'fix' for it that has a file name vmalloc_something.patch.  But when I emerge it, it doesn't install the patch.  Although it does install other patches to nvidia-kernel that are in the same portage dir as vmalloc...patch.

BTW, how do I get rid of that stupid NVIDIA startup screen?

EDIT:  Also, do I have to emerge anything special to use glxinfo or glxgears?  I can't find them and they're obviously not in my path.

----------

## lightvhawk0

to get rid of nvidia logo

put this in your xorg conf

```
Options "NoLogo" "1"
```

----------

## monkeyhead

sweet... i've always been annoyed by the nvidia logo and knew there was a way to get rid of it, but was far too lazy to find it.

----------

## dontremember

 *lightvhawk0 wrote:*   

> to get rid of nvidia logo
> 
> put this in your xorg conf
> 
> ```
> ...

 

I prefer to keep the logo - sometimes X doesn't load up properly and that blasted logo is a good diagnostic.  If it shows up, everything's peachy, if it doesn't, I don't sit there looking at a black screen for 5 minutes...

----------

## benu

 *DAharon wrote:*   

> Thanks for the above instructions, I followed them and now the nvidia driver works.  But when I dmesg it still says that the nvidia 'taints' the kernel.

 

That's normal, i guess to get rid of it you had to patch the kernel.

----------

## hadees

can you post the patch with the ebuild for everyone to use? if you don't have a place to do it use bugs.gentoo.org

----------

## hadees

i just tried it my self and it didn't seem to work,  my kernel is linux-2.6.9-gentoo-r1

and i am trying to use media-video/nvidia-kernel 1.0.6111-r2

I am trying to do tvout so i don't know if that is the problem as I don't have a monitor (i own a laptop and the computer i am working on is my htpc)

----------

## javac16

I tried this fix as well and it didn't work for me.  Running the 1.0.6111-r2 nvidia-kernel and gentoo-dev-2.6.9-r1.

Works fine with 2.6.8-r10...

Seems to be a lot of threads on this...but no luck with any of the possible solutions.

----------

## javac16

For me the fix was in a thread with this reply:

 *Quote:*   

> 
> 
> this new kernel has an option called "local name" or something, which is a string appended to the kernel name. I was make'ing oldconfig and typed 'n' to this option. Unfortunately, this didn't deactivate it, my "local name" was set to 'n'.
> 
> 

 

I did something similar, seems if you put anything here everything goes to /lib/modules/2.6.9-gentoo-r1<YOURNAME>

but nvidia still goes to /lib/modules/2.6.9-gentoo-r1

----------

## dontremember

 *javac16 wrote:*   

> For me the fix was in a thread with this reply:
> 
>  *Quote:*   
> 
> this new kernel has an option called "local name" or something, which is a string appended to the kernel name. I was make'ing oldconfig and typed 'n' to this option. Unfortunately, this didn't deactivate it, my "local name" was set to 'n'.
> ...

 

I think it looks to see where the /usr/src/linux link points.  So, if you want to use your own "local name", just rename the kernel source directory to include your tag, then point /usr/src/linux to the new name.  If you just want to get rid of the "local name", either edit the .config or use "make menuconfig" and look in the "General Setup" screen.

----------

## dsd

 *dontremember wrote:*   

> I think it looks to see where the /usr/src/linux link points.  So, if you want to use your own "local name", just rename the kernel source directory to include your tag, then point /usr/src/linux to the new name.

 

correct, we always look for the source of the running kernel at /usr/src/linux. however, the issue here is that modules are being placed in the wrong place under /lib/modules. portage does not currently support 2.6.9's new localversion stuff - but there is updated code in portage CVS, these issues wont exist in future portage releases.

----------

## emperor91108

will this work for genkernel users?

----------

