I have a server running NixOS that I want to enable hibernation on. When I try and run hibernate, I get this error:
[tombert@nixos:~]$ sudo systemctl hibernate
Call to Hibernate failed: Not enough swap space for hibernation
For perspective, I have my swap file set up at /swapfile
:
[tombert@nixos:~]$ sudo swapon -s
Filename Type Size Used Priority
/swapfile file 153599996 0 -2
[tombert@nixos:~]$ free -m
total used free shared buff/cache available
Mem: 104720 2148 85366 20 17206 101280
Swap: 149999 0 149999
The swapfile is set here:
swapDevices = [
{ device = "/swapfile";
size = 150000;
}
];
I have the kernel boot stuff set here:
boot.resumeDevice = "/dev/disk/by-uuid/45bdbcc1-13d2-417f-a763-ce60c73e42e4";
boot.kernelParams =
[ "processor.max_cstate=1"
"resume=UUID=45bdbcc1-13d2-417f-a763-ce60c73e42e4"
"resume_offset=13765705728"
];
This is an ext4 partition. Any ideas what I might be doing wrong?