You close the lid and the screen stays black
You close your laptop lid, walk to the kitchen, and come back to a black screen with a frozen cursor. Or you try to hibernate, the system writes to disk, powers off, and then refuses to restore your session on boot. Suspend and hibernate failures are among the most common desktop complaints on Fedora. The kernel supports the hardware, but the configuration often misses a detail that breaks the power state transition.
What's actually happening
Suspend writes your RAM state to a low-power memory chip and cuts power to everything else. Hibernate copies your RAM to swap storage and shuts down completely. The kernel must pause every driver, save device state, write data if hibernating, and then reverse the process on wake. If one driver refuses to pause, or the swap space is too small, the whole operation aborts.
Think of it like pausing a complex video game. If one texture pack fails to load or save, the game crashes instead of pausing. Fedora's default kernel is aggressive about hardware support, which means it tries to talk to every device. That increases the chance of a driver conflict during power transitions.
Fedora also defaults to s2idle (modern standby) on many laptops for compatibility. s2idle keeps the CPU in a low-power state but does not fully suspend devices. This causes rapid battery drain on some hardware. You may need to force deep sleep or tune wake sources to get usable battery life.
Check supported sleep states
First, verify what the kernel thinks it can do. The kernel exposes supported sleep states in sysfs. If the state you want isn't listed, no amount of configuration will enable it.
cat /sys/power/state
# WHY: Lists available sleep states. 'mem' is suspend-to-RAM. 'disk' is hibernate.
If the output contains freeze mem, your system supports suspend but not hibernate. If disk is missing, the kernel cannot write a hibernation image. This usually means swap is too small or the resume parameter is missing.
If disk is missing, hibernate is impossible until you fix swap or kernel parameters. Check swap before guessing.
Fix swap for hibernate
Hibernate requires swap space equal to or larger than your physical RAM. The kernel dumps the entire memory contents to disk. If swap is too small, the hibernate attempt fails silently or panics. Fedora often creates a swap file by default, but the size might be insufficient for hibernation.
swapon --show
# WHY: Displays active swap devices and their sizes.
free -h
# WHY: Shows total RAM and swap usage in human-readable format.
If swap is missing or too small, create a swap file. This example creates a 16GB file. Adjust the count based on your RAM size.
sudo dd if=/dev/zero of=/swapfile bs=1G count=16 status=progress
# WHY: Allocates a 16GB file filled with zeros. bs=1G sets block size for faster I/O.
sudo chmod 600 /swapfile
# WHY: Restricts permissions so only root can read/write the swap file.
sudo mkswap /swapfile
# WHY: Formats the file with the swap signature required by the kernel.
sudo swapon /swapfile
# WHY: Activates the swap file immediately for the current session.
echo '/swapfile none swap defaults 0 0' | sudo tee -a /etc/fstab
# WHY: Adds the swap file to fstab so it activates automatically on boot.
Edit /etc/fstab for persistence. Never edit files in /usr/lib/. Configuration changes belong in /etc/.
Verify swap size matches or exceeds RAM. Hibernate will fail if the dump cannot fit.
Configure the resume parameter
The kernel needs to know where to find the hibernation image on boot. Without the resume parameter, the system boots fresh and ignores the data in swap. You must pass the UUID of the swap device to the kernel command line.
findmnt -no UUID -T /swapfile
# WHY: Extracts the UUID of the filesystem containing the swap file.
Add the resume parameter to GRUB. Edit /etc/default/grub and append resume=UUID=... to GRUB_CMDLINE_LINUX.
# /etc/default/grub
GRUB_CMDLINE_LINUX="... resume=UUID=your-actual-uuid-here"
# WHY: Tells the kernel to load the hibernation image from this swap device on boot.
Regenerate the GRUB configuration. Fedora uses grub2-mkconfig.
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
# WHY: Regenerates the GRUB configuration file with the new kernel parameters.
Reboot to test. The resume parameter must match the swap UUID exactly. A typo leaves you with a fresh boot every time.
Switch from s2idle to deep sleep
Many modern laptops default to s2idle for compatibility. s2idle drains battery faster than deep sleep because devices remain partially active. Check your current default.
cat /sys/power/mem_sleep
# WHY: Shows available memory sleep states. The value in brackets is the current default.
If the output shows [s2idle] deep, the system is using modern standby. You can force deep sleep by adding a kernel parameter. Edit /etc/default/grub and add mem_sleep_default=deep.
# /etc/default/grub
GRUB_CMDLINE_LINUX="... mem_sleep_default=deep"
# WHY: Forces the kernel to use deep suspend instead of s2idle.
Run sudo grub2-mkconfig -o /boot/grub2/grub.cfg and reboot.
Reboot and check battery drain. If the system fails to wake from deep sleep, revert the parameter. Deep sleep is faster to resume but less compatible with older firmware.
Diagnose failures with the journal
When suspend fails, the system usually logs the failure before waking up or hanging. The journal contains the trace. Look for the boot before the current one, as the failure often happens during the resume attempt.
journalctl -b -1 -p 3
# WHY: Shows priority 3 (error) and above logs from the previous boot.
# ...output truncated for clarity
You will often see lines like this when a driver blocks the transition:
ACPI: EC: interrupt blocked
PM: suspend entry(s2idle)
The journalctl -xe command reads better interactively. The x flag adds explanatory text and the e flag jumps to the end. Most sysadmins type journalctl -xeu <unit> muscle-memory style.
Run journalctl -b -1 immediately after a failure. The error message points to the specific driver or subsystem that broke the transition.
Stop random wakeups
Sometimes the laptop wakes up randomly. A USB device or network card triggers a wake event when it shouldn't. The kernel tracks wake sources in /proc/acpi/wakeup.
cat /proc/acpi/wakeup
# WHY: Lists devices and their wake status. 'enabled' means the device can wake the system.
Disable a device that is causing spurious wakeups. This example toggles XHC1.
echo XHC1 | sudo tee /proc/acpi/wakeup
# WHY: Toggles the wake status of XHC1. Running this twice disables it.
Changes to /proc/acpi/wakeup are lost on reboot. Use a systemd service or udev rule for persistence.
Disable wake sources that cause spurious wakeups. Check the list after a random wake to find the culprit.
Handle GPU driver conflicts
Graphics drivers are frequent offenders. NVIDIA proprietary drivers require specific systemd units to handle power state transitions. AMD drivers sometimes conflict with IOMMU settings.
Enable NVIDIA sleep services if you use the proprietary driver.
sudo systemctl enable nvidia-suspend.service nvidia-hibernate.service nvidia-resume.service
# WHY: Enables NVIDIA's helper scripts that save and restore GPU state during sleep.
For AMD systems, if suspend hangs, IOMMU isolation can interfere. Add amd_iommu=off to kernel parameters as a test.
# /etc/default/grub
GRUB_CMDLINE_LINUX="... amd_iommu=off"
# WHY: Disables AMD IOMMU to rule out isolation conflicts during suspend.
Check systemctl status <unit> before restarting services. The status shows recent log lines and state in one view.
Enable NVIDIA sleep services if you use proprietary drivers. Reboot after changing kernel parameters.
Test power states manually
Test the states from the terminal to isolate GUI issues. If terminal suspend works but the GUI fails, the problem is in the desktop environment or lid switch configuration.
sudo systemctl suspend
# WHY: Triggers suspend-to-RAM immediately.
sudo systemctl hibernate
# WHY: Triggers hibernate immediately.
sudo systemctl hybrid-sleep
# WHY: Triggers hybrid sleep. Writes to swap like hibernate but stays in suspend.
Hybrid sleep writes to swap like hibernate but stays in suspend like suspend. If power is lost, the system hibernates. If power remains, it resumes quickly.
Test manually to confirm the kernel handles the transition. If terminal suspend works but GUI fails, the issue is in the desktop environment or lid switch configuration.
Common pitfalls
A botched configuration can leave you unable to boot or restore sessions. Watch for these errors.
If you see this message, swap is missing or the resume parameter is wrong:
Failed to hibernate system via logind: Sleep verb not supported
If the system hangs on resume with a black screen, check the journal for GPU driver errors. NVIDIA systems often hang if the sleep services are not enabled.
If journalctl shows ACPI Error, the firmware may be buggy. Update the BIOS or use acpi_osi=! as a kernel parameter to work around ACPI compatibility issues.
Run journalctl -b -1 first. Read the actual error before guessing.
When to use suspend, hibernate, or hybrid-sleep
Use suspend when you need quick resume and the battery can hold charge for a few hours. Use hibernate when you are closing the laptop for days and need zero power draw. Use hybrid-sleep when you want the safety of hibernate with the speed of suspend, accepting higher disk I/O. Use systemctl suspend when you need to test power states without relying on the desktop environment. Use journalctl -b -1 when a sleep attempt fails and you need to find the root cause.