Nvidia driver fails to install under kernel 3.3

Hello, im running openSUSE 12.1 and until now i had the Kernel repo activated as well, but after todays upgrade from 3.2.10 to 3.3 the nvidia driver downloaded from the manufacturer`s site (the run file) fails to install:

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Fri Mar 23 21:24:02 2012
installer version: 295.33

PATH: /sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/jvm/jre/bin

nvidia-installer command line:


-> Kernel source path: '/lib/modules/3.3.0-1-desktop/source'
-> Kernel output path: '/lib/modules/3.3.0-1-desktop/build'
ERROR: 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.

So… do you guys have any idea on how can i make the driver create a kernel module for the 3.3 kernel?

In order to have the driver installed i have reverted to kernel 3.1.9 from the openSUSE updates repo.
To bad that the repos dont have dkms packages.

There are some suggestions in this thread: http://forums.opensuse.org/english/get-technical-help-here/tumbleweed/473658-kernel-3-3-nvidia-driver-fix.html

Install the RPMs make gcc kernel-source
Then run these commands as root

cd /usr/src/linux
make cloneconfig
make prepare
cd /lib/modules/`uname -r`/source/arch/x86/include/
cp -v generated/asm/unistd*.h ./asm/

Then try again to install the driver.

More here: http://forums.opensuse.org/english/get-technical-help-here/tumbleweed/473700-temporary-sticky-nvidia-driver-kernel-3-3-a.html
More here: http://forums.opensuse.org/content/38-swerdna-nvidia-opensuse-tumbleweed-hard-way.html

Nice, those solutions look pretty good to me, sorry i did not searched deeper. :slight_smile:
swerdna i already have those installed, i will get back in tty to install the driver.

I think the script idea is a good one because I get confused and make typos in the tty at runlevel 3.

And did you notice there’s a newer driver version 295.33: NVIDIA-Linux-x86_64-295.33.run ?? The script using nvidia.sh as below makes it so easy:

cd /usr/src/linux
make cloneconfig
make prepare
cd /lib/modules/`uname -r`/source/arch/x86/include/
cp -v generated/asm/unistd*.h ./asm/
# the last line (below) must contain the correct path and file name
sh /root/NVIDIA-Linux-x86_64-295.33.run

swerdna, yes i did noticed the new driver version, that is installed right now on my system.
Just one question: does one have to repeat the commands or use the script every time the kernel gets upgraded?

While the “oversight” goes unnoticed by the relevant developers, each time there’s a new kernel you would need to run the script. But when they fix the oversight, then no need for the script.

Next kernel, I’m going to have the script in place and have the file NVIDIA-Linux-x86_64-295.33.run in place. At runlevel 3 I will first run the file “sh /root/NVIDIA-Linux-x86_64-295.33.run”. If I get the error message I will straight away run the file ./nvidia.sh and the oversight will be fixed and the driver installed straight away. With the correct placement of files and preparations, it will be a cakewalk.

My bet was the same, but indeed trying to install the driver first to check if the issue is solved looks like a good way.
I just created a tutorial for romanian users of openSUSE Romania just in case they get in this situation too. Lets hope that the next nvidia driver gets fine tuned to know where to search for the kernel headers.

Thanks swerdna, your script worked great, installing NVIDIA-Linux-x86_64-295.33.run on 32bit system with kernel 3.3

On the first attempt the driver failed with the message ‘cannot install while nouveau driver installed’, although in init 3 as root

After cold re-boot no problem

I would never have got it installed without your script, thanks again