Ubuntu 10 Nvidia Drivers Not Updated After Kernel Update Solution/How-To Manually Rebuild nvidia kernel modules for Ubuntu

I dread updating the kernel and rebooting to find the Ubuntu graphics aren't working and you have to manually intervene.   This is usually because Ubuntu for whatever reason didn't update the drivers you need (eg. the manually compiled Nvidia Kernel driver that MUST be recompiled for each and every kernel update unfortunately).

The most common reason may be that "linux-source" hasn't been installed automatically on my system.  I tried to manually reinstall the nvidia-driver hoping it would update the kernel-module (this is one thing I hate about Linux why can't we have a .dll style module that just works on ALL kernels like Windows without requiring an archaic recompile each time?)

You'll see below that it tells me when I tried to reinstall the nvidia kernel:

Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.

sudo apt-get --reinstall install nvidia-current
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  python-tgext.admin uml-utilities python-openid python-ldap python-webob libjs-scriptaculous python-transaction python-beaker python-toscawidgets
  python-repoze.what python-decoratortools python-mysqldb python-turbojson python-turbogears2 python-zope.sqlalchemy libhtml-template-perl
  python-tg.devtools python-routes mysql-server-5.1 libopenjpeg2 python-sqlalchemy python-peak.util python-dev python-lxml python-nose libmysqlclient-dev
  socat python-webflash python-webhelpers python-catwalk python-pybabel python-beautifulsoup python-repoze.what-plugins python-genshi python-formencode
  python-scgi python-cheetah expect mysql-server python-repoze.who-plugins python-codespeak-lib python-pysqlite2 python-weberror python2.6-dev
  python-repoze.tm2 python-pylons python-turbogears2-doc python-tempita tcl8.5 python-repoze.who python-migrate python-sprox python-setuptools dnsmasq
  python-peak.rules python-pastescript libjs-prototype python-pygments python-decorator python-paste python-pastedeploy python-webtest python-xen-3.3
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 23.3MB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ca.archive.ubuntu.com/ubuntu/ lucid-updates/restricted nvidia-current 195.36.24-0ubuntu1~10.04.1 [23.3MB]
Fetched 23.3MB in 24s (942kB/s)                                                                                                                            
(Reading database ... 476658 files and directories currently installed.)
Preparing to replace nvidia-current 195.36.24-0ubuntu1~10.04.1 (using .../nvidia-current_195.36.24-0ubuntu1~10.04.1_i386.deb) ...
Removing all DKMS Modules
Done.
Unpacking replacement nvidia-current ...
Processing triggers for man-db ...
Setting up nvidia-current (195.36.24-0ubuntu1~10.04.1) ...
update-initramfs: deferring update (trigger activated)
update-initramfs: Generating /boot/initrd.img-2.6.32-38-generic-pae
Loading new nvidia-current-195.36.24 DKMS files...
Building only for 2.6.32-38-generic-pae
Building for architecture i686
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.


Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.32-38-generic-pae
Processing triggers for python-support ...



The solution: Install the Linux Kernel Source + headers & Reinstall nvidia-current kernel module

 

sudo apt-get install linux-source linux-headers-`uname -r`; sudo apt-get --reinstall install nvidia-current

Unpacking replacement nvidia-current ...
Processing triggers for man-db ...
Setting up nvidia-current (195.36.24-0ubuntu1~10.04.1) ...
update-initramfs: deferring update (trigger activated)
update-initramfs: Generating /boot/initrd.img-2.6.32-38-generic-pae
Loading new nvidia-current-195.36.24 DKMS files...
Building only for 2.6.32-38-generic-pae
Building for architecture i686
Building initial module for 2.6.32-38-generic-pae
Done.

nvidia-current.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-38-generic-pae/updates/dkms/

depmod....

DKMS: install Completed.

Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.32-38-generic-pae
Processing triggers for python-support ...


Tags:

ubuntu, nvidia, drivers, updated, kernel, update, manually, rebuild, modules, ubuntui, dread, updating, rebooting, graphics, aren, intervene, didn, eg, compiled, recompiled, quot, linux, hasn, installed, automatically, reinstall, module, dll, kernels, requiring, archaic, recompile, ll, currently, skipped, sudo, apt, install, lists, dependency, packages, python, tgext, admin, uml, utilities, openid, ldap, webob, libjs, scriptaculous, transaction, beaker, toscawidgets, repoze, decoratortools, mysqldb, turbojson, turbogears, zope, sqlalchemy, libhtml, template, perl, tg, devtools, routes, mysql, server, libopenjpeg, peak, util, dev, lxml, libmysqlclient, socat, webflash, webhelpers, catwalk, pybabel, beautifulsoup, plugins, genshi, formencode, scgi, cheetah, codespeak, lib, pysqlite, weberror, tm, pylons, tempita, tcl, migrate, sprox, setuptools, dnsmasq, pastescript, prototype, pygments, decorator, pastedeploy, webtest, xen, autoremove, upgraded, newly, reinstalled, mb, archives, additional, disk, http, ca, archive, lucid, updates, restricted, fetched, kb, database, directories, preparing, current_, _i, deb, removing, dkms, unpacking, replacement, processing, triggers, db, initramfs, deferring, activated, generating, initrd, img, generic, pae, loading, architecture, gmenu, rebuilding, usr, applications, desktop, en_us, utf, cache, headers, uname, initial, ko, sanity, installation, installing, depmod, completed,

Latest Articles

  • Cisco Router Setup Guide and Tutorial Howto With Commands and Examples
  • Linux Bash Script To List All Connected IPs and their network name
  • Cisco Switches How To Get Of Port Line Status Console Messages
  • Cisco DHCP Snooping Relay Setup Information
  • Cisco Switch Setup Guide Command List
  • Cisco 2960 Switch Reset To Factory Defaults
  • How To Boot Cisco CUCM UCSInstall 8.6, 10, 11 and 12 on KVM/Proxmox
  • VBOX VirtualBox How To Import Raw .img Disk File
  • Windows Server 2012, 2016, 2019 How To Install and Missing Disabled Telnet Client
  • proxmox vm networking breaks when you restart your network on the hostnode
  • Linux ln symlink how to update existing symbolic link
  • Ubuntu 18.04 / Linux Mint 19.1 Cannot Type or Login - solution
  • LUKS Hard Drive Encryption on Linux Mint Ubuntu Debian etc how to mount encrypted hard drive
  • How to use nmap locate other machines/computers/servers on your network using nmap
  • Linux Mint 18.2 Create Config File To Start Application Upon Login
  • Dell Wyse Thin Client BIOS Access Key
  • sudoers file in /etc warning about comments/includes!
  • Centos 7 Reallocate logical volume space to another
  • lvm how to reduce volume size
  • letsencrypt certbot error "Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80."