I’ve been using the 440.82 driver without problems on Ubuntu 20.04 LTS (focal) on a NVS 510 multi-monitor system for about 2 weeks, until I ran a “sudo apt-get update && sudo apt-get upgrade” – and then Gnome showed errors (crashed) after login, so I tried to rebuild the driver with
./NVIDIA-Linux-x86_64-440.82.run, as is often necessary. after an upgrade, but this time the build failed with the following error message:
ERROR: Failed to run `/usr/sbin/dkms build -m nvidia -v 440.82 -k 5.3.0-40-generic`: Error! Your kernel headers for kernel 5.3.0-40-generic cannot be found. Please install the linux-headers-5.3.0-40-generic package, or use the --kernelsourcedir option to tell DKMS where it's located
The “linux-headers-5.3.0-40-generic” package is not available for Ubuntu 20.04 LTS (focal), as much newer files are already installed (“linux-headers-5.4.0-37-generic”):
sudo apt list --installed | grep linux-headers WARNING: apt does not have a stable CLI interface. Use with caution in scripts. linux-headers-5.4.0-37-generic/focal-updates,focal-security,now 5.4.0-37.41 amd64 [installed,automatic] linux-headers-5.4.0-37/focal-updates,focal-updates,focal-security,focal-security,now 5.4.0-37.41 all [installed,automatic] linux-headers-generic/focal-updates,focal-security,now 18.104.22.168.40 amd64 [installed,automatic]
FWIW, I tried to load “linux-headers-5.3.0-40-generic” from 18.04 (bionic), which required to ignore compiler warnings (because that package was compiled with gcc 7.3 while current version is 9.3).
I don’t know if the most recent 20.04 LTS upgrade had files removed, but I think the nVidia driver needs to be updated to reflect the current packages.