WARNING:root:_pkg_get_support nvidia-driver-390 and WARNING:root:_pkg_get_support nvidia-driver-510

I know that a similar problem has already been discussed more than once, but none of the solutions helped me. I also encountered something interesting and not clear.

Goal: I had a nvidia-driver- 390 installed, I needed to update it to use newer versions of the program.
I followed the manuals, but in the end nothing worked and now nvidia-smi does not even work for me:

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

From the very beginning, with sudo ubuntu-drivers devices, I received

WARNING:root:_pkg_get_support nvidia-driver-390: package has invalid Support Legacyheader, cannot determine support level
== /sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001B06sv00001458sd0000374Cbc03sc00i00
vendor   : NVIDIA Corporation
model    : GP102 [GeForce GTX 1080 Ti]
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-470 - third-party non-free
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-510 - third-party non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Then I tried this:

# To install recommended 
sudo ubuntu-drivers autoinstall 
OR
# To install specific distro
sudo apt install nvidia-driver-[version number]

But after reboot nvidia-smi returned error
Then I followed instructions like this one and this one and uninstalled the old drivers, installed the new ones, but still got failures.

This is what I got after uninstalling the drivers:

dpkg -l | grep nvidia
ii  screen-resolution-extra                           0.18build1                                 all          Extension for the nvidia-settings control panel

But after trying to install drivers (470 or 510) nothing changed.
Actually now I get this message:

sudo ubuntu-drivers devices
WARNING:root:_pkg_get_support nvidia-driver-390: package has invalid Support Legacyheader, cannot determine support level
WARNING:root:_pkg_get_support nvidia-driver-510: package has invalid Support PBheader, cannot determine support level
== /sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001B06sv00001458sd0000374Cbc03sc00i00
vendor   : NVIDIA Corporation
model    : GP102 [GeForce GTX 1080 Ti]
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-470 - third-party non-free
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-510 - third-party non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

As you can see there is a new line WARNING:root:_pkg_get_support nvidia-driver-510: package has invalid Support PBheader, cannot determine support level
But it still doesn’t work.

My config:

cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
uname -a 
Linux boklagII-lx 5.13.0-30-generic #33~20.04.1-Ubuntu SMP Mon Feb 7 14:25:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Any help please, I’ve already lost a lot of time

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

here you are

Please post the output of
dpkg -l |grep nvidia

ii  libnvidia-cfg1-470:amd64                   470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-470                       470.103.01-0ubuntu0.20.04.1                all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-470:amd64                470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA libcompute package
ii  libnvidia-compute-470:i386                 470.103.01-0ubuntu0.20.04.1                i386         NVIDIA libcompute package
ii  libnvidia-decode-470:amd64                 470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-470:i386                  470.103.01-0ubuntu0.20.04.1                i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-470:amd64                 470.103.01-0ubuntu0.20.04.1                amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-470:i386                  470.103.01-0ubuntu0.20.04.1                i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-470:amd64                  470.103.01-0ubuntu0.20.04.1                amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-470:amd64                   470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-470:i386                    470.103.01-0ubuntu0.20.04.1                i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-470:amd64                     470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-470:i386                      470.103.01-0ubuntu0.20.04.1                i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-470:amd64                   470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ifr1-470:i386                    470.103.01-0ubuntu0.20.04.1                i386         NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  nvidia-compute-utils-470                   470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA compute utilities
ii  nvidia-dkms-470                            470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA DKMS package
ii  nvidia-driver-470                          470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-470                   470.103.01-0ubuntu0.20.04.1                amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-470                   470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA kernel source package
ii  nvidia-modprobe                            470.42.01-0ubuntu1                         amd64        Load the NVIDIA kernel driver and create device files
ii  nvidia-prime                               0.8.16~0.20.04.1                           all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                            470.57.01-0ubuntu0.20.04.3                 amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-470                           470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                    0.18build1                                 all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-470              470.103.01-0ubuntu0.20.04.1                amd64        NVIDIA binary Xorg driver

Ok, the 470 driver sems to be installed though some files seem to be missing. Please post the output of
dkms status

dkms status outputs nothing

