<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Andy Mindful</title>
    <description>The latest articles on DEV Community by Andy Mindful (@andy_mindful).</description>
    <link>https://dev.to/andy_mindful</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3900881%2F7975ec8f-e9b8-4167-926c-f13b844bb291.png</url>
      <title>DEV Community: Andy Mindful</title>
      <link>https://dev.to/andy_mindful</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/andy_mindful"/>
    <language>en</language>
    <item>
      <title>How to Set Up Reliable Hibernation on Fedora 43 with LUKS and NVIDIA</title>
      <dc:creator>Andy Mindful</dc:creator>
      <pubDate>Sun, 08 Nov 2026 11:59:00 +0000</pubDate>
      <link>https://dev.to/andy_mindful/how-to-set-up-reliable-hibernation-on-fedora-43-with-luks-and-nvidia-34b2</link>
      <guid>https://dev.to/andy_mindful/how-to-set-up-reliable-hibernation-on-fedora-43-with-luks-and-nvidia-34b2</guid>
      <description>&lt;h3&gt;
  
  
  A practical setup for a modern Linux laptop with Windows dual boot, encrypted storage, dedicated swap, dracut, and hybrid Intel/NVIDIA graphics
&lt;/h3&gt;

&lt;p&gt;Hibernation on Linux sounds simple in theory:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Save RAM to disk, power the machine off, then restore the memory image on the next boot.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;On a modern laptop, however, several independent layers have to cooperate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Firmware / UEFI
        ↓
Linux kernel
        ↓
Encrypted storage
        ↓
Disk-backed swap
        ↓
Kernel resume target
        ↓
initramfs / dracut
        ↓
systemd
        ↓
GPU driver
        ↓
Desktop session
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If any of those layers is misconfigured, &lt;code&gt;systemctl hibernate&lt;/code&gt; may fail, the machine may cold-boot instead of resuming, or the desktop may return in a broken state.&lt;/p&gt;

&lt;p&gt;This article describes the configuration I currently use on a Lenovo ThinkPad P1 Gen 7 running Fedora 43.&lt;/p&gt;

&lt;p&gt;It is not meant to be a universal recipe for every Linux machine. Instead, it is a &lt;strong&gt;known-good baseline&lt;/strong&gt; that has survived long uptimes, repeated suspend/hibernate cycles, hybrid graphics, Windows dual boot, and normal workstation usage.&lt;/p&gt;




&lt;h2&gt;
  
  
  The hardware and software
&lt;/h2&gt;

&lt;p&gt;My system is:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Configuration&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Laptop&lt;/td&gt;
&lt;td&gt;Lenovo ThinkPad P1 Gen 7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CPU&lt;/td&gt;
&lt;td&gt;Intel Core Ultra 9 185H&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RAM&lt;/td&gt;
&lt;td&gt;64 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Integrated GPU&lt;/td&gt;
&lt;td&gt;Intel Arc / Meteor Lake&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Discrete GPU&lt;/td&gt;
&lt;td&gt;NVIDIA GeForce RTX 4070 Laptop, 8 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OS&lt;/td&gt;
&lt;td&gt;Fedora 43 Workstation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Desktop&lt;/td&gt;
&lt;td&gt;GNOME 49 / Wayland&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kernel&lt;/td&gt;
&lt;td&gt;Linux 6.12 LTS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NVIDIA&lt;/td&gt;
&lt;td&gt;580 production/stable branch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage&lt;/td&gt;
&lt;td&gt;LUKS encrypted&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Swap&lt;/td&gt;
&lt;td&gt;Dedicated disk-backed swap LV, about 74 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Other OS&lt;/td&gt;
&lt;td&gt;Windows 11, dual boot&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two choices here deserve explanation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Linux 6.12 LTS is not required for hibernation.&lt;/strong&gt; I use it because power management on laptops with hybrid Intel/NVIDIA graphics tends to benefit from reducing moving parts. The goal of this machine is stability, not running the newest kernel every week.&lt;/p&gt;

&lt;p&gt;Likewise, &lt;strong&gt;NVIDIA 580 is a stability choice&lt;/strong&gt;, not a hibernation requirement.&lt;/p&gt;

&lt;p&gt;The setup was originally validated on the 6.12 LTS series and remained significantly more predictable than continuously tracking Fedora's latest kernel together with new NVIDIA releases.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Before touching Linux: Secure Boot and BitLocker
&lt;/h2&gt;

&lt;p&gt;This configuration assumes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Secure Boot: OFF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is intentional.&lt;/p&gt;

&lt;p&gt;On this Fedora 43 system, enabling Secure Boot activated kernel lockdown and removed hibernation support from the available kernel sleep states.&lt;/p&gt;

&lt;p&gt;With Secure Boot enabled:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /sys/power/state
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;did not expose &lt;code&gt;disk&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;With it disabled:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;freeze mem disk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;became available.&lt;/p&gt;

&lt;p&gt;On EFI systems, Secure Boot can automatically enable kernel lockdown. Fedora 43 users have also reported the same practical result: S4 may exist in ACPI while &lt;code&gt;disk&lt;/code&gt; is unavailable through &lt;code&gt;/sys/power/state&lt;/code&gt; when Secure Boot is active.&lt;/p&gt;

&lt;h3&gt;
  
  
  Security trade-off
&lt;/h3&gt;

&lt;p&gt;Disabling Secure Boot reduces protection of the early boot chain.&lt;/p&gt;

&lt;p&gt;This is therefore not something I recommend doing blindly. It is simply a prerequisite of &lt;strong&gt;this particular tested setup&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The hibernation image also contains a snapshot of system memory, potentially including sensitive data. This is one reason I keep the disk-backed swap &lt;strong&gt;inside the LUKS-encrypted storage stack&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Windows dual boot and BitLocker
&lt;/h2&gt;

&lt;p&gt;If Windows uses BitLocker, changing UEFI or Secure Boot settings can trigger BitLocker recovery.&lt;/p&gt;

&lt;p&gt;Before changing Secure Boot, make sure you have your BitLocker recovery key. I also suspend BitLocker protection before making the firmware change.&lt;/p&gt;

&lt;p&gt;Run an elevated PowerShell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Suspend-BitLocker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-MountPoint&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-RebootCount&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then reboot into UEFI and disable Secure Boot.&lt;/p&gt;

&lt;p&gt;After confirming that Windows still boots normally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Resume-BitLocker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-MountPoint&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Microsoft explicitly recommends suspending BitLocker around firmware and Secure Boot related changes because such changes can alter the platform measurements used to release the BitLocker key.&lt;/p&gt;

&lt;p&gt;I also disable Windows Fast Startup on dual-boot machines. Leaving an NTFS filesystem in Windows' hybrid-hibernated state and then accessing it from another OS is something I prefer to avoid entirely.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Use a stable kernel baseline
&lt;/h2&gt;

&lt;p&gt;Fedora normally tracks newer kernels aggressively.&lt;/p&gt;

&lt;p&gt;That is great for getting new hardware support quickly, but it also means that the kernel, Intel graphics, NVIDIA module, ACPI behavior, and suspend/resume code can all change independently.&lt;/p&gt;

&lt;p&gt;For this workstation I use the unofficial &lt;strong&gt;6.12 LTS kernel maintained in the &lt;code&gt;kwizart/kernel-longterm-6.12&lt;/code&gt; COPR&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The project is specifically intended to provide the Linux 6.12 long-term branch on Fedora and is useful for systems using external kernel modules such as NVIDIA.&lt;/p&gt;

&lt;p&gt;Install it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf copr &lt;span class="nb"&gt;enable &lt;/span&gt;kwizart/kernel-longterm-6.12

