Swap, ZRAM, Zswap and Hibernate on NixOS
Whether to use swap is a perennial fight online. The conversation is often muddled when people conflate recommendations for servers with recommendations for workstations. In my case, I'm going to focus on desktops and laptops.
I use swap because I like suspend-then-hibernate, or "Standby, then hibernate" in the KDE settings: ![[Pasted image 20260917120542.png]]
This will first ACPI S3 suspend to RAM, then after a delay go into S4 Hibernate. I think this strikes a nice balance: if I step away for a bit I don't have to wait for things to start up, but I don't have to worry if I forget to fully power off my machine.
To use hibernate you need swap to save your system state to disk.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in