NVIDIA Linux 3.7 patch/fix

Aaron, it seems like you guys have become a bit inattentive nowadays.

Linux 3.7 has been long out and NVIDIA drivers (even beta) are still not compatible with it.

I’m using the latest beta(313.09) on 3.7 just fine.

I am using the latest 3.7.0 git kernel updated a few hours ago.

The patch fixed it after some hand editing of conftest.sh
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
    There were 2 offending lines before the one added above rather than 1 and I had to remove them.
    -I$SOURCES and -I$OUTPUT were on separate lines.

Hi,
Any suggestions for this ongoing problem, now in 3.7.1?

linux-3.7.1-gentoo # patch -p1 < nvidia-304_60.run_linux-3.7.diff.jpg.patch
can’t find file to patch at input line 6
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|
|Index: kernel/conftest.sh
|===================================================================
|— kernel/conftest.sh.orig
|+++ kernel/conftest.sh

Thanks

It looks like that you trying to patch the kernel sources instead of the nvidia driver sources

To get the driver sources, run the .run package with the with --extract-only switch. This will create an directory with the driver sources. Cd to that directory and apply the patch there. Then run the nvidia-installer script in that directory.

If that still fails with the message that your kernel source aren’t configured, make the link as described in https://devtalk.nvidia.com/default/topic/525935/linux/please-update-310-xx-drivers-for-linux-3-7-3-8-compatibility/2/
PS more current version of the nvidia driver (310.19 and newer) don’t need that patch but only the link

Thank you mkossmann

Seems I do need the link. I did the patch within the NVIDIA source per your instructions and executed

cd /usr/src/linux
ln -s include/linux include/generated/uapi/linux

But when I then tried
cd /usr/portage/distfiles/NVIDIA-Linux-x86_64-304.64
./nvidia-installer

I still got the same error.
I need version 304 because my gpu is old (6600)