&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    kernel-longterm &lt;span class="se"&gt;\&lt;/span&gt;
    kernel-longterm-devel &lt;span class="se"&gt;\&lt;/span&gt;
    kernel-longterm-modules-extra &lt;span class="se"&gt;\&lt;/span&gt;
    kernel-longterm-core &lt;span class="se"&gt;\&lt;/span&gt;
    kernel-longterm-modules &lt;span class="se"&gt;\&lt;/span&gt;
    kernel-longterm-modules-core
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;kernel-longterm-devel&lt;/code&gt; is important when using &lt;code&gt;akmod-nvidia&lt;/code&gt;, because akmods needs matching kernel development files to build the NVIDIA kernel module.&lt;/p&gt;

&lt;p&gt;Reboot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see something from the &lt;code&gt;6.12.x&lt;/code&gt; series.&lt;/p&gt;

&lt;p&gt;Check the currently configured default kernel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;grubby &lt;span class="nt"&gt;--default-kernel&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once I have verified that a kernel works correctly with the NVIDIA module, I prefer to keep that combination stable rather than changing both layers simultaneously.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Verify the NVIDIA driver before configuring hibernation
&lt;/h2&gt;

&lt;p&gt;Before adding hibernation to the equation, make sure the GPU stack itself is healthy.&lt;/p&gt;

&lt;p&gt;I use the stable/production NVIDIA branch packaged through RPM Fusion rather than NVIDIA's &lt;code&gt;.run&lt;/code&gt; installer.&lt;/p&gt;

&lt;p&gt;Check the loaded driver:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvidia-smi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then compare the loaded kernel module with the installed userspace stack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;modinfo nvidia | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s1"&gt;'^version:'&lt;/span&gt;

&lt;span class="nb"&gt;cat&lt;/span&gt; /proc/driver/nvidia/version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These versions should agree.&lt;/p&gt;

&lt;p&gt;This may sound obvious, but it becomes important after updates: an updated userspace package combined with an older still-loaded kernel module can produce extremely confusing graphics and resume problems.&lt;/p&gt;

&lt;p&gt;I cover that failure mode separately in Part 2.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Verify that the kernel actually supports hibernation
&lt;/h2&gt;

&lt;p&gt;Do this &lt;strong&gt;before configuring swap or dracut&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /sys/power/state
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For hibernation, &lt;code&gt;disk&lt;/code&gt; must be available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;freeze mem disk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /sys/power/disk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On my machine it looks similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[platform] shutdown reboot suspend test_resume
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The brackets indicate the currently selected hibernation mode.&lt;/p&gt;

&lt;p&gt;If &lt;code&gt;/sys/power/state&lt;/code&gt; does not contain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;disk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;stop here.&lt;/p&gt;

&lt;p&gt;Adding more swap or changing GRUB will not solve a kernel-level hibernation restriction.&lt;/p&gt;

&lt;p&gt;Also check Secure Boot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mokutil &lt;span class="nt"&gt;--sb-state&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For this configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SecureBoot disabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;is expected.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Understand the swap requirement
&lt;/h2&gt;

&lt;p&gt;Fedora Workstation normally uses zram for swap.&lt;/p&gt;

&lt;p&gt;That is useful during normal operation, but zram lives in RAM. Once power disappears, its contents disappear too.&lt;/p&gt;

&lt;p&gt;A hibernation image therefore needs &lt;strong&gt;persistent, disk-backed swap&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;64 GB RAM
~74 GB disk-backed swap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A swap device does not mathematically have to be larger than physical RAM in every possible workload because the kernel does not necessarily write every RAM page unchanged.&lt;/p&gt;

&lt;p&gt;But for a workstation where hibernation should remain dependable even under heavy memory usage, I prefer not to depend on compression ratios or workload characteristics.&lt;/p&gt;

&lt;p&gt;For 64 GB RAM, roughly 70–80 GB of persistent swap is a comfortable configuration.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Keep the swap inside LUKS
&lt;/h2&gt;

&lt;p&gt;My Fedora installation uses a layout conceptually similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NVMe
└── LUKS container
    └── LVM
        ├── root
        └── swap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That has an important property:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RAM
 ↓
hibernation image
 ↓
swap LV
 ↓
LUKS
 ↓
physical SSD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The hibernation image is therefore encrypted at rest.&lt;/p&gt;

