
Originally Posted by
paul_in_london
I'm in the same boat. My graphics card isn't supported by the latest nvidia-current. The kernel module built ok with 3.7-rcN I think, but wasn't loadable.
I've switched to nvidia-current-updates which doesn't build at the moment with 3.7-rcN (without patching).
Will either hold out for a new version of nvidia-current-updates or look into patching it.
A few thoughts...
Evidently, my GeForce 7600GT has been deemed a legacy device, and won't be supported beyond nVidia 304.x.
Put another way, nVidia >= 310.x will never work in this rig, unless I upgrade my hardware.
The greater issue is, the VM_RESERVED flags have disappeared in kernel 3.7.x and need to be replaced (kernel patch) or ignored (nVidia patch).
I took the easy route and simply patched two (2) files in my nVidia 304.51 folder. My assumption is, as long as I don't do a fresh install of nvidia-current, e.g. not patched, I will be able to upgrade the kernel, at will.
The VM_RESERVED flags are not coming back, AFAIK. They are remapping a lot of things in kernel 3.7.x to make it compatible with upstream developments -- kmod being one of them.
Anyway, that's the *feeling* I get, from reading around in the gits.
I can live with nVidia legacy drivers, but my kernel fetish is a different matter. LoL! 
Patching the nVidia install seems to be the easiest way of accomplishing this...
Here are the patches I applied:
Code:
--- conftest.sh.dist 2012-10-11 19:18:22.704848496 -0400
+++ conftest.sh 2012-10-12 20:35:55.707213868 -0400
@@ -20,6 +20,7 @@
ISYSTEM=`$CC -print-file-name=include 2> /dev/null`
SOURCES=$4
HEADERS=$SOURCES/include
+HEADERSA=$SOURCES/include/uapi
OUTPUT=$5
XEN_PRESENT=1
@@ -118,7 +119,7 @@
fi
fi
- CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
+ CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS"
test_xen
@@ -146,10 +147,10 @@
fi
fi
- CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
+ CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS"
if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
- CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$OUTPUT/arch/x86/include/generated"
+ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/uapi -I$OUTPUT/arch/x86/include/generated -I$OUTPUT/arch/x86/include/generated/uapi"
elif [ "$ARCH" = "arm" ]; then
CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include -I$OUTPUT/arch/arm/include/generated"
fi
Code:
--- nv-mmap.c.dist 2012-08-08 22:52:53.000000000 -0400
+++ nv-mmap.c 2012-08-14 23:52:41.257235863 -0400
@@ -450,7 +450,7 @@
NV_PRINT_AT(NV_DBG_MEMINFO, at);
nv_vm_list_page_count(&at->page_table[i], pages);
- vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED);
+ vma->vm_flags |= (VM_IO | VM_LOCKED | (VM_DONTEXPAND | VM_DONTDUMP));
The first patch is a drop-in.
- Make a text file. Example: uapi-patch.txt
- Drop it into your nVidia folder. Example: ~/usr/src/nvidia-current-304.51
- Run the patch from inside your nVidia folder with superuser privs. Example:
Code:
sudo patch -p0 <uapi-patch.txt
The second patch is a bad copy n' paste, or whatever -- couldn't get it to work -- so I manually patched it...
- Edit nv-mmap.c with root auth
- Find:
Code:
vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED);
- Replace with:
Code:
vma->vm_flags |= (VM_IO | VM_LOCKED | (VM_DONTEXPAND | VM_DONTDUMP));
- Save
Having said that, I *might* try to install nVidia 304.60...
Bookmarks