MLNX OFED installation failure for ubuntu-22.04 with kernel 5.15.0.25-generic

On Ubuntu 22.04.4 LTS (the default kernel 6.5.0-44-generic). I want to install MLNX_OFED_LINUX-5.8-5.1.1.2-ubuntu22.04-x86_64.tgz, from manual, the supported kernel is 5.15.0-25-generic, so I downgrade the kernel to this version and can boot normally. While I run sudo ./mlnxofedinstall, it returns following error,
mlnx-ofed-kernel-dkms.debinstall.log (285.1 KB)
make.log (156.9 KB)

Installing mlnx-ofed-kernel-dkms-5.8…

Running /usr/bin/dpkg -i --force-confnew --force-confmiss ‘/home/naihong/MLNX_OFED_SRC-5.8-5.1.1.2/DEBS/ubuntu22.04/x86_64/mlnx-ofed-kernel-dkms_5.8-OFED.5.8.5.1.1.1_all.deb’

Failed to install mlnx-ofed-kernel-dkms DEB

To my surprise, in the log file, it show

Building initial module for 6.5.0-44-generic

ERROR (dkms apport): unable to determine source package for mlnx-ofed-kernel-dkms

Error! Bad return status for module build on kernel: 6.5.0-44-generic (x86_64)

Although 6.5.0-44-generic still exists in disk, “uname -r” shows current kernel is “5.15.0-25-generic”, why the installation tried to build initial module for 6.5.0-44-generic?

Hi Norman,

Thank you for posting your query on NVIDIA Community.

Please ensure kernel 6.5 is completely removed from the system to avoid any corrupted/cached entry behavior. Ensure the kernel is correctly reflected part of “cat /proc/cmdline”

Unfortunately, troubleshooting cannot be performed over community and a valid support entitlement will be needed to submit a support ticket.

If there an active entitlement/support contract in place, please do not hesitate to open a support ticket by emailing enterprisesupport@nvidia.com

For contracts, please reach out to Networking-Contracts@nvidia.com

Thanks,
Namrata.