Home lab serverPart 7 of 13

Build note

The suspend that never returned

The machine went to sleep and did not come back cleanly. The screen stayed stuck, the NVIDIA display path stopped making progress, and a kernel lock remained held for minutes. This was not a normal slow wake; it was a desktop session wedged in the path that was meant to pause it.

The investigation found recurring DRM flip-event timeouts and a task blocked in the NVIDIA modeset path. In one capture, nvkms_pm_lock stayed held for about eight minutes. The exact first cause was not a single bad line in a config; the display compositor and the driver were both in the suspend path.

Why stopping the GPU process was not enough

The 3090 and 3060 were used for compute and display, and the machine also had GPU exporters. A container could hold a reference to /dev/nvidia-uvm, the Unified Virtual Memory device node. That meant the kernel module still had users when the suspend hook tried to unload it.

There was another obstacle: GNOME Shell could be blocked inside the NVIDIA DRM mapping path. Stopping only the model or the exporter did not remove the compositor from the display pipeline.

Cold suspend

The mitigation added a cold mode to safe-suspend.sh. Before entering sleep, it stops GDM, waits for GNOME Shell to exit, then stops selected services that hold GPU state, including the GPU exporters and Plex. If the compositor does not exit, the script restores what it stopped and refuses to continue rather than suspend into a state it already knows is unsafe.

That cycle was tested end to end. The journal showed GDM stopping before suspend; the user confirmed the machine went to sleep and woke again. It was the first successful suspend/wake cycle after the repeated wedge.

This was a mitigation, not a driver fix. After one wake, nvidia-smi still timed out while the kernel log looked clean, and the exporters spun at 100 percent CPU. The desktop could wake while GPU management remained unhealthy. Those are two different success conditions.

The rule that would have prevented the next week

Do not try to unload a module while the compositor or a container still holds its device nodes. Stop the owners in a known order, verify they exited, and abort the suspend if they did not. A successful wake is necessary, but it is not proof that every GPU service recovered.

How this was made

  • Written by: Rupesh, from his safe-suspend.sh and systemd journal records, with AI drafting and editing.
  • Verification: one successful cold-suspend and wake was confirmed by the user and the journal.
  • AI-assisted sections: structure and copy editing. The mitigation is not presented as a permanent NVIDIA driver fix.