nvidia-340 kernel module failed to build (ERROR: Kernel configuration is invalid)

Bug #1938978 reported by Christopher Deverill
406
This bug affects 84 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-340 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

ProblemType: Package
DKMSBuildLog:
 DKMS make.log for nvidia-340-340.108 for kernel 5.11.0-25-generic (x86_64)
 to. 05. aug. 06:23:28 +0200 2021
 NVIDIA: calling KBUILD...
 make[1]: Entering directory '/usr/src/linux-headers-5.11.0-25-generic'
 test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
 \
 echo >&2; \
 echo >&2 " ERROR: Kernel configuration is invalid."; \
 echo >&2 " include/generated/autoconf.h or include/config/auto.conf are
 missing.";\
 echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it
."; \
 echo >&2 ; \
 /bin/false)
 make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia-340/340.108/build \
 single-build= \
 need-builtin=1 need-modorder=1
   cc -Wp,-MMD,/var/lib/dkms/nvidia-340/340.108/build/.nv.o.d -nostdinc -isyste
m /usr/lib/gcc/x86_64-linux-gnu/9/include -I./arch/x86/include -I./arch/x86/inc
lude/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/gener
ated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/k...etc

/var/crash$ lsb_release -rd
Description: Ubuntu 20.04.2 LTS
Release: 20.04

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: nvidia-340 340.108-0ubuntu5.20.04.2
ProcVersionSignature: Ubuntu 5.8.0-63.71~20.04.1-generic 5.8.18
Uname: Linux 5.8.0-63-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.20.11-0ubuntu27.18
Architecture: amd64
CasperMD5CheckResult: skip
DKMSKernelVersion: 5.11.0-25-generic
Date: Thu Aug 5 06:24:36 2021
InstallationDate: Installed on 2021-05-01 (95 days ago)
InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
PackageVersion: 340.108-0ubuntu5.20.04.2
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.6
SourcePackage: nvidia-graphics-drivers-340
Title: nvidia-340 340.108-0ubuntu5.20.04.2: nvidia-340 kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Christopher Deverill (chdev) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: New → Confirmed
Revision history for this message
ln-komandur (ln-komandur) wrote (last edit ):

Getting the exact same error on Lubuntu 20.04.2 after update to kernel 5.11.0-25-generic (x86_64)

Boot is stuck at "Finished update UTMP about system runlevel changes". No login screen and no GUI.

After doing Ctl+Alt+F1 , logging in as a sudo capable user and starting LxQt with 'startx', the GUI appears and works. But the fonts are huge and windows are extremely zoomed in.

Tried to reinstall NVIDIA drivers with

$ sudo apt-get remove --purge nvidia-*
$ sudo ubuntu-drivers autoinstall

and that is when the error trace quoted by Christopher Deverill appeared

Verified the version of libc6 as there had been some problems in the past when it had bumped up to 2.31-0ubuntu9.3 when installing some other packages. But it was only 2.31-0ubuntu9.2 which has never had any issues with NVIDIA 340.108 on this system

$ dpkg-query --list | grep libc6
ii libc6:amd64 2.31-0ubuntu9.2 amd64 GNU C Library: Shared libraries
ii libc6-dev:amd64 2.31-0ubuntu9.2 amd64 GNU C Library: Development Libraries and Header Files
ii libc6-i386 2.31-0ubuntu9.2 amd64 GNU C Library: 32-bit shared libraries for AMD64

There are absolutely no issues when booting into kernel 5.8.0-63-generic

Grub has always had kernel parameters to avoid NVRM Warnings in dmesg
GRUB_CMDLINE_LINUX="video=vesa:off vga=normal"

NVIDIA flash has already been turned off with
$ sudo nvidia-xconfig --no-logo

Revision history for this message
chrigu (ch-ba) wrote :

@apw I have seen you could help with Bug #1910709 (Similar Bug). Can you help with this one?

Revision history for this message
marcw (marcw) wrote :

I am one of those affected by this bug. I tried the 340 driver made by this PPA as a workaround and it works great and resolves my issue:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1916640

Revision history for this message
Sumit Bhattacharyya (kara-ben-nemsi) wrote :

I'm also affected by this bug. I've activated grub and still boot with the 5.8.0 kernel - this works without problems. On the other hand, I'm not performing any updates now. I had the same problem when the 20.04.1 version was created - the bug was fixed shortly after. This time it seems to take significantly longer even though the reason is probably the same. I hope for an official bug fix, otherwise I will try out Butterfly's solution: https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy
But this recurring situation is not really satisfying!

description: updated
Revision history for this message
Sumit Bhattacharyya (kara-ben-nemsi) wrote :

I was fed up with the fact that this bug was not taken care of. Therefore I've installed Butterfly's solution as I've written in my earlier comment. This fix works without any problem.
As far as I've seen, he also provides a driver supporting kernels up to 5.14.
For all folks affected by this bug, please take a look on https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy and follow the instructions (I installed both packages).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.