Release upgrade to lunar lobster linux-headers-6.2.0-20 post-installation error

Bug #2017267 reported by C John Klehm
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ended with a dialog box:

Could not install 'linux-headers-6.2.0-20-generic'

The upgrade will continue but the 'linux-headers-6.2.0-20-generic' package may not be in a working state. Please consider submitting a bug report about it.

installed linux-headers-6.2.0-20-generic package post-installation script subprocess returned error exit status 1

ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: ubuntu-release-upgrader-core 1:23.04.6
ProcVersionSignature: Ubuntu 5.19.0-40.41-generic 5.19.17
Uname: Linux 5.19.0-40-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.26.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
CrashDB: ubuntu
CrashReports:
 600:0:125:674842:2023-04-21 08:04:24.525593724 -0500:2023-04-21 08:04:24.613596272 -0500:/var/crash/linux-headers-6.2.0-20-generic.0.crash
 644:0:125:1078246:2023-04-21 08:04:24.461591872 -0500:2023-04-21 08:04:24.869603682 -0500:/var/crash/nvidia-dkms-520.0.crash
CurrentDesktop: ubuntu:GNOME
Date: Fri Apr 21 08:09:44 2023
InstallationDate: Installed on 2021-01-04 (836 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Release amd64 (20201022)
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/usr/bin/zsh
 TERM=xterm-kitty
 XDG_RUNTIME_DIR=<set>
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: ubuntu-release-upgrader
Symptom: release-upgrade
UpgradeStatus: Upgraded to lunar on 2023-04-21 (0 days ago)
VarLogDistupgradeTermlog:

modified.conffile..etc.apport.report-ignore.README.denylist: [deleted]

Revision history for this message
C John Klehm (jklehm) wrote :
Revision history for this message
Nick Rosbrook (enr0n) wrote :

This is the relevant error from the apt term log:

Setting up linux-headers-6.2.0-20-generic (6.2.0-20.20) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.2.0-20-generic
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
applying patch disable_fstack-clash-protection_fcf-protection.patch...patching file Kbuild
Hunk #1 succeeded at 118 (offset 47 lines).

Building module:
Cleaning build area...
unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'make' -j16 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=6.2.0-20-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/6.2.0-20-generic/build LD=/usr/bin/ld.bfd modules..........(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64)
Consult /var/lib/dkms/nvidia/520.61.05/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
   ...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
dpkg: error processing package linux-headers-6.2.0-20-generic (--configure):
 installed linux-headers-6.2.0-20-generic package post-installation script subprocess returned error exit status 1

affects: ubuntu-release-upgrader (Ubuntu) → linux (Ubuntu)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
C John Klehm (jklehm) wrote :

I was able to work around this by doing 2 things:
* uninstalling the displaylink video driver
* installing nvidia-drivers-530

Revision history for this message
Dave (filosofic) wrote :

Same issue here though I don't have any displaylink drivers installed. Seemed that my upgrade install was interrupted perhaps and no amount of installing a new kernel either by download and with dpkg -i or using Ubuntu's mainline yield any success. 6.2 Kernel still shows up when I reboot and is the default, but that reboot always ends in a kernel panic and needs to be manually rebooted and then I have to choose 5.19 Kernel.

Revision history for this message
Ben (7-ben-a) wrote :

Same problem with Ubuntu when doing suggested upgrade from 22.10 to 23.04. I am running it in Virtualbox 7.0.6 r155176 on a Windows 10 host. I am unable to remove the broken kernel now (getting same error message).

Revision history for this message
Michael Bleau (michael-bleau) wrote :
Download full text (3.5 KiB)

Same for me with upgrade from 22.10 to 23.04.

Here is relevant output:
Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.2.0-20-generic -C /lib/modules/6.2.0-20-generic/build M=/var/lib/dkms/system76_acpi/1.0.2~1659568831~22.04~a88dcce~dev/build...(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/system76-acpi-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64)
Consult /var/lib/dkms/system76_acpi/1.0.2~1659568831~22.04~a88dcce~dev/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
...fail!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.2.0-20-generic (--configure):
installed linux-image-6.2.0-20-generic package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-headers-6.2.0-20-generic
linux-headers-generic
linux-generic
linux-image-6.2.0-20-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Here is a dump of: /var/lib/dkms/system76_acpi/1.0.2~1659568831~22.04~a88dcce~dev/build/make.log:
DKMS make.log for system76_acpi-1.0.2~1659568831~22.04~a88dcce~dev for kernel 6.2.0-20-generic (x86_64)
Wed 26 Apr 2023 07:41:57 AM EDT
make: Entering directory '/usr/src/linux-headers-6.2.0-20-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-17ubuntu1) 12.2.0
You are using: gcc-12 (Ubuntu 12.2.0-17ubuntu1) 12.2.0
CC [M] /var/lib/dkms/system76_acpi/1.0.2~1659568831~22.04~a88dcce~dev/build/system76_acpi.o
/var/lib/dkms/system76_acpi/1.0.2~1659568831~22.04~a88dcce~dev/build/system76_acpi.c:283:24: error: initialization of ‘int (*)(struct power_supply *, struct acpi_battery_hook *)’ from incompatible pointer type ‘int (*)(struct power_supply *)’ [-Werror=incompatible-pointer-types]
283 | .add_battery = system76_battery_add,
| ^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/system76_acpi/1.0.2~1659568831~22.04~a88dcce~dev/build/system76_acpi.c:283:24: note: (near initialization for ‘system76_battery_hook.add_battery’)
/var/lib/dkms/system76_acpi/1.0.2~1659568831~22.04~a88dcce~dev/build/system76_acpi.c:284:27: error: initialization of ‘int (*)(struct power_supply *, struct acpi_battery_hook *)’ from incompatible pointer type ‘int (*)(struct power_supply *)’ [-Werror=incompatible-pointer-types]
284 | .remove_battery = system76_battery_remove,
| ^~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/system76_acpi/1.0.2~1659568831~22.04~a88dcce~dev/build/system76_acpi.c:284:27: note: (near initialization for ‘system76_battery_hook.remove_battery’)
/var/lib/dkms/system76_acpi/1.0.2~1659568831~22.04~a88dcce~dev/build/system76_acpi.c:792:27: error: initialization of ‘void (*)(struct acpi_device *)’ from incompatible pointer type ‘int (*)(struct acpi_device *)’ [-Werror=incompatible-pointer-types]
792 | .remove = system76_remove,
| ^~~~~~~~~~~~~~~
/var/lib/dkms/system76_acpi/1.0.2~1659568831~22.04~a88dcce~dev/build/system76...

Read more...

Revision history for this message
Dave (filosofic) wrote :

Was able to purge the non-working 6.2 kernels with --
sudo dpkg --purge
and then list the 6.2 kernels listed
after finding all the 6.2 linux kernels with
sudo dpkg -l | grep "Linux kernel"

Have not yet tried installing anything beyond 5.19 yet.

Revision history for this message
Ben (7-ben-a) wrote (last edit ):

Short: I think downloading the new headers worked for me: https://packages.ubuntu.com/lunar/kernel/

Long: Before installing the new headers I tried to remove the new headers to run on the old kernel. Running on the old kernel is possible by just picking it from GRUB, so this was probably unnecessary in the first place anyway. When doing it I ran into the problem of beeing unable to create metapackages (which I removed to beeing able to remove the new kernel headers). I was unable to install metapackages with the old version (for kinetic).

So, I decided to go back to the newest setup and downloaded and installed the new headers (again). When I finally had all dependencies in my list the install went through without a problem.

So, I suspect this is just a problem of compiling the new kernel, right? (EDIT: Or maybe I removed some package that triggered this error. E.g. I removed pfring-dkm and libc6-dev, not sure if it was related.)

Revision history for this message
Juerg Haefliger (juergh) wrote :

You seem to have DKMS modules/packages installed that are not compatible with the 6.2 kernel. Remove them all, retry the upgrade and then install compatible DKMS packages from the Lunar archive. We don't support DKMS packages that are side-loaded. There are also potential issues with old left-over Ubuntu DKMS packages due to LP: #2018226. I'm closing this bug since it's not a kernel issue. It's unfortunate that a DKMS build failure results in what looks like a kernel problem.

Changed in linux (Ubuntu):
status: Confirmed → Invalid
Juerg Haefliger (juergh)
tags: added: lunar-upgrade-dkms-failure
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.