# nvidia-kernel doesn't compile on 2.6.11 vanilla

## escitalopram

The nvidia-kernel ebuild fails on my vanilla 2.6.11 kernel. It spits a few warnings and those errors:

 *Quote:*   

> 
> 
> /var/tmp/portage/nvidia-kernel-1.0.6629-r1/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/os-agp.c:48: error: parse error before '*' token
> 
> /var/tmp/portage/nvidia-kernel-1.0.6629-r1/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/os-agp.c:85: error: request for member `acquire' in something not a structure or union
> ...

 

----------

## Voltago

So?

----------

## gimpel

-r3 works fine!

----------

## Koroviev

Kon Colivas patchset has some fix.

http://bhhdoa.org.au/pipermail/ck/2005-March/003042.html

----------

## Cintra

No problem here with development-sources  :Wink: 

----------

## xuttuh

I had that problem yesterday.  I had changed the /usr/src/linux link to the new source tree but had not yet compiled a new kernel.  Check to make sure that you are running the kernel that /usr/src/linux is linked too.  It worked for me.

Tim

----------

## Tiger683

[advertisement]

Hint: check nitro thread  :Wink: 

[/advertisement]

T

----------

## vandorp

 *xuttuh wrote:*   

> I had that problem yesterday.  I had changed the /usr/src/linux link to the new source tree but had not yet compiled a new kernel.  Check to make sure that you are running the kernel that /usr/src/linux is linked too.  It worked for me.
> 
> 

 

Now that you mention it... Does this mean that compiling a kernel always involves the following steps:

1. emerge gentoo-dev-sources, 

2. change /usr/src/linux to the new sources

3. configure, make, make modules_install 

4. install kernel, modify grub as usual

5. reboot, see X11 complain about not being able to start

6. login from the console, emerge nvidia-kernel

7. reboot, see it work again

(or something like that, I always have to figure it out again because it doesn't make much sense to me). Or is there a more elegant way, avoiding step 5 and 6? just wondering  :Smile: 

----------

## stdPikachu

FWIW, the stable drivers won't compile under gentoo-dev-sources either (although I think I got a completely different error to the one posted above, but then it looks like that was due to the symlink issue, right?), but the ~x86 versions work just dandy for 6629 anyway. I haven't tried it with any of my system that are stuck on 6111 (due to GFX corruption on pre-GeForceFX cards in the newer drivers) yet.

Good news about 2.6.11 - CPU frequency scaling for my MSI Neo2 Plat has now been fixed, and works just dandy (although I wish they'd ;et us default to the ondemand governor in the kernel config instead of hacking around like loons echoing things in startup scripts)

Bad news - my old "psmouse.c lost synchronisation throwing X bytes away" blah blah blah problem still exists, despite all the work that was done on the input system for this release  :Sad:  Only solutions that've been offered so far are "disable ACPI, APIC, frequency scaling" - might as well switch back to 2.4, grrr.

----------

## firephoto

I'm having trouble compiling the 6111 driver with 2.6.11-ck1 on my athlon xp box it keeps giving me the same error. I can compile it without any problems on my Athlon64 box (x86) with the same exact kernel setup except for the bus/nic/ide drivers being the only different part in the config, and I was able to install it on the old box with the binary package I made. I rebuild my toolchain and emerge -e system but the problem persists.

I need the old nvidia driver for the riva tnt2 card that's in that one.

Here's the build, start to error.

```

NVIDIA: calling KBUILD...

make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

make -C /usr/src/linux          \

KBUILD_SRC=/usr/src/linux-2.6.11-ck1         KBUILD_VERBOSE=1   \

KBUILD_CHECK= KBUILD_EXTMOD="/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv" \

        -f /usr/src/linux-2.6.11-ck1/Makefile modules

mkdir -p /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/.tmp_versions

make -f /usr/src/linux-2.6.11-ck1/scripts/Makefile.build obj=/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv

echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -n 1`\" > /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv_compiler.h

  cc -Wp,-MD,/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/.nv.o.d -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.11-ck1/include  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=athlon -I/usr/src/linux-2.6.11-ck1/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O -fno-common -MD -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=6111 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -UDEBUG -U_DEBUG -DNDEBUG -DREMAP_PFN_RANGE -DNV_CHANGE_PAGE_ATTR_PRESENT -DNV_CLASS_SIMPLE_PRESENT -DHAVE_PCI_GET_CLASS -DMODULE -DKBUILD_BASENAME=nv -DKBUILD_MODNAME=nvidia -c -o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c

In file included from include/linux/list.h:7,

                 from include/linux/wait.h:23,

                 from include/asm/semaphore.h:41,

                 from include/linux/sched.h:19,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c:14:

include/linux/prefetch.h: In function `prefetch_range':

