Skip to content

COSMIC + NVIDIA open modules: kernel BUG on suspend (nvkms_kthread_q_callback) #4017

Description

@santiagoarce-rgb

Hardware: Lenovo IdeaPad Gaming 3 15ARH05 (Ryzen 7 4800H + AMD Vega 6 + NVIDIA GTX 1650)
OS: Pop!_OS 24.04 LTS with COSMIC (alpha)
Kernel: 7.0.11-76070011-generic (also tested with 6.18.7)
NVIDIA driver: nvidia-driver-595 (open kernel modules, version 595.71.05)

Main issue:
When the lid is closed, the system fails to suspend properly. The screen freezes showing the last kernel messages, the fans keep spinning, and the laptop never reaches S3 (deep) sleep. Opening the lid does not recover the graphical session; only a TTY (Ctrl+Alt+F2) remains accessible.

Confirmed root cause:
At the moment suspend is entered (PM: suspend entry (deep)), the nvidia_modeset kernel module (part of the NVIDIA open kernel modules) triggers a kernel BUG due to an unexpected instruction in a jump label:

text
jump_label: Fatal kernel bug, unexpected op at nvkms_kthread_q_callback+0x8e/0x1c0 [nvidia_modeset]
kernel BUG at arch/x86/kernel/jump_label.c:73!
This completely halts the kernel, leaving the machine in a frozen state (no real suspend). The bug is reproducible on every suspend attempt (lid close or systemctl suspend).

Additional details:

The problem occurs only when the NVIDIA open kernel modules (nvidia, nvidia_modeset, nvidia_drm, nvidia_uvm) are loaded.

With NVIDIA modules loaded, suspend always fails, regardless of systemd-logind configuration, COSMIC inhibitors, or custom workaround services.

A workaround to unload the modules before suspend and reload them after resume using systemd services was attempted but failed because nvidia_drm is in use by the COSMIC/Wayland compositor and cannot be removed.

Suspend works perfectly when the NVIDIA modules are not loaded at boot (e.g., using modprobe.blacklist=nvidia,nvidia_modeset,nvidia_drm,nvidia_uvm in the kernel command line). In that case, the integrated AMD GPU handles the desktop without issues and suspend/resume works correctly.

User impact:
The laptop is unusable with the lid closed unless it is fully powered off. For normal portable use, NVIDIA modules must be prevented from loading, sacrificing the discrete GPU on the desktop (it can be loaded manually on demand, but then suspend breaks again).

Conclusion:
This is a bug in the NVIDIA open kernel modules (version 595.71.05) when interacting with Pop!_OS kernels and the COSMIC compositor. It is not a user misconfiguration, but a kernel/driver-level failure that requires a driver update or a patch from System76 and/or NVIDIA.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions