NVIDIA Driver with Kernel 3.3.x

Revision as of 02:12, 8 May 2012 by >Samthecrazyman (Problem date added)

This has been fixed as of version 3.3.4 of the kernel and version 295.40 of the NVIDIA driver. These steps are recorded in case the problem arises again.

You may be unable to install NVIDIA Driver 295.20 with the kernel 3.3.x branch provided by the Tumbleweed repository or the Stable branch of the kernel repository. This is due to the sources not producing the right files in the right places. This causes the NVIDIA to report it cannot find source files to the kernel, even though they are installed.

Problem first arised: 10th April 2012

What you need to know

  • Make sure you have downloaded the latest version of the NVIDIA driver.
  • Make sure you have kernel-<variant>-devel and kernel-sources installed. These will be needed, even during these steps.
  • You will need root access to the command line to follow out these steps.
  • You will need to be in runlevel 3 to complete these steps. Specify 3 at the GRUB command line before boot or run init 3 from the command line to enter runlevel 3.
  • Directories may need to be changed depending on factors of your system. There are two variants of the kernel - kernel-desktop and kernel-deault. You may also need to replace x86_64 with x86 if you are running a 32-bit system.
  • You may need to run this again in the future if you update the kernel again and the NVIDIA installer doesn't install again. Omit the kernel versions on the command line with the kernel version you are running.

Fixing the files

The following steps will create the files that are needed to run the NVIDIA installer.

  1. Download the NVIDIA driver installer from the NVIDIA website.
  2. Change directory to /usr/src/linux
  3. Run make cloneconfig
  4. Run make prepare. The files needed are now generated, we need to copy them to the right place.
  5. Change directory to /lib/modules
  6. Run dir. You may be presented with a large list, depending on how many times you have updated the kernel. We need to use the folder with the same version and variant of the kernel as we are installing the driver under. This will more than likely be the highest version number. For the rest of the tutorial, we assume the kernel version 3.3.0-16. Yours may be different.
  7. Change directory with either /lib/modules/3.3.0-16-desktop/source/arch/x86_64/include or /lib/modules/3.3.0-16-default/source/arch/x86_64/include depending on kernel variant.
  8. Run the command cp -v generated/asm/unistd*.h ./asm/. Make sure there is no / before generated or this will fail. 3 files will then be copied to the correct location.
  9. You are now ready to go, make sure your in runlevel 3 and run the installer again.

External links

Steps used to resolve this problem - openSUSE Forums