Ubuntu Server 17.10, nVidia v390.30 driver, Cuda V9.0.176 : Cannot load nvidia driver since kernel update

@generix Hi,

I think you can add a command in your nvidia-bug-report.sh script to test if “linux-headers-$(uname -r)” is installed on the system so as to save some investigation time for others with the same problem :

You can also add “linux-headers-generic” to the list of dependencies of “nvidia-xyz” packages.

Thanks again for your time and your help.

Cheers.

Since nvidia-bug-report.sh is distro agnostic, it would be kind of overload to check for distro specific packages. Especially since the dependency to the headers is there but the package system in very rare cases just fails to install them. I came across that only once where the upgrade process just ‘forgot’ to install the linux-image-extras package which contains most of the drivers leaving me with no network and slow frambuffer video after reboot.
The log would actually contain an error regarding missing headers but only in the case of using the .run installer (not advised). So your issue was just really bad luck, trying to catch those rare cases is questionable.

Hi,

I understand.

I found why the “linux-headers-generic” and “linux-headers-4.13.0-37-generic” were removed, it was because an application (“multisystem”, maybe ?) asked my sudo password to install “virtualbox-5.2:i386” :

$ zgrep -B5 "^Remove:.*linux-headers-[^:]*:amd64" /var/log/apt/history.log.1.gz | egrep "^$|Start-Date|Commandline|Remove|linux-headers-[^:]*:amd64"

Start-Date: 2018-03-15  10:55:40
Commandline: apt-get --quiet install -y --force-yes virtualbox-5.2:i386
Remove: linux-headers-generic:amd64 (4.13.0.37.40), notification-daemon:amd64 (3.20.0-1), linux-headers-4.13.0-37-generic:amd64 (4.13.0-37.42), grub-efi-amd64:amd64 (2.02~beta3-4ubuntu7.2), grub-efi-amd64-signed:amd64 (1.85.2+2.02~beta3-4ubuntu7.2)

But, each time (I did this twice or thrice) I remove all “cuda” and “nvidia” packages and reinstall the “nvidia-390 package”, it does NOT install “linux-headers-generic” nor “linux-headers-$(uname -r)” packages.

You said that the “the dependency to the headers is there”, but in fact the “nvidia-390” package does NOT depend on “linux-headers”, it depends on “dkms”.

But then “dkms” does NOT depend on “linux-headers-generic”, it actually only RECOMMENDS the “linux-headers-generic” :

$ dpkg -s nvidia-390 | grep dkms
Depends: x11-common (>= 1:7.0.0), make, sed (>> 3.0), dkms, linux-libc-dev, libc6-dev, patch, acpid, lib32gcc1, libc6-i386, passwd, adduser, xserver-xorg-legacy, libc6 (>= 2.2.5), libgl1, libwayland-client0 (>= 1.3.92), libwayland-server0 (>= 1.2.0), libx11-6, libxext6, xorg-video-abi-11 | xorg-video-abi-12 | xorg-video-abi-13 | xorg-video-abi-14 | xorg-video-abi-15 | xorg-video-abi-18 | xorg-video-abi-19 | xorg-video-abi-20 | xorg-video-abi-23, xserver-xorg-core
$ dpkg -s dkms | grep linux-headers
Recommends: fakeroot, sudo, linux-headers-686-pae | linux-headers-amd64 | linux-headers-generic | linux-headers, lsb-release

This problems did not occur because of NVIDIA but because of Debian SID “dkms” (https://packages.debian.org/sid/dkms) missing dependency (ies).

Do you think, it could be possible to add a “linux-headers-generic” dependency to your “nvidia-xyz” packages ?