Friday, March 23, 2012

NVidia Drivers 295.33 and Linux Kernel 3.3

For those who are using the latest Linux Kernel 3.3 and having problem to compile NVidia Proprietary Driver, there's a good news because NVidia has released a new updated driver which should be compatible with the Linux Kernel 3.3. It was announced on NVNews (NVidia's Forum) and it has been placed on their FTP Servers (32 and 64 bit).

If you still insist of using your current NVidia driver (290.20), then you will have to patch the NVidia driver as the new kernel has moved some of the files which makes the check process failed and resulted in this kind of error messages:
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.
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details.
 There are two ways to patch it, the easy and the hard way. Here's the easy part:
  • Go to Go in /lib/modules//source/arch/x86/include/ 
  • cp generated/asm/unistd*.h ./asm/ (as root user)
  • Pretty easy right?
As for the hard part, it requires you to understand a little bit more of Linux Flags, so to make it easier, you can download a simple bash script provided on Weltal's blog (mirrored on my Box account) to make the process automatically. You only need to run the script like this: ./nvidiafixandrun.sh ./NVIDIA-Linux-x86-295.20.run.

It will extract the NVidia driver, patch it, and re-package it again so you can use it afterwards.

My suggestion is still downloading the latest NVidia driver as it adds more hardware support and also fixed a lot of bugs found on previous versions.