&lt;p&gt;Inspect the current layout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lsblk &lt;span class="nt"&gt;-o&lt;/span&gt; NAME,TYPE,FSTYPE,SIZE,UUID,MOUNTPOINTS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also inspect LVM:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;pvs
&lt;span class="nb"&gt;sudo &lt;/span&gt;vgs
&lt;span class="nb"&gt;sudo &lt;/span&gt;lvs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you already have a sufficiently large disk-backed swap LV, &lt;strong&gt;do not recreate it&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Creating a dedicated swap LV
&lt;/h2&gt;

&lt;p&gt;The following example assumes your LUKS-backed LVM volume group has enough free space.&lt;/p&gt;

&lt;p&gt;Check first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vgs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then create the LV:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;lvcreate &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;-L&lt;/span&gt; 74G &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;-n&lt;/span&gt; hibernate_swap &lt;span class="se"&gt;\&lt;/span&gt;
    &amp;lt;VG_NAME&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only on the newly created LV:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;mkswap /dev/&amp;lt;VG_NAME&amp;gt;/hibernate_swap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;swapon /dev/&amp;lt;VG_NAME&amp;gt;/hibernate_swap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;swapon &lt;span class="nt"&gt;--show&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fedora's zram swap may still appear here. That is fine.&lt;/p&gt;

&lt;p&gt;What matters is that a persistent disk-backed swap device also exists.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Make the swap persistent
&lt;/h2&gt;

&lt;p&gt;Get its UUID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;blkid /dev/&amp;lt;VG_NAME&amp;gt;/hibernate_swap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/dev/mapper/fedora-hibernate_swap:
UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
TYPE="swap"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the UUID to &lt;code&gt;/etc/fstab&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap defaults 0 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;swapoff /dev/&amp;lt;VG_NAME&amp;gt;/hibernate_swap
&lt;span class="nb"&gt;sudo &lt;/span&gt;swapon &lt;span class="nt"&gt;-a&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;swapon &lt;span class="nt"&gt;--show&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not proceed until the disk-backed swap returns automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Configure the resume device
&lt;/h2&gt;

&lt;p&gt;Now the kernel must know &lt;strong&gt;where the hibernation image should be restored from&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For a dedicated swap partition or logical volume, this is straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resume=UUID=&amp;lt;SWAP_UUID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A dedicated block-device swap does &lt;strong&gt;not&lt;/strong&gt; require &lt;code&gt;resume_offset&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;resume_offset&lt;/code&gt; is relevant to cases such as swapfiles, where the hibernation image lives at an offset inside another filesystem-backed block device.&lt;/p&gt;

&lt;p&gt;systemd's hibernate-resume generator uses the &lt;code&gt;resume=&lt;/code&gt; kernel parameter to select the resume device during early boot.&lt;/p&gt;

&lt;p&gt;On Fedora I prefer &lt;code&gt;grubby&lt;/code&gt; rather than manually rebuilding GRUB configuration.&lt;/p&gt;

&lt;p&gt;Add the parameter to all installed kernels:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;grubby &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--update-kernel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ALL &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--args&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"resume=UUID=&amp;lt;SWAP_UUID&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inspect the configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;grubby &lt;span class="nt"&gt;--info&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ALL | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s1"&gt;'^(kernel|args)='&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then reboot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After boot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /proc/cmdline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resume=UUID=&amp;lt;SWAP_UUID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A convenient check is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="s1"&gt;' '&lt;/span&gt; &lt;span class="s1"&gt;'\n'&lt;/span&gt; &amp;lt; /proc/cmdline | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s1"&gt;'^resume='&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  9. Make sure dracut contains resume support
&lt;/h2&gt;

&lt;p&gt;This part turned out to be more important than I initially expected.&lt;/p&gt;

&lt;p&gt;The kernel may know the swap UUID, but the &lt;strong&gt;initramfs must also contain the logic necessary to resume the system before normal userspace starts&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Fedora uses dracut to build its initramfs. Fedora's dracut package supports encrypted LUKS, LVM, and other device-mapper based root layouts.&lt;/p&gt;

