Jan 202012
 

UPDATE: I’ve added a simple bash script which does the first way. Just pass to it the installer name and the arguments you would pass normally. For example in my case I would just do ./nvidiafixandrun.sh ./NVIDIA-Linux-x86_64-295.09.run -K –kernel-name=3.3.0-rc1-custom or if you are doing a full install in the current kernel you would just do ./nvidiafixandrun.sh ./NVIDIA-Linux-x86_64-295.09.run (rember as root). Enjoy.

Looks like a file, which is needed during the configuration test of the nvidia drivers installer, got moved (and autogenerated see kernel.org). So it’s position is not the same as before, and this breaks the checks showing the classic dialog:

If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the “KBUILD_OUTPUT” or
the “O” KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.

There are two ways this can be fixed:

The first way is fixing the nvidia installer side.

Extract the nvidia installer package with -x as argument passed to the sh package then go in the folder it was extracted to (should be /tmp)

Then go to the kernel sub folder and open the conftest.sh search for

CFLAGS=”$CFLAGS -I$SOURCES/arch/x86/include”  and replace it with CFLAGS=”$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/generated”

this way the files needed for the conftest will be included and it will succeed.

You can use this script to get it done easily. It will cleanup after running the installer so it will look like a normal install.

The second way is hacking a bit the include folders

Go in /lib/modules/<kernelname>/source/arch/x86/include/ and do cp generated/asm/unistd*.h ./asm/

This will copy the required files where they were expected and all will go well.

Enjoy the new kernel with your nvidia drivers!

On a side note this time there are no more patches required for vmware over the ones for 3.2.

Attached Files:

  19 Responses to “Linux kernel 3.3-rc1 and NVIDIA drivers. Vmware this time works.”

  1. it doesn’t work man i do

    ./nvidiafixandrun.sh ./NVIDIA-Linux-x86_64-295.09.run –kernel-name=3.3.0-rc2-custom

    and the kernel i compile from here

    http://www.howopensource.com/2011/08/how-to-install-compile-linux-kernel-3-0-in-fedora-15-and-14/#comment-6459

    you know what i do wrong

  2. [...] 3.3.0-RC2 & Nvidia Something has changed in the running of the nvidia module as described here However the fix described on this site does not work for me. Keeps telling me that the option [...]

  3. [...] (schamlos kopiert von hier) Go in /lib/modules//sources/arch/x86/include/ and do cp generated/asm/unistd*.h ./asm/ Related [...]

  4. I did not use the script but applied the suggested patch to the file using the sed command in the script. It worked like a charm! Thanks a lot.

  5. Option 2 works for me on 3.3 rc6, thanks very much

  6. /lib/modules//sources/arch/x86/include/ was /lib/modules//source/arch/x86/include/ (source, not sources) in my case.

  7. Hi,

    Does this fix apply to all distro’s…? I’m running Mint 12 and the path /lib/modules//source/arch/x86/include/ doesn’t exist… I have no source folder in the any of the kernels listed in /lib/modules/…. any ideas?

    Many Thanks

  8. I don’t believe so. I have folder for my old kernel, 3.0.0.12 and the new one I’m trying to install (3.3.0.0 RC7) in /lib/modules/ but within those kernel folders there is not a source folder… I have 3 folders in there – build, initrd and kernel…

    I am having the same Nvidia compile issue as you guys… however, since I actually use bumblebee for my graphics since my laptop uses Optimus technology, I actually pushed ahead with the 3.3 install and am now running it without issue at the moment. But I guess I’d like to clear up this Nvidia problem just in case in might cause issues elsewhere.

    • either kernel or build could have a similar structure inside and you could operate from there (usually they are symlinks). Anyway I’d suggest using the script, that will always work as it does the real fix: changing the nvidia installer checks to be correct for the new kernel.

      • Apologies for the hand holding here – I’m new to Linux this year… but I’m not quite sure what the .run file you are referencing is. In my case the errors I got at kernel install were like this,

        Error! Bad return status for module build on kernel: 3.3.0-030300rc7-generic (x86_64)
        Consult /var/lib/dkms/nvidia-current-updates/280.13/build/make.log for more information.
        Error! Bad return status for module build on kernel: 3.3.0-030300rc7-generic (x86_64)
        Consult /var/lib/dkms/nvidia-current/280.13/build/make.log for more information.

        I guess this means I currently have nvidia 280.13 installed. Where would I find the appropriate .run file?

        Thanks

        • ah are you using your distribution packages? Then I’d suggest to contact your distribution developers in order to fix their packages properly. Likewise for the headers you can do a file system search and try to reproduce the folder structure stated above. The run is for those who install from the official package from nvidia.

  9. Many Many Thanks.

    Optinon 2 works for me Debian linux kernel 3.3 and nvidia driver 295.20.

  10. Thank you so much.
    Option 2 works for me Ubuntu 11.10 kernel 3.3 and NVIDIA Driver 295.20.

  11. It’s worked!!!!!!

    Thanks this is a great tutorial.

    Congratulations………

  12. Hi!

    Patching conftest.sh (method 1) worked for me with Linux 3.3.4 and the nVidia 96.43.20 legacy driver.

    Thanks a big lot for sharing the info!

    Kind regards, js

  13. [...] 由于新的版本的ubuntu和mint的内核都已经升级到3.0版本。有些目录结构发生了变化。所以,若需要安装的是比较旧的显卡驱动,它们只对2.4、2.6的内核有比较好的支持,在安装过程中可能会提示找不到内核相关文件的错误。若要解决该问题,可以手动修开解压后的driver.sh中的脚本文件,手动给出符合本机情况的正确路径。具体方法,可以参考: Linux kernel 3.3-rc1 and NVIDIA drivers. Vmware this time works. http://weltall.heliohost.org/wordpress/2012/01/20/linux-kernel-3-3-rc1-and-nvidia-drivers/ [...]

 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>