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 To Upgrade Debian 8,9,10 to Debian 12 Bookworm
  • Linux dhcp dhclient Mint Redhat Ubuntu Debian How To Use Local Domain DNS Server Instead of ISPs
  • Docker dockerd swarm high CPU usage cause solution
  • Docker Minimum Requirements/How Efficient is Docker? How Much Memory Does Dockerd Use?
  • qemu-nbd: Failed to set NBD socket solution qemu-nbd: Disconnect client, due to: Failed to read request: Unexpected end-of-file before all bytes were read
  • apache2 httpd apache server will not start [pid 22449:tid 139972160445760] AH00052: child pid 23248 exit signal Aborted (6) solution Mint Debian Ubuntu Redhat
  • How to use the FTDI USB serial cable to RJ45 adapter to connect to the console on Cisco/Juniper Switch Router Firewall in Linux Ubuntu Debian Redhat
  • How To Setup Python3 in Ubuntu Docker Image for AI Deep Learning
  • How to Configure NVIDIA GPUs with Docker on Ubuntu: A Comprehensive Guide for AI Deep Learning CUDA Solution
  • Linux Ubuntu Mint how to check nameservers when /etc/resolv.conf disabled solution
  • Docker cannot work on other overlayfs filesystems such as ecryptfs won't start overlayfs: filesystem on '/home/docker/overlay2/check-overlayfs-support130645871/upper' not supported as upperdir
  • Linux How To Access Original Contents of Directory Mounted Debian Mint CentOS Redhat Solution
  • ecryptfs how to manually encrypt your existing home directory or other directory
  • How to Reset CIPC Cisco IP Communicator for CME CUCM CallManager
  • Internet Explorer Cannot Download File "Your security settings do not allow for this file to be downloaded." Security Settings Solution
  • Linux How To Upgrade To The Latest Kernel Debian Mint Ubuntu
  • Firefox how to restore and backup saved passwords and history which files/location
  • Linux How To echo as root solution to use tee permission denied solution Ubuntu Debian Mint Redhat CentOS
  • Linux how to keep command line bash process running if you are disconnected or need to logout of SSH remotely
  • Linux swapping too much? How to check the swappiness and stop swapping