Hacker News new | ask | show | jobs
by pxc 1427 days ago
Have you tried configuring suspend-then-hibernate with a very short timer (e.g., 10 or 30 minutes)? The configuration for it is shipped with systemd these days, so all you have to do is turn it on and set the timer length. With fast SSDs, resume from hibernate is not very painful.

That should let you close your laptop and open it in a few days without any big issue, even if S0ix continues to suck.

2 comments

Configuring suspend-then-hibernate is a pain on both Fedora and Ubuntu for different reasons: Fedora uses zswap by default and Ubuntu's swap partition is too small.
Last I installed it, Ubuntu actually used a swap file, so configuring hibernation required adding a kernel parameter to your boot arguments specifying what file to resume from.
I configured this recently, and it involved resizing a 1GB LUKS swap partition on Ubuntu 22.04 at least with encryption enabled.
Thanks for the suggestion! I haven't used swap for years but I am about to figure out how to set it up behind LUKS/LVM to test this out.