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

  • How high can a Xeon CPU get?
  • bash fix PATH environment variable "command not found" solution
  • Ubuntu Linux Mint Debian Redhat Youtube Cannot Play HD or 4K videos, dropped frames or high CPU usage with Nvidia or AMD Driver
  • hostapd example configuration for high speed AC on 5GHz using WPA2
  • hostapd how to enable and use WPS to connect wireless devices like printers
  • Dell Server Workstation iDRAC Dead after Firmware Update Solution R720, R320, R730
  • Cloned VM/Server/Computer in Linux won't boot and goes to initramfs busybox Solution
  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint