How to Fix Suspend/Resume Issues with NVIDIA on Fedora

Fix Fedora NVIDIA suspend/resume issues by creating a systemd drop-in to reload kernel modules after wake.

Fix Suspend/Resume Issues with NVIDIA on Fedora

You close your laptop lid, walk away, and come back to a black screen. The cursor might be frozen in the corner, or the display might be completely dead. You press keys. You move the mouse. The system is awake, but the video output is gone. You have to hold the power button and hard reboot. This is the classic NVIDIA suspend trap on Fedora.

The problem is not usually the hardware. The NVIDIA driver fails to restore the display pipeline after the system wakes from sleep. The kernel module stays loaded, but its internal state is corrupted. The framebuffer does not reinitialize. The system thinks it is working. The screen disagrees.

The fix forces a clean reset. We use systemd to unload the NVIDIA modules right before the system sleeps and reload them immediately after wake. This clears the corrupted state and reinitializes the display pipeline. We also handle the nvidia-persistenced daemon, which can prevent the GPU from entering the deep sleep state required for a clean resume.

Reload systemd before you test. A stale daemon configuration will ignore your changes.

What is actually happening

The NVIDIA driver runs as a set of kernel modules. When Fedora suspends, the kernel cuts power to hardware components and saves their state. The driver must cooperate by saving its internal registers and memory mappings. On resume, the kernel restores power and asks the driver to restore its state.

On some laptops and desktops, the NVIDIA driver fails to restore the display state. The module remains loaded, but the connection to the display hardware is broken. The kernel does not detect this failure automatically. The system continues running, but nothing reaches the screen.

The nvidia-persistenced daemon complicates this further. This daemon keeps the GPU powered on and initialized to reduce the latency of the first application launch. If the daemon is running, the GPU may not fully power down during suspend. This can leave the hardware in a confused state where it thinks it is awake but cannot accept new commands.

Think of the driver like a librarian managing a reference section. When the library closes, the librarian must mark every book's location and lock the doors. If the librarian forgets to update the index, the next morning the shelves look correct, but the index points to empty spots. Patrons can find nothing. The fix is to clear the desk, reset the index, and re-shelve the books before opening the doors again.

Run journalctl -xe after a failed resume. The kernel log will often show NVRM: GPU at 0000:01:00.0 has fallen off the bus or DRM: failed to initialize display. These lines confirm the driver lost contact with the hardware.

The fix

We create two systemd services. One runs before suspend to unload the modules and stop the persistence daemon. The other runs after resume to reload the modules and restart the daemon. This separation ensures the unload and reload logic never conflict.

Create the suspend service first. This service removes the modules in reverse dependency order and stops the persistence daemon.

# Create the suspend service file.
# This service runs right before the system enters the sleep state.
sudo tee /etc/systemd/system/nvidia-suspend.service > /dev/null << 'EOF'
[Unit]
Description=NVIDIA Suspend Module Unloader
Before=suspend.target
# Stop the persistence daemon so the GPU can fully power down.
# If this daemon is active, the GPU may stay partially awake and fail to reset.
ExecStartPre=/usr/bin/nvidia-persistenced --stop
# Remove modules in reverse dependency order.
# nvidia_uvm and nvidia_drm depend on the core nvidia module.
# Removing dependencies first prevents "module in use" errors.
ExecStartPre=/sbin/modprobe -r nvidia_uvm
ExecStartPre=/sbin/modprobe -r nvidia_drm
ExecStartPre=/sbin/modprobe -r nvidia
# Use a dummy start command so the service completes successfully.
# The work is done in ExecStartPre.
ExecStart=/bin/true

[Service]
Type=oneshot
RemainAfterExit=yes

[Install]
# Trigger this service whenever the system targets suspend.
WantedBy=suspend.target
EOF

Create the resume service next. This service reloads the modules in dependency order and restarts the persistence daemon.

# Create the resume service file.
# This service runs immediately after the system wakes from sleep.
sudo tee /etc/systemd/system/nvidia-resume.service > /dev/null << 'EOF'
[Unit]
Description=NVIDIA Resume Module Loader
After=resume.target
# Load the core nvidia module first.
# All other NVIDIA modules depend on this one.
ExecStart=/sbin/modprobe nvidia
# Load the unified virtual memory module.
# Required for CUDA and Vulkan applications.
ExecStartPost=/sbin/modprobe nvidia_uvm
# Load the DRM module to restore the display pipeline.
# This reinitializes the framebuffer and fixes the black screen.
ExecStartPost=/sbin/modprobe nvidia_drm
# Restart the persistence daemon to restore low-latency wake behavior.
# Only run this if the daemon was installed on your system.
ExecStartPost=/usr/bin/nvidia-persistenced --start

[Service]
Type=oneshot

[Install]
# Trigger this service whenever the system resumes from sleep.
WantedBy=resume.target
EOF

Enable both services so they run automatically on every suspend and resume cycle.

# Enable the services.
# systemd creates symlinks in the target directories to trigger these units.
sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-resume.service
# Reload the systemd manager to pick up the new unit files.
# This step is mandatory. Without it, systemd ignores your changes.
sudo systemctl daemon-reload

Reboot the system. The services will take effect on the next suspend cycle.

Verify it worked

Test the suspend cycle carefully. Close the lid or run systemctl suspend from a TTY. Wait for the system to sleep, then wake it.

If the screen returns normally, the fix is working. Check the service status to confirm the commands ran without errors.

# Check the suspend service status.
# Look for "Active: inactive (dead)" and "Result: success".
systemctl status nvidia-suspend.service

# Check the resume service status.
# Look for "Active: inactive (dead)" and "Result: success".
systemctl status nvidia-resume.service

Review the journal for the services. This shows the exact output of the modprobe commands.

# View logs for the resume service.
# The -u flag filters by unit. The -e flag jumps to the end.
journalctl -u nvidia-resume.service -e

If you see modprobe: FATAL: Module nvidia not found, the NVIDIA driver is not installed or the kernel modules are missing. Run lsmod | grep nvidia to check if the modules are available. If the list is empty, reinstall the NVIDIA driver package.

Check journalctl after the first resume. The error message tells you exactly which module failed.

Common pitfalls

The nvidia-persistenced command may fail if the daemon is not installed. Some minimal installations do not include it. If the command fails, the service will still run, but the persistence feature will not restore. This is safe. The system will resume without persistence. You can ignore the error or remove the ExecStartPost lines for nvidia-persistenced.

Module names can vary slightly depending on the driver version. If you see errors about nvidia_modeset, add that module to the unload and reload lists. The nvidia_modeset module handles mode setting and is required for display output on some configurations.

If you use Secure Boot, ensure the NVIDIA modules are signed. Unsigned modules will fail to load on resume, leaving the system without graphics. Fedora's akmods package usually handles signing automatically, but verify the signature if modprobe fails with Required key not available.

Some users report that the nvidia-drm.modeset=1 kernel parameter fixes suspend issues without needing a service. This parameter enables kernel mode setting for the NVIDIA driver, which improves power management. If your system supports this parameter, it is often a cleaner solution. Add the parameter to the kernel command line in GRUB and test. If suspend works with the parameter, you do not need the systemd services.

Trust the package manager. Manual file edits drift, snapshots stay.

When to use this vs alternatives

Use the systemd suspend/resume services when your hardware requires a full module reset to recover the display pipeline after sleep. Use the nvidia-drm.modeset=1 kernel parameter when you want the driver to handle power management natively without reloading modules. Stick to the default configuration when your system suspends and resumes without issues. Switch to the open-source nouveau driver when you prioritize free software compliance over proprietary performance and features.

Where to go next