Since year I do use on my Linux workstations graphic cards with nVidia chipsets. In my latest and already some years old machine I do use a nVidia Geforce 9600GT. Today it is absolutely not the fastest card anymore, but still for my needs perfect because it offers all necessary ports (2xDVI,2xVGA) and enough 3d performance.

As linux distrubution I do use openSUSE together with the closed source GeForce driver of nVidia to be able to use all features and the full performance of the card. In the beginning of 2012 I switch from the normal release version of openSUSE to the rolling release version called tumbleweed. If you red the wiki-page of tumbleweed at the openSUSE wiki (http://en.opensuse.org/Portal:Tumbleweed) you will recognize that it is not recommended to use the close source GeForce driver. As I found out it is not a big deal to use it with tumbleweed. The only issue is that you have to reinstall it everytime a new kernel version was installed. I handle it in that way that I keep a copy of the nVidia installer in my home directory and after a new kernel was installed I just boot the system into run level 3 and run the installed. That’s it => Afterwards everything runs as expected.

As you may recognized running the nVidia installer on openSUSE with a kernel equal or higher than 3.7 is not possible anymore, because it quits with an error text like:

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….
” => Have a look on the screenshot to the right for the full error text.

Error message shown by the nVidia GeForce driver when it is executed under openSUSE tumbleweed with an linux kernel equal or higher than 3.7
Error message shown by the nVidia GeForce driver when it is executed under openSUSE tumbleweed with an linux kernel equal or higher than 3.7

The log file of the nVidia installer is really a shame – The error text says: “Look into the log file for more information”. And what does it contain? => The same error message! Well… that are incredible detailed information 😉

After a little bit of searching the web I found some links and websites talking about that the nVidia installer is expecting the some files of the kernel source structured a little bit different than some linux distributions delivering them. In addition if you searched the web already I sure that you found some kernel patches as well. After some “try and error” the solution is quite simple but also a little bit openSUSE specific.

The reason why the installer quits is that it might use a hard coded path to look for the file “version.h”. For the installer the “version.h” needs to be here, otherwise it troughs the ugly error message from above:

/usr/src/linux/include/linux/version.h

So the solution is pretty easy and clear. You just need to create a symbolic link from the real location of “version.h” to the one where the nVidia installer expects the file. For the most linux distributions, except openSUSE, the following command should work:

 ln -s /usr/src/linux/include/generated/uapi/linux/version.h /usr/src/linux/include/linux/version.h

The kernel-source which comes with openSUSE tumbleweed (maybe SUSE13.x too?) stores the “version.h” in the little bit different path. The correct command for the symbolic link is:

 ln -s /usr/src/linux-obj/x86_64/desktop/include/generated/uapi/linux/version.h /usr/src/linux/include/linux/version.h

I do run the 64-bit version of openSUSE. So in case you are using a 32-bit version you may need to adapt the path named above. As you can see there is the string “x86_64” in the middle of the command. I assume that you need to adapt the path there in case of the 32-bit version of openSUSE. (Feel free to leave a comment if you had this issue and you found the correct path).

Last but not least: After creating the symbolic link you should be able to execute the nVidia installer successful. But keep in mind: You need to create this symbolic link each time tumbleweed updates your kernel to a newer version!!

openSUSE tumbleweed with kernel 3.7 or higher using nVidia GeForce driver

2 thoughts on “openSUSE tumbleweed with kernel 3.7 or higher using nVidia GeForce driver

  • 2017-03-05 March 2017 at 03:58
    Permalink

    I have an older 32 bit machine that I recently installed OpenSuse 13.1 (i586) on. Nvidia has a fairly recent version of the driver for this particular GPU – which
    I downloaded from their web site.

    When I try to install it I get several different error messages. If I just run the installer without doing anything else, I get an error message about “the version.h
    file does not exist”. Then when I go in and create the symbolic links as you explain, I get the same error message you mention on this page. I just thought you
    may have come across some additional information since this page was originally posted that you might pass my way.

    Reply
    • 2017-03-05 March 2017 at 12:53
      Permalink

      Hi Jim,
      at the times I wrote the blog entry the kernel 3.7 was very new and the nVidia driver was not really able detect it, as well as the locations where openSuSE stored the information about the kernel source/ header was different to other distros.
      This issue was fixed by nVidia some weeks later with a newer driver version.
      So in case you have on your 32bit system all relevant files and programs installed: kernel-source, kernel-header, gcc, make… it should work.
      BUT, I never used the 32bit version!
      In your situation I would recommend to check the following:
      1.) Is nVidia still supporting 32bit Linux with their drivers? Especially the support of your nVidia card
      2.) Try an older driver => Dated to the year 2014
      If non is working, stick with the latest open source nVidia drivers (mesa/ nouveau). Support shall be OK too in case you are not planning to use the computer for gaming.

      Cheers
      Nicolas

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*