include/linux/prefetch.h:62: warning: pointer of type `void *' used in arithmetic

In file included from include/linux/dmapool.h:14,

                 from include/linux/pci.h:864,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:75,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c:14:

include/asm/io.h: In function `check_signature':

include/asm/io.h:242: warning: wrong type argument to increment

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c: In function `_get_phys_address':

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c:2744: warning: passing arg 1 of `pmd_offset' from incompatible pointer type

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c: In function `nv_agp_init':

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c:3346: warning: `inter_module_put' is deprecated (declared at include/linux/module.h:578)

  cc -Wp,-MD,/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/.os-agp.o.d -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.11-ck1/include  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=athlon -I/usr/src/linux-2.6.11-ck1/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O -fno-common -MD -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=6111 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -UDEBUG -U_DEBUG -DNDEBUG -DREMAP_PFN_RANGE -DNV_CHANGE_PAGE_ATTR_PRESENT -DNV_CLASS_SIMPLE_PRESENT -DHAVE_PCI_GET_CLASS -DMODULE -DKBUILD_BASENAME=os_agp -DKBUILD_MODNAME=nvidia -c -o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c

distcc[28188] ERROR: compile /root/.ccache/os-agp.tmp.rene.28184.i on 192.168.13.11 failed

In file included from include/linux/list.h:7,

                 from include/linux/wait.h:23,

                 from include/asm/semaphore.h:41,

                 from include/linux/sched.h:19,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:24:

include/linux/prefetch.h: In function `prefetch_range':

include/linux/prefetch.h:62: warning: pointer of type `void *' used in arithmetic

In file included from include/linux/dmapool.h:14,

                 from include/linux/pci.h:864,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:75,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:24:

include/asm/io.h: In function `check_signature':

include/asm/io.h:242: warning: wrong type argument to increment

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c: At top level:

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:48: error: parse error before '*' token

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:48: warning: type defaults to `int' in declaration of `drm_agp_p'

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:48: warning: data definition has no type or storage class

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c: In function `KernInitAGP':

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:76: warning: assignment discards qualifiers from pointer target type

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:85: error: request for member `acquire' in something not a structure or union

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:88: warning: `inter_module_put' is deprecated (declared at include/linux/module.h:578)

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:113: error: request for member `copy_info' in something not a structure or union

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:173: error: request for member `enable' in something not a structure or union

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:185: error: request for member `release' in something not a structure or union

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:186: warning: `inter_module_put' is deprecated (declared at include/linux/module.h:578)

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c: In function `KernTeardownAGP':

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:216: error: request for member `release' in something not a structure or union

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:218: warning: `inter_module_put' is deprecated (declared at include/linux/module.h:578)

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c: In function `KernAllocAGPPages':

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:265: error: request for member `allocate_memory' in something not a structure or union

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:273: error: request for member `bind_memory' in something not a structure or union

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:290: error: request for member `unbind_memory' in something not a structure or union

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:305: error: request for member `free_memory' in something not a structure or union

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c: In function `KernMapAGPPages':

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:345: error: request for member `unbind_memory' in something not a structure or union

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c: In function `KernFreeAGPPages':

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:444: error: request for member `unbind_memory' in something not a structure or union

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:445: error: request for member `free_memory' in something not a structure or union

make[4]: *** [/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.o] Error 1

make[3]: *** [_module_/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv] Error 2

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

NVIDIA: left KBUILD.

nvidia.ko failed to build!

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

make: *** [module] Error 2

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

!!! Function linux-mod_src_compile, Line 417, Exitcode 2

!!! Unable to make                                  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/usr/src/linux clean module.