&lt;p&gt;I explicitly add the &lt;code&gt;resume&lt;/code&gt; dracut module.&lt;/p&gt;

&lt;p&gt;Create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/etc/dracut.conf.d/99-resume.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;add_dracutmodules+&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;" resume "&lt;/span&gt;
add_device+&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;" UUID=&amp;lt;SWAP_UUID&amp;gt; "&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Check that resume is not explicitly omitted
&lt;/h2&gt;

&lt;p&gt;This deserves its own check.&lt;/p&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-RniE&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s1"&gt;'resume|omit_dracutmodules'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    /etc/dracut.conf &lt;span class="se"&gt;\&lt;/span&gt;
    /etc/dracut.conf.d &lt;span class="se"&gt;\&lt;/span&gt;
    2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At one point my otherwise working hibernation setup stopped functioning because dracut reported:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Module 'resume' will not be installed,
because it's in the list to be omitted!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you find something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;omit_dracutmodules+&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;" resume "&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;remove &lt;code&gt;resume&lt;/code&gt; from that configuration before continuing.&lt;/p&gt;

&lt;p&gt;Dracut itself warns against manually omitting modules because removing an essential module can produce exactly this kind of failure.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. Rebuild the initramfs
&lt;/h2&gt;

&lt;p&gt;Rebuild all installed initramfs images:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;dracut &lt;span class="nt"&gt;--regenerate-all&lt;/span&gt; &lt;span class="nt"&gt;--force&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or rebuild only the currently running kernel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;dracut &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--force&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    /boot/initramfs-&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;.img &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inspect the resulting initramfs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;lsinitrd &lt;span class="se"&gt;\&lt;/span&gt;
    /boot/initramfs-&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;.img &lt;span class="se"&gt;\&lt;/span&gt;
    | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; resume
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I prefer explicitly validating the image instead of assuming that because &lt;code&gt;dracut&lt;/code&gt; exited successfully, the required resume path must be there.&lt;/p&gt;




&lt;h2&gt;
  
  
  11. NVIDIA power-management configuration
&lt;/h2&gt;

&lt;p&gt;NVIDIA adds another stateful device to the suspend/hibernate path: GPU memory.&lt;/p&gt;

&lt;p&gt;The NVIDIA driver can preserve GPU state across suspend and hibernation, but preserving all video-memory allocations requires additional integration when using the &lt;code&gt;/proc/driver/nvidia/suspend&lt;/code&gt; mechanism.&lt;/p&gt;

&lt;p&gt;NVIDIA documents dedicated systemd suspend, hibernate, and resume hooks for this purpose.&lt;/p&gt;

&lt;p&gt;On my workstation I use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NVreg_PreserveVideoMemoryAllocations=1
NVreg_TemporaryFilePath=/var/tmp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/etc/modprobe.d/nvidia-power-management.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="n"&gt;nvidia&lt;/span&gt; &lt;span class="n"&gt;NVreg_PreserveVideoMemoryAllocations&lt;/span&gt;=&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="n"&gt;nvidia&lt;/span&gt; &lt;span class="n"&gt;NVreg_TemporaryFilePath&lt;/span&gt;=/&lt;span class="n"&gt;var&lt;/span&gt;/&lt;span class="n"&gt;tmp&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The filesystem behind &lt;code&gt;/var/tmp&lt;/code&gt; must have enough free space to temporarily store the GPU allocations.&lt;/p&gt;

&lt;p&gt;For an 8 GB RTX 4070 Laptop GPU, I make sure considerably more than 8 GB is available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; /var/tmp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the NVIDIA power-management units:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl status &lt;span class="se"&gt;\&lt;/span&gt;
    nvidia-suspend.service &lt;span class="se"&gt;\&lt;/span&gt;
    nvidia-hibernate.service &lt;span class="se"&gt;\&lt;/span&gt;
    nvidia-resume.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When using the full VRAM preservation mechanism, these units need to participate in the power-management sequence.&lt;/p&gt;

