GSP Xid 120 panic during s2idle suspend with NVreg_DynamicPowerManagement=0x02

Environment:

  • Driver: 595.71.05 (nvidia-open-lts, open kernel modules)

  • Kernel: 6.18.26-2-lts

  • Hardware: RTX 3080 Mobile (Optimus/hybrid), Ryzen 5900HX

  • Sleep state: s2idle (Modern Standby - S3 not available on this platform)

  • Display server: Xorg

Config (/etc/modprobe.d/nvidia-power.conf):

options nvidia NVreg_DynamicPowerManagement=0x02 NVreg_PreserveVideoMemoryAllocations=1

Also present (from /usr/lib/modprobe.d/nvidia-sleep.conf, set by the nvidia package):

options nvidia NVreg_UseKernelSuspendNotifiers=1

nvidia-suspend/hibernate/resume systemd services are disabled

What happens:

System enters s2idle sleep normally. On wake, one of two outcomes:

  • Session lost: display manager restarts, all open applications gone (GPU reset killed the compositor)

  • Black screen with kernel logs visible: GPU driver dead, kernel alive — recover via Ctrl+Alt+F2

Root cause from kernel logs:

On wake from s2idle, the GPU panics (Xid 120).

nvidia-bug-report.log.gz (270.0 KB)

The display compositor loses its GPU connection and crashes, causing the full session to be lost and the display manager to restart.

The crash is also triggered by an ACPI battery_notify event:

battery_notify+0xea/0x160
nv_pm_notifier+0x35/0xa0
notifier_call_chain
pm_suspend.cold

Key log lines

NVRM: Xid (PCI:0000:01:00): 120, GSP task panic: unknown error (0) @ pc:0x1a0c3fc, aux:0x0, partition:2#0, task:3
NVRM: Xid (PCI:0000:01:00): 154, GPU recovery action changed from 0x0 (None) to 0x1 (GPU Reset Required)
NVRM: GPU0 nvAssertOkFailedNoLog: Assertion failed: Generic Error: Invalid state [NV_ERR_INVALID_STATE] (0x00000040) returned from mmuWalkUnmap(userCtx.pGpuState->pWalk, vaLo, vaHi) @ gpu_vaspace.c:2084
NVRM: GPU0 nvAssertFailedNoLog: Assertion failed: (pKernelBus->pReadToFlush != NULL || pKernelBus->virtualBar2[GPU_GFID_PF].pCpuMapping != NULL) @ kern_bus_gv100.c:388
NVRM: GPU0 nvCheckOkFailedNoLog: Check failed: Reset required [NV_ERR_RESET_REQUIRED] (0x00000062) returned from _gpushareddataSendDataPollRpc(...)
NVRM: GPU0 nvCheckOkFailedNoLog: Check failed: Reset required [NV_ERR_RESET_REQUIRED] (0x00000062) returned from kbusSendBusInfo(...) @ kern_bus_ctrl.c:257

Earlier boots also showed:

NVRM: RmHandleDNotifierEvent: Failed to handle ACPI D-Notifier event, status=0x11
NVRM: kgspHealthCheck_TU102: GSP-CrashCat Report
NVRM:     scause:0x0000000000000002  (illegal instruction)
NVRM: gpuPowerManagementResume: GSP boot failed at resume (bootMode 0x1): 0x62

Workaround:

Switching to NVreg_DynamicPowerManagement=0x01 resolves the suspend crash. The GPU no longer power-gates when idle, but system sleep works correctly.

Hit this exact crash on Fedora 44 with RTX 4060 Mobile (Ada Lovelace),
driver 595.71.05, kernel 7.0.10, GNOME Wayland, HDMI display connected
to the NVIDIA port. Same symptoms: Xid 120 → Xid 154 → nvidia-modeset
failures → gnome-shell ABRT → session reset on every suspend/resume.

