5

After install ubuntu 20.10 the nvidia drive was throwing errors on each usages / update I am always receiving the following error

Error! Bad return status for module build on kernel: 5.8.0-55-generic (x86_64) Consult /var/lib/dkms/nvidia/460.80/build/make.log for more information.

and in the make.log

ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it.

I tried to locate autoconf.h files but could not find it

this error happens almost on every update also when I tried to

sudo apt-get install linux-headers-$(uname -r) or any install of new nvidia drivers or the dpkg packages

I waited patiently to upgrade to 21.04 - but I was not able to upgrade from the same reason

I run sudo apt upgrade received the followin error

Errors were encountered while processing: postfix nvidia-dkms-460 evdi-dkms nvidia-driver-460 nvidia-driver-455

I tried to install it from the software updates I received enter image description here

I tried several solutions https://forums.developer.nvidia.com/t/nvidia-dkms-460-error/173424/25 https://www.reddit.com/r/pop_os/comments/n59ksz/dkms_errors_with_nvidiadkms460/ non worked

dkms status

evdi, 1.7.0: added
evdi, 1.9.1: added
evdi, 5.2.14, 5.3.0-53-generic, x86_64: installed
nvidia, 460.80: added

uname -r

5.11.0-18-generic

dpkg -l | grep nvidia

ii  libnvidia-cfg1-460:amd64                   460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-460                       460.80-0ubuntu0.21.04.2                                              all          Shared files used by the NVIDIA libraries
ic  libnvidia-compute-390:amd64                390.132-0ubuntu0.18.04.1                                             amd64        NVIDIA libcompute package
rc  libnvidia-compute-390:i386                 390.132-0ubuntu0.18.04.1                                             i386         NVIDIA libcompute package
ic  libnvidia-compute-450:amd64                450.80.02-0ubuntu1                                                   amd64        NVIDIA libcompute package
ii  libnvidia-compute-460:amd64                460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA libcompute package
ii  libnvidia-compute-460:i386                 460.80-0ubuntu0.21.04.2                                              i386         NVIDIA libcompute package
rc  libnvidia-compute-460-server:amd64         460.73.01-0ubuntu1                                                   amd64        NVIDIA libcompute package
rc  libnvidia-compute-465:amd64                465.27-0ubuntu0.21.04.2                                              amd64        NVIDIA libcompute package
ii  libnvidia-decode-460:amd64                 460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-460:i386                  460.80-0ubuntu0.21.04.2                                              i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-460:amd64                 460.80-0ubuntu0.21.04.2                                              amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-460:i386                  460.80-0ubuntu0.21.04.2                                              i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-460:amd64                  460.80-0ubuntu0.21.04.2                                              amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-460:amd64                   460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-460:i386                    460.80-0ubuntu0.21.04.2                                              i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-460:amd64                     460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-460:i386                      460.80-0ubuntu0.21.04.2                                              i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-460:amd64                   460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ifr1-460:i386                    460.80-0ubuntu0.21.04.2                                              i386         NVIDIA OpenGL-based Inband Frame Readback runtime library
ic  linux-modules-nvidia-455-5.8.0-29-generic  5.8.0-29.31                                                          amd64        Linux kernel nvidia modules for version 5.8.0-29
ic  linux-modules-nvidia-455-5.8.0-31-generic  5.8.0-31.33                                                          amd64        Linux kernel nvidia modules for version 5.8.0-31
ic  linux-modules-nvidia-460-5.8.0-36-generic  5.8.0-36.40                                                          amd64        Linux kernel nvidia modules for version 5.8.0-36
ic  linux-modules-nvidia-460-5.8.0-40-generic  5.8.0-40.45                                                          amd64        Linux kernel nvidia modules for version 5.8.0-40
ic  linux-modules-nvidia-460-5.8.0-41-generic  5.8.0-41.46                                                          amd64        Linux kernel nvidia modules for version 5.8.0-41
ic  linux-modules-nvidia-460-5.8.0-44-generic  5.8.0-44.50                                                          amd64        Linux kernel nvidia modules for version 5.8.0-44
ic  nvidia-compute-utils-450                   450.80.02-0ubuntu1                                                   amd64        NVIDIA compute utilities
ii  nvidia-compute-utils-460                   460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA compute utilities
rc  nvidia-compute-utils-460-server            460.73.01-0ubuntu1                                                   amd64        NVIDIA compute utilities
rc  nvidia-compute-utils-465                   465.27-0ubuntu0.21.04.2                                              amd64        NVIDIA compute utilities
ic  nvidia-dkms-450                            450.80.02-0ubuntu1                                                   amd64        NVIDIA DKMS package
ic  nvidia-dkms-455                            455.38-0ubuntu0.20.10.1                                              amd64        NVIDIA DKMS package
iF  nvidia-dkms-460                            460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA DKMS package
rc  nvidia-dkms-460-server                     460.73.01-0ubuntu1                                                   amd64        NVIDIA DKMS package
rc  nvidia-dkms-465                            465.27-0ubuntu0.21.04.2                                              amd64        NVIDIA DKMS package
iU  nvidia-driver-460                          460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA driver metapackage
ic  nvidia-kernel-common-450                   450.80.02-0ubuntu1                                                   amd64        Shared files used with the kernel module
ii  nvidia-kernel-common-460                   460.80-0ubuntu0.21.04.2                                              amd64        Shared files used with the kernel module
rc  nvidia-kernel-common-460-server            460.73.01-0ubuntu1                                                   amd64        Shared files used with the kernel module
rc  nvidia-kernel-common-465                   465.27-0ubuntu0.21.04.2                                              amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-460                   460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA kernel source package
ii  nvidia-prime                               0.8.16.1                                                             all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                            460.73.01-0ubuntu0.21.04.1                                           amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-460                           460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                    0.18build2                                                           all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-460              460.80-0ubuntu0.21.04.2                                              amd64        NVIDIA binary Xorg driver