(base) admin@I-lx:~$ dkms status
(base) admin@I-lx:~$ sudo dkms status
(base) admin@I-lx:~$

Please try adding it
sudo dkms add nvidia/470.103.01
and post any errors.


Creating symlink /var/lib/dkms/nvidia/470.103.01/source ->
                 /usr/src/nvidia-470.103.01

DKMS: add completed.

Ok, then try installing it:
sudo dkms install nvidia/470.103.01
post any output, then also
dkms status

sudo dkms install nvidia/470.103.01
Kernel preparation unnecessary for this kernel.  Skipping...
applying patch disable_fstack-clash-protection_fcf-protection.patch...patching file Kbuild
Hunk #1 succeeded at 82 (offset 11 lines).


Building module:
cleaning build area...
unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'make' -j12 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.13.0-30-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.13.0-30-generic/build LD=/usr/bin/ld.bfd modules..........
cleaning build area...

DKMS: build completed.

nvidia.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.13.0-30-generic/updates/dkms/

nvidia-modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.13.0-30-generic/updates/dkms/

nvidia-drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.13.0-30-generic/updates/dkms/

nvidia-uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.13.0-30-generic/updates/dkms/

nvidia-peermem.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.13.0-30-generic/updates/dkms/

depmod...

DKMS: install completed.
dkms status
nvidia, 470.103.01, 5.13.0-30-generic, x86_64: installed

Looks good.
Please create the file /etc/modprobe.d/blacklist-nouveau-nvidiafb.conf

blacklist nouveau
blacklist nvidiafb

and add the lines

nvidia
nvidia-modeset
nvidia-drm

to
/etc/initramfs-tools/modules
and run
sudo update-initramfs -u
then reboot.

ok, by the way, already now I tried nvidia-smi and got the result:

So it’s great
Do I still have to do this?

Yes, you should do that.

I did it. Many thanks. Now I can move on. Could you please tell me what was the problem?

For some reason the post-install tasks didn’t trigger so the modules weren’t added to dkms.

I have the same problem.

nvidia-smi
No devices were found
dpkg -l |grep nvidia
ii  libnvidia-cfg1-470:amd64                   470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-470                       470.103.01-0ubuntu0.20.04.1           all          Shared files used by the NVIDIA libraries
rc  libnvidia-compute-460:amd64                460.27.04-0ubuntu1                    amd64        NVIDIA libcompute package
ii  libnvidia-compute-470:amd64                470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA libcompute package
rc  libnvidia-compute-470-server:amd64         470.82.01-0ubuntu0.20.04.1            amd64        NVIDIA libcompute package
ii  libnvidia-decode-470:amd64                 470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-470:amd64                 470.103.01-0ubuntu0.20.04.1           amd64        NVENC Video Encoding runtime library
ii  libnvidia-extra-470:amd64                  470.103.01-0ubuntu0.20.04.1           amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-470:amd64                   470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-470:amd64                     470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-470:amd64                   470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  linux-objects-nvidia-470-5.4.0-100-generic 5.4.0-100.113                         amd64        Linux kernel nvidia modules for version 5.4.0-100 (objects)
ii  linux-signatures-nvidia-5.4.0-100-generic  5.4.0-100.113                         amd64        Linux kernel signatures for nvidia modules for version 5.4.0-100-generic
ii  nvidia-compute-utils-470                   470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA compute utilities
ii  nvidia-dkms-470                            470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA DKMS package
ii  nvidia-driver-470                          470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-470                   470.103.01-0ubuntu0.20.04.1           amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-470                   470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA kernel source package
ii  nvidia-prime                               0.8.16~0.20.04.1                      all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                            460.27.04-0ubuntu1                    amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-470                           470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                    0.18build1                            all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-470              470.103.01-0ubuntu0.20.04.1           amd64        NVIDIA binary Xorg driver
dkms status
nvidia, 470.103.01, 5.4.0-100-generic, x86_64: installed

This is the output. Maybe it can help.
Can you please help me? I will appreciate it.