&lt;p&gt;After changing module options:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;dracut &lt;span class="nt"&gt;--regenerate-all&lt;/span&gt; &lt;span class="nt"&gt;--force&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then verify the loaded parameters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s1"&gt;'PreserveVideoMemoryAllocations|TemporaryFilePath'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    /proc/driver/nvidia/params
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NVIDIA notes that insufficient or incomplete VRAM preservation can otherwise result in rendering corruption or application failures after a power-management cycle.&lt;/p&gt;




&lt;h2&gt;
  
  
  12. Validate the entire chain before the first hibernate
&lt;/h2&gt;

&lt;p&gt;At this point I run a full sanity check.&lt;/p&gt;

&lt;h3&gt;
  
  
  Kernel
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /sys/power/state
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;freeze mem disk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Hibernation mode
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /sys/power/disk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected to contain usable modes rather than only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[disabled]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Persistent swap
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;swapon &lt;span class="nt"&gt;--show&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Confirm that the disk-backed swap is present and large enough.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resume kernel parameter
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="s1"&gt;' '&lt;/span&gt; &lt;span class="s1"&gt;'\n'&lt;/span&gt; &amp;lt; /proc/cmdline | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s1"&gt;'^resume='&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Kernel resume device
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /sys/power/resume
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This normally contains the device's:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;major:minor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;rather than:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0:0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compare it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lsblk &lt;span class="nt"&gt;-o&lt;/span&gt; NAME,MAJ:MIN,FSTYPE,SIZE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  initramfs
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;lsinitrd &lt;span class="se"&gt;\&lt;/span&gt;
    /boot/initramfs-&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;.img &lt;span class="se"&gt;\&lt;/span&gt;
    | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; resume
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  NVIDIA
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvidia-smi

modinfo nvidia | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s1"&gt;'^version:'&lt;/span&gt;

&lt;span class="nb"&gt;cat&lt;/span&gt; /proc/driver/nvidia/version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once all of these agree, I consider the system ready for the first real test.&lt;/p&gt;




&lt;h2&gt;
  
  
  13. Test hibernation from the command line first
&lt;/h2&gt;

&lt;p&gt;Do not start by debugging the GNOME power menu.&lt;/p&gt;

&lt;p&gt;First test the mechanism directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl hibernate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The sequence should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;running Fedora
      ↓
systemd prepares userspace
      ↓
NVIDIA saves GPU state
      ↓
kernel writes RAM image to swap
      ↓
machine powers off
      ↓
power on
      ↓
firmware → bootloader → kernel
      ↓
LUKS unlock
      ↓
initramfs finds resume device
      ↓
kernel restores memory image
      ↓
existing Fedora session continues
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After resume, your applications and desktop session should be in the state they were in before hibernation.&lt;/p&gt;




&lt;h2&gt;
  
  
  14. Check the logs after resume
&lt;/h2&gt;

&lt;p&gt;For a &lt;strong&gt;successful&lt;/strong&gt; hibernation/resume cycle, inspect the current boot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl &lt;span class="nt"&gt;-b&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-Ei&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s1"&gt;'hibernate|hibernation|resume|PM:'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And kernel messages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl &lt;span class="nt"&gt;-b&lt;/span&gt; &lt;span class="nt"&gt;-k&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-Ei&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s1"&gt;'hibernate|hibernation|resume|PM:'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If hibernation failed and the machine performed a completely fresh boot instead of restoring the image, the previous boot becomes interesting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl &lt;span class="nt"&gt;-b&lt;/span&gt; &lt;span class="nt"&gt;-1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That distinction matters.&lt;/p&gt;

&lt;p&gt;A successful hibernation is conceptually a continuation of the previous running system, not simply a normal shutdown followed by a new login session.&lt;/p&gt;




&lt;h2&gt;
  
  
  15. What a healthy configuration looks like
&lt;/h2&gt;

&lt;p&gt;My working baseline can be summarized as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Secure Boot
    OFF

Kernel
    6.12 LTS

NVIDIA
    stable production branch
    matching userspace + kernel module

