Unable to install nvidia driver (96.43.23) in Xubuntu 13.10: The kernel header file does not exist.

I’ve got an old shuttlePC with a motherboard with a AMD Sempron 3000+ CPU and an integrated nvidia GeForce4 MX graphics card. I’m trying to get it to run Xubuntu 13.10. Nouveau doesn’t do a good job of working with the card, and it makes te screen all jittery. If I disable nouveau the screen is perfectly fine, but I can only get resolutions up to 800x600. Therefore I tried to install the nvidia driver for my card, which is version 96.43.23, I believe. After disabling nouveau I get this error:

The kernel header file
       '/lib/modules/3.11.0-18-generic/build/include/linux/version.h' does not
       exist.  The most likely reason for this is that the kernel source files
       in '/lib/modules/3.11.0-18-generic/build' have not been configured.

I’ve heard that similar problems for other legacy drivers have been resolved by patching the driver (with a patch such as this one. But I haven’t been able to find a patch for 96.43.23, and I’m not really sure how the patching process works anyway.

So to conclude: is it possible to get my machine to run this version of Xubuntu and have it install the nvidia drivers? If not: what’s my best course of action? Do I install a different version of Xubuntu that matches the requirements of the driver? Are there other versions of nouveau that will work better with this nvidia card? Any and all help is much appreciated.


nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Tue Mar 11 23:51:11 2014
installer version: 1.0.7

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

option status:
  license pre-accepted               : false
  update                             : false
  force update                       : false
  expert                             : false
  uninstall                          : false
  driver info                        : false
  precompiled interfaces             : true
  no ncurses color                   : false
  query latest version               : false
  OpenGL header files                : true
  no questions                       : false
  silent                             : false
  no recursion                       : false
  no backup                          : false
  kernel module only                 : false
  sanity                             : false
  add this kernel                    : false
  no runlevel check                  : false
  no network                         : false
  no ABI note                        : false
  no RPMs                            : false
  no kernel module                   : false
  force SELinux                      : default
  no X server check                  : false
  no cc version check                : false
  run distro scripts                 : true
  no nouveau check                   : false
  run nvidia-xconfig                 : false
  sigwinch work around               : true
  force tls                          : (not specified)
  X install prefix                   : (not specified)
  X library install path             : (not specified)
  X module install path              : (not specified)
  OpenGL install prefix              : (not specified)
  OpenGL install libdir              : (not specified)
  utility install prefix             : (not specified)
  utility install libdir             : (not specified)
  installer prefix                   : (not specified)
  doc install prefix                 : (not specified)
  kernel name                        : (not specified)
  kernel include path                : (not specified)
  kernel source path                 : (not specified)
  kernel output path                 : (not specified)
  kernel install path                : (not specified)
  precompiled kernel interfaces path : (not specified)
  precompiled kernel interfaces url  : (not specified)
  proc mount point                   : /proc
  ui                                 : (not specified)
  tmpdir                             : /tmp
  ftp mirror                         : ftp://download.nvidia.com
  RPM file list                      : (not specified)
  selinux chcon type                 : (not specified)

Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 96.43.23.
-> Running distribution scripts
   executing: '/usr/lib/nvidia/pre-install'...
-> done.
-> The distribution-provided pre-install script failed!  Continue installation 
   anyway? (Answer: Yes)
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
ERROR: The kernel header file
       '/lib/modules/3.11.0-18-generic/build/include/linux/version.h' does not
       exist.  The most likely reason for this is that the kernel source files
       in '/lib/modules/3.11.0-18-generic/build' have not been configured.
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.



Are you sure, that you have installed the header-files for your running kernel?
What does

apt-get install linux-headers-$(uname -r)


I’m not sure of that.

When I run that line I get:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-3.11.0-18-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

And then if I try to install the nvidia driver again:

ERROR: The kernel header file
       '/lib/modules/3.11.0-18-generic/build/include/linux/version.h' does not
       exist.  The most likely reason for this is that the kernel source files
       in '/lib/modules/3.11.0-18-generic/build' have not been configured.

Is that useful?

I would say, this driver does not support the kernel 3.11.

Grab the two patches here (use the “Download tarball” link) and you can compile the driver for up to kernel 3.13. Important - you need Xorg 1.12, newer versions aren’t supported.

PS. I have the same Shuttle machine :). And same problem with nouveau, there’s just something weird about the way the onboard Geforce 4MX is wired. There’s a bug about it here: https://bugs.freedesktop.org/show_bug.cgi?id=54587

Xorg -version yields:

X.Org X Server 1.14.5
Release Date: 2013-12-12
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0-54-generic i686 Ubuntu
Current Operating System: Linux XPC-X 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:13:28 UTC 2014 i686
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.11.0-18-generic root=UUID=a43fe712-aea2-4fe5-8943-167d3563a864 ro quiet splash vt.handoff=7
Build Date: 17 December 2013  10:03:52AM
xorg-server 2:1.14.5-1ubuntu2~saucy1 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.30.2

I guess I should downgrade Xorg? Does that have negative side-effects that I need to know about?

You must downgrade X if you want to use the 96xx driver, it will not work with the 1.14 version you currently have.

Input drivers need to be compiled for the Xorg version you’ll be using. In your case, you need to get an xserver-xorg-input-evdev package that was compiled to work with Xorg 1.12. That’s it, no other effects.

I can’t seem to find a guide on how to downgrade to Xorg 1.12. All I can find are guides that are very specific to other distributions and sets of drivers. Am I missing something? You make it sound like downgrading to 1.12 should be rather straight-forward.

And also, where do I look for this package? I’m very sorry if these are stupid questions. I’m starting to feel a little out of depth.

How easy it is to downgrade depends on your distro and/or how well you know your way around with a package manager. For Xubuntu there should be a PPA somewhere. If there isn’t, well, crappy distro then :P

I had also the problem with running
error message in syslog
‘/lib/modules/4.15.0-58-generic/build/include/linux/version.h’ does not exist

The problem could be solved by creating a link in
ln -s /usr/include/linux/version.h version.h

Of course you have first to check whether /usr/include/linux/version.h is the right place