For a gaming system, I always want the latest driver. So, I often go nVidia’s site, download the latest (sometimes beta) drivers for my Fedora 18 system. After upgrading to a new kernel (there’s been a few released lately), I was unable to install the nVidia blob drivers from the site, and it took me a while to figure out why.

When running NVIDIA-Linux-x86_64-313.18.run, as downloaded from the site, I kept getting the following 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 I started digging into the driver, and ran it with a “-x” option to extract it only, like so:

sh ~/NVIDIA-Linux-x86_64-313.18.run -x

That created a directory structure that I could look into, and looking through the files, I figured “kernel” was a good directory to start in, and “conftest.sh” sounded like something that would be used to … drum roll … check configuration and do some sanity testing before allowing me to continue.

For some reason, /usr/src/kernels/3.7.8-202.fc18.x86_64/include/linux no longer includes a version.h (which the nVidia driver uses), so it was failing to detect which kernel version I had installed. After some searching through the filesystem, I found that it was instead in /usr/include/linux/version.h.

Now there are probably much more elegant ways to do this, like with some environment variables or magic switches to the NVIDIA.run file, but my crude solution worked:

ln -s /usr/include/linux/version.h /usr/src/kernels/3.7.8-202.fc18.x86_64/include/linux/version.h

After that, the driver installed just fine and I’m back to 3D accelerated goodness (none of that fallback mode crap for Gnome Shell).

And actually, I’ve popped in to KDE 4.9 to have a look around, as I haven’t tried this desktop environment in a few years. Seems okay so far. Gnome Shell has been giving me some trouble lately at work (very sluggish performance over time requiring a restart of the DE), so maybe this will be better…

I’ll have to see how it performs with my games…