```

----------

## stdPikachu

Aye, looks very like the error I got for 6629 x86 (Athlon64 i686 with a 6600). Looks like 2.6.11 is a no-go until nVidia pull their fingers out  :Sad: 

----------

## firephoto

 *stdPikachu wrote:*   

> Aye, looks very like the error I got for 6629 x86 (Athlon64 i686 with a 6600). Looks like 2.6.11 is a no-go until nVidia pull their fingers out 

 

But nvidia-kernel builds just fine on one of my computers. It only fails on the older box so I don't know that it's a kernel issue unless there's something that's triggering it for certain hardware.

----------

## thebigslide

I'm pretty sure those errors you guys are getting are because of an issue with nvidia-kernel not liking some change that's been made to your agpgart driver.  that would also explain why some people don't have an issue.  What are your AGP chipsets?

 *vandorp wrote:*   

>  *xuttuh wrote:*   I had that problem yesterday.  I had changed the /usr/src/linux link to the new source tree but had not yet compiled a new kernel.  Check to make sure that you are running the kernel that /usr/src/linux is linked too.  It worked for me.
> 
>  
> 
> Now that you mention it... Does this mean that compiling a kernel always involves the following steps:
> ...

 

1. emerge kernel sources

2. correct the /usr/src/linux symlink

3. configure, make, make modules_install 

4. install kernel

5. emerge all your 3rd party modules.

6. reboot and X fires right up, rebuild modules again if you're paranoid.

If you point grub's kernel argument to /usr/src/linux/arch/i386/boot/bzImage, you never have to modify grub or install any kernel, just change the symlink.  OR, you can symlink /boot/bzImage to /usr/src/linux/arch/i386/boot/bzImage.  

Here's a nice little bash script to automate building the kernel:

```
#!/bin/bash

##/sbin/makekernel

