NVIDIA Driver with Kernel 3.3.x
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 runinit 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
andkernel-deault
. You may also need to replacex86_64
withx86
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.
- Download the NVIDIA driver installer from the NVIDIA website.
- Change directory to
/usr/src/linux
- Run
make cloneconfig
- Run
make prepare
. The files needed are now generated, we need to copy them to the right place. - Change directory to
/lib/modules
- 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. - 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. - Run the command
cp -v generated/asm/unistd*.h ./asm/
. Make sure there is no/
beforegenerated
or this will fail. 3 files will then be copied to the correct location. - You are now ready to go, make sure your in runlevel 3 and run the installer again.