Apr 012012
 

UPDATE1: as noted in the comments, and as now I had the chance to test it, I’ve removed some useless includes from the patch

Seems the drivers broke again with 3.4.0-rc1. According to git logs it seems someone dissected the asm/system.h header in several subfiles 3 days ago (so cannot really blame nvidia for this as this was done when they were going home for the weekend) and probably will break several other off tree modules. Anyway the fix is simple. to keep compatibility you need to replace #include <asm/system.h> in nv-linux.h and conftest.h with these two snippets. Also I’ve done a new version of nvidiafixandrun.sh with the additional changes. To use that just do sudo ./nvidiafixandrun.sh <nvidiainstaller file> [parameters if any]

nv-linux.h

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
#include <asm/system.h>
#endif

conftest.sh

#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
#include <asm/system.h>
#endif

That’s all…

  7 Responses to “3.4.0-rc1 and nvidia drivers”

  1. Convenient, THX C:
    ..and if someone doesn’t use the installer (like us gent0oerz), paste this into your bash while in the driver source dir.
    sed -i 's/CFLAGS="$CFLAGS -I$SOURCES\/arch\/x86\/include"/CFLAGS="$CFLAGS -I$SOURCES\/arch\/x86\/include -I$SOURCES\/arch\/x86\/include\/generated"/' kernel/conftest.sh
    sed -i 's/#include /#include \n#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0)\n#include \n#else\n#include \n#endif/' kernel/conftest.sh
    sed -i 's/#include /#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0)\n#include \n#else\n#include \n#endif/' kernel/nv-linux.h

  2. Hi,

    I think it is better to check for LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) this way we preserve compatibility with stable 3.3.x with x>1 which still use system.h.

    But pushing that a little further, it looks like asm/switch_to.h is not even needed.

    Here is the patch I use for the debian package:
    bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=nvidia-295.33-build-with-linux-3.4_v2.patch;att=1;bug=667719

    Does that wok for you too?

    Ciao,
    Antonio

    • i was sure i had a missing symbol but could have a look when rc2 is released, rc1 is unusable for me after a short test: audio still not working, bluetooth entirely broken, other serious I/O issues and usb disconnects.

      • ok looks like it’s indeed not needed, maybe i must have mixed up something. anyway i’m going to update it without the additional header

  3. Thank you very much! Very helpful!

  4. Thank you!!! Thank you very much

  5. Hi, thanks for this. Tried to use your suggestions to get 295.33 driver to install on Ubuntu 12.04 (3.5.0-13 kernel) with no luck.

    What worked for me in the end was creating an empty system.h file in /usr/src/linux-headers-3.5.0-13/arch/x86/include/asm/

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>