if [ $# -gt 2 -o $# -eq 0 ]

then 

   echo "USAGE: $0 newrevision [oldrevision]" 

else

   REVISION=$1

   rm /usr/src/linux

   ln -s /usr/src/linux-$REVISION /usr/src/linux

   CURRDIR=`pwd`

   cd /usr/src/linux

   if [ $# == 2 ] 

   then 

      cp ../linux-$1/.config .

      make oldconfig

   fi

   make menuconfig

   make && make modules_install

   cd $CURRDIR

   for I in `cat /etc/modules.external`

   do 

      emerge $I

   done

fi

```

You can call the script like "makekernel 2.6.8.1-ck5 2.6.4-mm1" and it will copy the .config from 2.6.4-mm1 to the new 2.6.8.1-ck5 and build it after putting you through menuconfig  :Smile:   Just put a list of the externel kernel module packages in /etc/modules.external

----------

## stdPikachu

 *firephoto wrote:*   

> But nvidia-kernel builds just fine on one of my computers. It only fails on the older box so I don't know that it's a kernel issue unless there's something that's triggering it for certain hardware.

 

There's been a bit of a buzz on LKML (and everywhere else) about 2.6.11 breaking nVidia drivers, but gentoo-dev-sources s meant to include a patch to fix it. My guess is it's not fully stable yet, hence hiccups like this. That and the fact that the 6629 driver is flaky as hell  :Wink: 

 *thebigslide wrote:*   

> What are your AGP chipsets?

 

AMD64 internal AGP using AGPGART and GF6 w/6629 ~x86 - works

AMD64 internal AGP using AGPGART and GF6 w/6629 x86 - dies

KT400 AGP using NvAGP and GF4 w/6111 - dies

KM400 AGP using AGPGART and GF5 w/6629 - works

----------

## firephoto

I bet it is the agpgart driver. The failing box has it built into the kernel and the working box doesn't have it in the kernel at all, I use the nvagp on the athlon64. I can't remember why I have it setup that way on the other box but it might have been for the matrox card I was using for a while. I'll redo the kernel without agpgart and report back.

----------

## firephoto

Ok, I did a "make clean" and then took the agpgart out of the kernel, did a make, then emerged nvidia-kernel and 6111 built and installed without an issue. I guess it's a good thing that the nvidia agp works as good as it does.

There's a good summary of the issues with 6629 here:

http://www.nvnews.net/vbulletin/showthread.php?t=46676

I see there's mention of an agpgart problem and a patch for the nvidia-kernel when using 2.6.11-rc kernels.

On an unrelated note when I was trying the "nv" driver with the tnt2 card I had did an "opengl-update xorg-x11" but as soon as I started glxgears X would restart. This has been the same thing whenever I try to use the xorg-x11 glx with the nvidia cards, it hasn't worked for me in a long time. Anyway, just wanted to mention that glx issue.

I just have to get my savage.ko module to load on the thinkpad with 2.6.11 and I'll be set with the new kernel.

----------

## vandorp

 *thebigslide wrote:*   

> I'm pretty sure those errors you guys are getting are because of an issue with nvidia-kernel not liking some change that's been made to your agpgart driver.  that would also explain why some people don't have an issue.  What are your AGP chipsets?
> 
> 

 

I didn't compile agpgart in the kernel, and in my xorg.conf I have "NvAGP" "1". Seems to work. What do you mean by AGP chipset? This?

```

root@fons ~ # grep -i agp /var/log/Xorg.0.log

(--) PCI:*(2:0:0) nVidia Corporation NV28 [GeForce4 Ti 4200 AGP 8x] rev 161, Mem @ 0xdc000000/24, 0xd0000000/27

(**) NVIDIA(0): Option "NvAGP" "1"

(**) NVIDIA(0): Use of NVIDIA internal AGP requested

(II) NVIDIA(0): NVIDIA GPU detected as: GeForce4 Ti 4200 with AGP8X

(II) NVIDIA(0): Detected AGP rate: 8X

```

 *thebigslide wrote:*   

> 
> 
> 1. emerge kernel sources
> 
> 2. correct the /usr/src/linux symlink
> ...

 

Ok you're right. This worked for me. I do remember that there were times that it didn't work, but I don't know what was different then.

 *thebigslide wrote:*   

> 
> 
> If you point grub's kernel argument to /usr/src/linux/arch/i386/boot/bzImage, you never have to modify grub or install any kernel, just change the symlink.  OR, you can symlink /boot/bzImage to /usr/src/linux/arch/i386/boot/bzImage.  
> 
> 

 

Wow! You're really a person who knows no fear  :Very Happy:  This sounds like it can break rather easily. What happens if your new kernel doesn't boot or can't mount some filesystem?

I have a 100 MB, ext2 boot partition with my kernel and some previous kernels, and my grub files. This partition is not even mounted when the system is running (I guess I'm one of those paranoid guys). All other partitions are reiserfs, I'm not sure if grub can read those. When I install a new kernel, I always make sure there's a grub entry with the old kernel.

Actually I like the part where I copy my new kernel, it makes sense and all that. I could automate everything but I'll keep it this way. It's the nvidia part that really annoys me... Thanks for your comments however.

----------

## thebigslide

Yes, the symlink to /boot will only work if you don't use a boot partition.  You can certainly tell grub for example:

root (hd0,0)

kernel (hd0,3)/usr/src/linux/arch/i386/boot/bzImage

without issues.  You can even do:

root (CD)

kernel (hc0,3)/usr/src/linux/arch/i386/boot/bzImage.

if you want to burn a rescue CD that boots the host kernel.

If you mess up the kernel, just type e on the grub command line and you can just point it to another kernel image.

----------

## rhill

(from the nvidia board linked above)

```
NVIDIA_kernel-1.0-6629-1189413.diff.txt

This patch adds support for 4-level page tables. It is needed to build the driver against Linux 2.6.11 pre-release kernels.
```

this patch is in nvidia-kernel-1.0.6629-r3 and it builds fine for me.  unfortunately i have a TNT2 and can't use it. =P

does anyone know of an equivelent patch for 1.0.6111?  i'm using a combination of ck1 and gentoo patchsets, so maybe i accidentaly missed it when i was putting everything together.

edit: this one didn't help:

http://ck.kolivas.org/patches/2.6/2.6.11/2.6.11-ck1/patches/nvidia_6111-6629_compat2.diff

----------

## thebigslide

What's the error?

----------

## rhill

same as the first post.

i almost thought i got it.  i found a patch @ http://unixforge.org/~matthias-christian-ott/ which after a bunch of editing let me compile at least.  but it just froze the computer when i launched Xorg. =/

----------

## thebigslide

Which of the ck patches are you using and which of the gentoo?  What order did you apply them in?  I'll see if I can hack something together, but I only have a via and an nforce2 AGP to work with at home.  I am having trouble with performance issues with the ck-nvidia patch.  I think it needs a little work  :Smile:   You're not using 4k stacks under kernel hacking are you?

Also, is there a traceback in the X log or dmesg?

----------

## firephoto

Try taking the agpgart out of your kernel. If you using the nvidia drivers use the nvagp too.

You'll have to rebuild your kernel so make sure you do a make clean first then go strip the agpgart out. Once you have the kernel built you can try to emerge the nvidia-kernel, you don't have to reboot (yet).

----------

