nvidia-open-dkms 575.57.08 compilation fails on 6.15.1-x64v3-xanmod1-1-edge-x64v3 kernel (objtool/RETHUNK)

Description: After a system update and reboot to kernel 6.15.1-x64v3-xanmod1-1-edge-x64v3, the NVIDIA display driver was not functioning correctly, being locked to 1024x768 resolution. nvidia-smi indicated it was not connecting to the driver.

Attempting to reinstall the nvidia-open-dkms package (version 575.57.08) resulted in a compilation failure during the DKMS build process.

Error Message: Error! Bad return status for module build on kernel: 6.15.1-x64v3-xanmod1-1-edge-x64v3 (x86_64) Consult /var/lib/dkms/nvidia/575.57.08/build/make.log for more information. ==> WARNING: `dkms install --no-depmod nvidia/575.57.08 -k 6.15.1-x64v3-xanmod1-1-edge-x64v3' exited 10

Relevant Excerpts from /var/lib/dkms/nvidia/575.57.08/build/make.log: The make.log consistently shows errors related to objtool and MITIGATION_RETHUNK: nvidia.o: error: objtool: <function_name>+<offset>: 'naked' return found in MITIGATION_RETHUNK build

Steps to Reproduce:

  1. Update system to Xanmod kernel 6.15.1-x64v3-xanmod1-1-edge-x64v3.
  2. Attempt to install or reinstall nvidia-open-dkms (version 575.57.08).

Expected Behavior: The nvidia-open-dkms driver should compile and install successfully on the Xanmod kernel, allowing the NVIDIA GPU to function at the correct resolution.

System Information:

  • Kernel: 6.15.1-x64v3-xanmod1-1-edge-x64v3
  • NVIDIA Driver Package: nvidia-open-dkms
  • NVIDIA Driver Version: 575.57.08
  • Distribution: Arch Linux
  • GPU Model: Nvidia RTX 3060

make.txt

Edited by Fluffy Flower