and when I am trying to upgrade I am receiving the following error enter image description here

2
  • 2
    Comments are intended to help you improve your Question until it is answerable. Do not comment on your own Question -- edit your Question instead..
    – user535733
    Jun 16, 2021 at 17:44
  • I'm getting this on 340.108 for 5.11. Not happy at all. Primary error is missing <asm/kmap_types.h> at line 13 of nv-frontend.c but if the source is massaged it may not be needed. Should be automated. I've fallen back to integrated graphics because I can. oldconfig, prepare are psuedotargets in the makefile, (named MAKE), so we need to go looking for the file MAKE containing these strings.... I don't have an answer yet. sorry.
    – mckenzm
    Aug 4, 2021 at 18:13

2 Answers 2

5

A pretty similar, if not the exact same issue, got fixed for me when i upgraded the gcc package. That's the compiler that is actually make-ing and configure-ing and etc. It would also break at the post-install script for nvidia-dkms and wouldn't continue to installing the actual nvidia-driver that i needed.

The fix was running sudo apt install gcc.

That updated the gcc version that was used to run the installation packages, thus no more compilation errors.

The nvidia post where i found this: https://forums.developer.nvidia.com/t/nvidia-dkms-460-error/173424/4

Cheers

2
  • tnx - practically saved my life
    – Ohad Sadan
    Oct 17, 2021 at 10:25
  • Hehe, i thought you'd already have reinstalled a fresh copy to get over the problem. I was hoping to at least help some of the people getting the error in the future, since it was pretty hard to track down the real reason for these errors. I'm really glad it helped you too. Must've been some fun months without the nvidia driver. Cheers! Oct 18, 2021 at 11:42
0

I had exactly the same problem at ubuntu 22.04 and the following configuration:

vendor   : NVIDIA Corporation
model    : GK106GLM [Quadro K2100M]
driver   : nvidia-driver-390 - distro non-free recommended
driver   : nvidia-driver-418-server - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

Background:

Until kernel 5.19.0-50 I have been using driver 390 and all was pretty fine. After updating the system with kernel 6.2.0-39 system refused to enter GUI mode. In order to work I needed to boot with old kernel. After another update bringing kernel 6.5.0-17 GUI still started with the old kernel, but stopped detecting external monitor.

I have tried to test subsequent drivers to check if other also are having issues. When switched from 390 to 418 using Additional Drivers app I got exactly the same error as at the screenshot in the question. Even worse - GUI stopped working with any kernel.

I still could work in text mode, so I have tried to try the subsequent drivers as described here - and got compilation error for both the nvidia drivers.

Solution:

That is how I went to the final solution letting me work normally with my machine - I have purged all the packages related to nvidia what switched me to Nouveau driver. All works fine now. I have achieved that by sudo apt --purge remove '*nvidia*'.

NB:

Few years ago I have went for nvidia 390 driver because it was the only one which worked rather stable, especially when working with desktop extended to two monitors. Nouveau was totally out of the question. Now it seems to work perfectly fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .