NVidia driver will not install on FC17 & FC18 & FC19

It was that time of year again. The bi-annual kernel upgrade on my Fedora 17 desktop. Normally this all goes very smooth and this time it was no different. At least that\’s how it looked like at first.

a \”sudo yum update kernel\\*\”  always does a very nice job so that was the easy part. I have two relatively peculiar pieces of stuff in/on my system that requires some post-maintenance.

My box has an NVidia  Geforce GT 640 video card which provides me with a very nice picture and also does some gruntwork via cuda in the background. Normally I download the binary (uchh, yuck.. ahem…..) driver from their website, run the installer which builds a static driver and we\’re done. Reboot the system and runlevel 5 (I know \”graphical.target\”) makes sure that the gdm desktop is displayed. That always worked until today.

It turns out that the kernel was upgraded from 3.3.4-5 to 3.7.6-102 and really mucked up the installer. Basically it checks for the kernel version and if it determines it to be outside a specific range it just throws an error-message at yah and says toedeloe.
The message is somewhat like this:

Using: nvidia-installer ncurses user interface 
-> Tagging shared libraries with chcon -t textrel_shlib_t. 
-> License accepted. 
-> Installing NVIDIA driver version 310.32. 
-> Performing CC sanity check with CC=\”cc\”. 
-> Performing CC version check with CC=\”cc\”. 
ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the \’kernel-source\’ or \’kernel-devel\’ RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the \’–kernel-source-path\’ command line option. ERROR: Installation has failed. Please see the file \’/var/log/nvidia-installer.log\’ for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

The error message is BS since the sources and headers were all there. This was a slap in my face since this means you\’re unable to get started in graphical mode and you are pretty limited with you options then.

My solution was the first extract the NVidia driver with the -x parameter. This extracts the entire package into a subfolder. Then, in that subfolder, open up the kernel/conftest.sh script. This is the script that mainly does all the hard work in testing to see if you\’re all set with dependencies etc. Then goto line 1706 (at least with version 310.32) and you\’ll see something like:

                if [ -n \”$PATCHLEVEL\” -a $PATCHLEVEL -ge 6 \\
                        -a -n \”$SUBLEVEL\” -a $SUBLEVEL -le 5 ]; then                    SELECTED_MAKEFILE=Makefile.kbuild

 The highlighted line shows the problem. My $PATCHLEVEL is OK. 7 is greater than or equal to 6 but my $SUBLEVEL in the same context is incorrect : 6 is not greater than or equal to 5.
Simple thing to change the 5 into a 6, run the nvidia-installer script and voila, it builds. All sorted.

The second piece is my Virtual box installation which also doesn\’t have an standard build in the main YUM repositories so I always install the RPM from the VirtualBox website. When the kernel gets updates always make sure you run the \”/etc/init.d/vboxdrv setup\” command which links all the required kernel modules to work nicely with the new kernel.

Cudo\’s to Leigh Scott who sorted out the NVidia problem over here. Strange that NVidia hasn\’t fixed this right away.


Update on FC19, there is another bug which is solved by 319.49. So use that one when installing on FC19. You don\’t need to modify any of the setting I mentioned before and this driver will install happily on 3.10.9-200.fc19.x86_64 #1 SMP Wed Aug 21 19:27:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


Leave a Comment

Scroll to Top