2

On Ubuntu 20.04 Focal, I upgraded to kernel 5.4.0-42 (using the Software Updater GUI / apt) and my Nvidia proprietary drivers stopped working.

Rebooting to the old kernel (5.4.0-40) yields a working system, so it is clear that the kernel update was the trigger for the problem.

I did all the usual things of ensuring that nouveau was blacklisted and updating ramfs. I also purged all nvidia packages from apt and reinstalled. No luck.

1 Answers1

5

For some reason, the headers for 5.4.0-42 weren't installed by apt automatically. (I did the original offending kernel update as part of a prompt from the "Software Updater" GUI.)

Installing the headers with:

sudo apt install linux-headers-5.4.0-42-generic

caused apt to automatically recompile the nvidia kernel module for the new kernel. After a reboot to the new kernel, everything just worked.

I'm not sure why headers weren't installed automatically (I believe they usually are?). Perhaps there is a problem with the apt package for the new kernel? (It was released 2 days ago as of this post.)

This happened on the 20.04 Focal release.

Update:

Per the comments below, the linux-headers-generic metapackage (and the linux-generic metapackage) was not installed on my system. It looks like they were removed on the day that I upgraded to Focal. It happened around the time of removing an old Nvidia driver.

  • 1
    The reason why the headers didn't install may be that meta package linux-headers-generic is not installed for some reason. – Pilot6 Jul 22 '20 at 13:05
  • 1
    install meta-package linux-generic. then both will be drawn; during upgrade from linux-generic package. – nobody Jul 22 '20 at 13:14
  • Interesting! @Pilot6 @nobody -- thank you! Indeed, linux-headers-generic was not installed. Looking at /var/log/dpkg.log, it looks like it was removed on the day I upgraded to Focal. (I certainly did not remove it on purpose). Log here: https://gist.github.com/joelrbrandt/9c324d1d1192e6c8098f4e789c99affe – Joel Brandt Jul 22 '20 at 13:16
  • Thank you! This worked for me after a kernel update to 5.4.0.51-generic occured on a system that had previously been upgrade from ubuntu 18.04 to 20.04. – Hrafn Oct 14 '20 at 22:16