After a lot of digging, the root cause on Fedora is not GSP firmware
itself
, but SELinux blocking systemd-sleep from writing the VRAM
dump file
. Posting the finding here in case it helps others.

Key observations:

  1. Tried NVreg_EnableGpuFirmware=0/proc/driver/nvidia/params
    reports EnableGpuFirmware: 0, but kernel logs at crash time still
    show GSP active (kgspHealthCheck_TU102, kgspPrintGspBinBuildId,
    GSP-CrashCat report). On Ada Lovelace, this parameter appears to
    be ignored by the proprietary 595 driver.

  2. nvidia-suspend.service was always being skipped with
    Skipped due to 'exec-condition', even with
    NVreg_PreserveVideoMemoryAllocations=1 configured and confirmed
    loaded. VRAM was never being saved.

  3. Reason found in audit log (the smoking gun):

    type=AVC msg=audit(…): avc: denied { write open } for
    pid=10507 comm=“systemd-sleep”
    path=“/var/tmp/#726298 (deleted)”
    scontext=systemd_sleep_t:s0
    tcontext=tmp_t:s0
    tclass=file permissive=0

    type=AVC msg=audit(…): avc: denied { perfmon } for
    pid=10507 comm=“systemd-sleep” capability=38
    scontext=systemd_sleep_t:s0

    SELinux policy on Fedora doesn’t allow systemd_sleep_t to write
    to tmp_t (i.e. /var/tmp, the path recommended by NVIDIA’s own
    documentation for NVreg_TemporaryFilePath). It also denies the
    perfmon capability that systemd-sleep needs.

  4. Fix that resolved suspend/resume completely on this hardware:

    a) Move the VRAM dump path off tmp_t:

    mkdir -p /var/lib/nvidia
    cat > /etc/modprobe.d/nvidia-power-management.conf <<EOF
    options nvidia NVreg_PreserveVideoMemoryAllocations=1
    options nvidia NVreg_TemporaryFilePath=/var/lib/nvidia
    EOF

    b) Add a small SELinux policy module:

    cat > nvidia-sleep.te <<EOF
    module nvidia-sleep 1.0;
    require {
    type systemd_sleep_t;
    type var_lib_t;
    class file { write open create unlink read getattr setattr };
    class dir { write add_name remove_name search };
    class capability2 perfmon;
    }
    allow systemd_sleep_t var_lib_t:dir { write add_name remove_name search };
    allow systemd_sleep_t var_lib_t:file { write open create unlink read getattr setattr };
    allow systemd_sleep_t self:capability2 perfmon;
    EOF
    checkmodule -M -m -o nvidia-sleep.mod nvidia-sleep.te
    semodule_package -o nvidia-sleep.pp -m nvidia-sleep.mod
    sudo semodule -i nvidia-sleep.pp

    c) Rebuild initramfs and reboot:

    sudo dracut --force
    sudo reboot

After this: VRAM dump succeeds, GSP no longer crashes on resume,
gnome-shell survives, all applications persist across multiple
suspend/resume cycles with the external HDMI monitor still connected.
No more Xid 120/154 in logs.

Conclusion for anyone hitting this on Fedora (or any SELinux-enforcing
distro): GSP isn’t really the problem — it’s just the messenger.
Saving VRAM properly is what GSP needs to not crash. Disabling GSP is
a workaround for the symptom; fixing SELinux fixes the cause.

I’ve filed a bug against selinux-policy in Fedora Bugzilla so the
policy gets fixed upstream:

Hardware/software for reference:

  • Acer laptop, NVIDIA RTX 4060 Mobile (Ada) + AMD Phoenix1 iGPU
  • HDMI port wired to dGPU
  • Fedora 44, GNOME 50.1, Wayland
  • Kernel 7.0.10-201.fc44.x86_64
  • NVIDIA proprietary 595.71.05 (RPM Fusion akmod-nvidia)
  • s2idle only (no S3 deep sleep available in BIOS)