On Wed, Apr 20, 2016 at 3:14 AM, Lennart Poettering <lenn...@poettering.net> wrote: > On Tue, 19.04.16 22:47, Chris Murphy (li...@colorremedies.com) wrote: > >> In some ancient bug or lkml I'd read a kernel maintainer say that the >> hibernation image size isn't fixed, and might be less than RAM size >> but could be a little more than RAM size, especially if some swap is >> being used. So what should swap partition size be to support >> hibernation? 1x RAM? 1.5x? 2x? Other? > > Here's the heuristics code logind uses to check whether hibernation > shall be considered available or not: > > https://github.com/systemd/systemd/blob/master/src/shared/sleep-config.c#L229 > > i.e. it checks that the RAM size is smaller than 0.98 times the > currently unused swap space.
Default Fedora 24 installation, 'free' shows Mem: 2048524 Swap: 2098172 Mem is 0.976 times unused swap, on a clean boot where no swap at all is being used. If as little as 8MiB swap were used, sounds like hibernation would fail? How does it fail if mem > 0.98 * swap? I think this swap is too small to rely upon, but my main concern is how the hibernation fails, if it's fail safe, and if there's some way for user space to predict it will fail so it doesn't even attempt it? -- Chris Murphy _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel