The fix: Add a DKMS POST_BUILD hook (dkms-post-build.sh) that runs objtool --hacks=jump_label on nvidia.ko and nvidia-modeset.ko after the DKMS build completes. This converts static_branch JMP instructions to NOPs, which the kernel expects since commit fdfd42892f31 (merged in 6.0) removed the runtime jump_label_apply_nops() safety net.
Without this, suspend triggers 'jump_label: Fatal kernel bug, unexpected op' in nvkms_kthread_q_callback and other functions that inline try_to_freeze() -> static_branch_unlikely(&freezer_active), resulting in a kernel BUG at arch/x86/kernel/jump_label.c:73. The full objtool pass is disabled by thunk-Kbuild.patch because NVIDIA's pre-compiled blobs lack -mfunction-return=thunk-extern. The POST_BUILD hook runs only the jump_label hack, avoiding the validation errors while producing correctly-built modules. Affects all kernels >= 6.0 on x86_64 with CONFIG_HAVE_JUMP_LABEL_HACK=y. References: NVIDIA/open-gpu-kernel-modules#1095 LP: #2143635 This can likely also be backported to 590. ** Patch added: "nvidia-graphics-drivers-595_595.58.03-0ubuntu3.debdiff" https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-590/+bug/2143635/+attachment/5958670/+files/nvidia-graphics-drivers-595_595.58.03-0ubuntu3.debdiff -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2143635 Title: Kernel panic (unexpected op) before suspend To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-590/+bug/2143635/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