Storage
    LUKS
      └── LVM
           ├── root
           └── ~74 GB swap

Kernel command line
    resume=UUID=&amp;lt;swap UUID&amp;gt;

dracut
    resume module included

initramfs
    rebuilt and verified

NVIDIA PM
    VRAM preservation configured

/sys/power/state
    freeze mem disk

systemctl hibernate
    powers off

next boot
    restores previous session
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part is not any single command.&lt;/p&gt;

&lt;p&gt;It is that &lt;strong&gt;every layer agrees about the same resume path&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  16. Things I deliberately do not change once the system is stable
&lt;/h2&gt;

&lt;p&gt;Power-management debugging gets difficult when several major components change at the same time.&lt;/p&gt;

&lt;p&gt;On this machine I intentionally treat the following as a tested combination:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kernel
+
NVIDIA driver
+
initramfs
+
firmware
+
GNOME/Mutter
+
audio stack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That does not mean I never update them.&lt;/p&gt;

&lt;p&gt;It means I avoid blindly updating everything and then trying to determine which of five changed components caused a resume regression.&lt;/p&gt;

&lt;p&gt;For example, after a kernel or NVIDIA update I verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt;
nvidia-smi
modinfo nvidia | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s1"&gt;'^version:'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;before trusting suspend or hibernate again.&lt;/p&gt;

&lt;p&gt;If an update breaks the GPU module, Fedora's &lt;code&gt;grubby&lt;/code&gt; makes it easy to keep or select a known-good kernel while investigating.&lt;/p&gt;




&lt;h2&gt;
  
  
  Hibernation is only half the story
&lt;/h2&gt;

&lt;p&gt;Once the configuration above is correct, hibernation itself becomes surprisingly reliable.&lt;/p&gt;

&lt;p&gt;Unfortunately, that does not mean the complete Linux desktop power-management stack will always behave.&lt;/p&gt;

&lt;p&gt;During long-term use of Fedora 43 on this machine I encountered several completely separate problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GNOME entering suspend twice because of a &lt;code&gt;gnome-settings-daemon&lt;/code&gt; regression;&lt;/li&gt;
&lt;li&gt;GNOME Shell/Mutter resume regressions;&lt;/li&gt;
&lt;li&gt;Bitwarden causing kernel hibernation to become unavailable;&lt;/li&gt;
&lt;li&gt;NVIDIA userspace and kernel-module versions becoming mismatched after updates;&lt;/li&gt;
&lt;li&gt;ALSA/UCM regressions and PipeWire xruns after long suspend/hibernate cycles.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those problems are particularly confusing because they can make a perfectly valid hibernation setup look broken.&lt;/p&gt;

&lt;p&gt;I will cover them separately in &lt;strong&gt;Part 2: Fedora Hibernation and Suspend Issues — GNOME, NVIDIA, Bitwarden and Audio&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;Hibernation on a modern Linux workstation is not really one feature.&lt;/p&gt;

&lt;p&gt;It is a chain.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UEFI
 → kernel
 → encryption
 → swap
 → resume target
 → initramfs
 → systemd
 → GPU
 → desktop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Trying random GRUB options rarely helps if you do not first determine which layer is failing.&lt;/p&gt;

&lt;p&gt;The approach that worked best for me was to establish a deliberately boring baseline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;an LTS kernel,&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;a stable NVIDIA driver,&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;encrypted persistent swap,&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;an explicit resume target,&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;and an initramfs whose contents I actually verified.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once that foundation works, bugs higher in the stack become much easier to identify.&lt;/p&gt;

&lt;p&gt;And, as Part 2 will demonstrate, sometimes the component breaking hibernation turns out to be the last one you would expect.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This post was edited during 2 ballistic missile attack on Kyiv, during night onNov 7, 2026. Luckily, I am still alive.&lt;br&gt;
russia IS A TERRORIST STATE.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thank you for your time and hope it will be helpful.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>fedora</category>
      <category>hibernate</category>
    </item>
  </channel>
</rss>