sudo apt install nvidia-driver-470
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  nvidia-compute-utils-470 nvidia-dkms-470 nvidia-kernel-common-470 nvidia-kernel-source-470 nvidia-prime nvidia-settings nvidia-utils-470
Recommended packages:
  libnvidia-compute-470:i386 libnvidia-decode-470:i386 libnvidia-encode-470:i386 libnvidia-ifr1-470:i386 libnvidia-fbc1-470:i386 libnvidia-gl-470:i386
The following NEW packages will be installed:
  nvidia-compute-utils-470 nvidia-dkms-470 nvidia-driver-470 nvidia-kernel-common-470 nvidia-kernel-source-470 nvidia-prime nvidia-settings nvidia-utils-470
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/43.5 MB of archives.
After this operation, 92.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 file:/var/cuda-repo-ubuntu2004-11-2-local  nvidia-settings 460.27.04-0ubuntu1 [929 kB]
Selecting previously unselected package nvidia-compute-utils-470.
(Reading database ... 173287 files and directories currently installed.)
Preparing to unpack .../0-nvidia-compute-utils-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-compute-utils-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-kernel-source-470.
Preparing to unpack .../1-nvidia-kernel-source-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-kernel-source-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-kernel-common-470.
Preparing to unpack .../2-nvidia-kernel-common-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-kernel-common-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-dkms-470.
Preparing to unpack .../3-nvidia-dkms-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-dkms-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-utils-470.
Preparing to unpack .../4-nvidia-utils-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-utils-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-driver-470.
Preparing to unpack .../5-nvidia-driver-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-driver-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-prime.
Preparing to unpack .../6-nvidia-prime_0.8.16~0.20.04.1_all.deb ...
Unpacking nvidia-prime (0.8.16~0.20.04.1) ...
Selecting previously unselected package nvidia-settings.
Preparing to unpack .../7-nvidia-settings_460.27.04-0ubuntu1_amd64.deb ...
Unpacking nvidia-settings (460.27.04-0ubuntu1) ...
Setting up nvidia-kernel-source-470 (470.103.01-0ubuntu0.20.04.1) ...
Setting up nvidia-prime (0.8.16~0.20.04.1) ...
Setting up nvidia-utils-470 (470.103.01-0ubuntu0.20.04.1) ...
Setting up nvidia-compute-utils-470 (470.103.01-0ubuntu0.20.04.1) ...
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `nvidia-persistenced' (UID 114) ...
Adding new group `nvidia-persistenced' (GID 130) ...
Adding new user `nvidia-persistenced' (UID 114) with group `nvidia-persistenced' ...
Not creating home directory `/nonexistent'.
Setting up nvidia-kernel-common-470 (470.103.01-0ubuntu0.20.04.1) ...
update-initramfs: deferring update (trigger activated)
Created symlink /etc/systemd/system/systemd-hibernate.service.requires/nvidia-hibernate.service → /lib/systemd/system/nvidia-hibernate.service.
Created symlink /etc/systemd/system/systemd-suspend.service.requires/nvidia-resume.service → /lib/systemd/system/nvidia-resume.service.
Created symlink /etc/systemd/system/systemd-hibernate.service.requires/nvidia-resume.service → /lib/systemd/system/nvidia-resume.service.
Created symlink /etc/systemd/system/systemd-suspend.service.requires/nvidia-suspend.service → /lib/systemd/system/nvidia-suspend.service.
Setting up nvidia-settings (460.27.04-0ubuntu1) ...
Setting up nvidia-dkms-470 (470.103.01-0ubuntu0.20.04.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Loading new nvidia-470.103.01 DKMS files...
Building for 5.4.0-100-generic
Building for architecture x86_64
Building initial module for 5.4.0-100-generic
Done.

nvidia.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.4.0-100-generic/updates/dkms/

nvidia-modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.4.0-100-generic/updates/dkms/

nvidia-drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.4.0-100-generic/updates/dkms/

nvidia-uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.4.0-100-generic/updates/dkms/

nvidia-peermem.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.4.0-100-generic/updates/dkms/

depmod...

DKMS: install completed.
Setting up nvidia-driver-470 (470.103.01-0ubuntu0.20.04.1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-100-generic

Obviously, the driver is installed fine, it just doesn’t load. Please check secure boot status, otherwise run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

(post deleted by author)