Tested DKMS from proposed Testbed preparation:
1) Install Lunar 2) Install a good and a bad DKMS (one that builds correctly and one that doesn't): 2.1) Install evdi-dkms (good DKMS) 2.2) Install rtl8821ce-dkms 5.5.2.1-0ubuntu10 from Jammy (bad DKMS) 3) Verify DKMS build status: $ dkms status evdi/1.12.0+dfsg, 6.2.0-27-generic, x86_64: installed rtl8821ce/5.5.2.1: added During the above, the build of rtl8821ce failed. Verify current brokenness: 1) Unbuild evdi dkms: $ sudo dkms unbuild evdi/1.12.0+dfsg --all $ dmks status evdi/1.12.0+dfsg: added rtl8821ce/5.5.2.1: added 2) Reinstall the kernel headers, this triggers a build of all DKMS modules. One of the modules fails to build and the kernel header installation fails as a result of that. $ sudo apt install --reinstall linux-headers-6.2.0-27-generic ... Setting up linux-headers-6.2.0-27-generic (6.2.0-27.28) ... /etc/kernel/header_postinst.d/dkms: * dkms: running auto installation service for kernel 6.2.0-27-generic ... Error! Bad return status for module build on kernel: 6.2.0-27-generic (x86_64) Consult /var/lib/dkms/rtl8821ce/5.5.2.1/build/make.log for more information. ... Errors were encountered while processing: linux-headers-6.2.0-27-generic rtl8821ce-dkms needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) OK, confirmed that header installation with a broken DKMS is place fails. Clean up the testbed and install dkms from proposed: 1) Remove rtl8821ce-dkms 2) Reinstall kernel headers 3) Install dkms 3.0.10-7ubuntu2.1 from proposed 4) Reinstall rtl8821ce-dkms 5.5.2.1-0ubuntu10 from Jammy. Build still fails. 5) Unbuild evdi dkms: $ sudo dkms unbuild evdi/1.12.0+dfsg --all $ dmks status evdi/1.12.0+dfsg: added rtl8821ce/5.5.2.1: added Verify correct behavior of dkms from proposed: 1) Reinstall kernel headers (mimick do-release-upgrade): $ RELEASE_UPGRADE_IN_PROGRESS=1 apt install --reinstall linux-headers-6.2.0-27-generic ... etting up linux-headers-6.2.0-27-generic (6.2.0-27.28) ... /etc/kernel/header_postinst.d/dkms: * dkms: running auto installation service for kernel 6.2.0-27-generic ... Error! Bad return status for module build on kernel: 6.2.0-27-generic (x86_64) Consult /var/lib/dkms/rtl8821ce/5.5.2.1/build/make.log for more information. dkms autoinstall on 6.2.0-27-generic/x86_64 succeeded for evdi dkms autoinstall on 6.2.0-27-generic/x86_64 failed for rtl8821ce(10) Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. * dkms: ignore autoinstall errors for dkms modules * dkms: autoinstall for kernel 6.2.0-27-generic ...done. ... $ echo $? 0 See above output. Build of rtl8821ce/5.5.2.1 failed but error is ignored and kernel headers are installed successfully. ** Tags removed: verification-needed-lunar ** Tags added: verification-done-lunar -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to dkms in Ubuntu. https://bugs.launchpad.net/bugs/2028366 Title: Kernel header installation fails for incompatible DKMS modules Status in dkms package in Ubuntu: Fix Released Status in dkms source package in Jammy: Confirmed Status in dkms source package in Lunar: Fix Committed Status in dkms source package in Mantic: Fix Released Bug description: [ Impact ] If a new kernel is installed, all installed DKMS modules are built for that new kernel. There might be incompatible modules that won't compile for the new kernel which results in a kernel header package installation failure. That's bad and not really correct, the incompatible DKMS module is the problem and not the new kernel. In this case, DKMS module build failures should be ignored so that the kernel installation completes. This is especially acute during release-upgrades, as dkms modules are upgraded out of order, and major kernel version are upgraded out of order. Majority of the time there is a new dkms available, which should attempt build & load. However, many modules are often remain broken, no longer needed, or need user to fetch updated versions themselves. [ Test Plan ] * Install jammy * Add module that support v5.15 kernel, but fails to compile with any newer kernels (one can find examples of such dkms modules in the archive, or out of the archive) * Perform release upgrade with patched dkms pre-installed * Release upgrade should succeed, despite unable to compile all dkms modules [ Where problems could occur ] * This is an improvement to the current situation of aborting release upgrade half way through. It doesn't quite resolve the UX to notify the user which dkms modules did not manage to compile, or to ask user to uninstall or to update them. Further UX / hooks might be needed in the release upgrade to complete the story of asking the user what they want to do with regressed dkms modules. [ Other Info ] * See lots and lots of upgrade bugs, failing on dkms module installation To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dkms/+bug/2028366/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp