On Fri, Sep 14, 2018 at 12:24:18PM -0700, Adam Williamson wrote:
On Fri, 2018-09-14 at 16:54 +0000, Zbigniew Jędrzejewski-Szmek
> IMHO it is better to disable hibernation in systemd if we know it
> cannot work rather than disable s2h permanently in gnome.
> In particular, it is fairly easy to tweak systemd to understand the
> 'noresume' parameter and notice the lack of 'resume=' (Long term we
> want to make hibernation work without resume=, but until then.)
> I'll try to get this ready before F29 final.
> That should solve the case of "configuration" issues, and will leave
> us only with those cases where the kernel drivers have issues.
Well, it was suggested upthread that even if resume= is set, swap could
well be too small. Per its comments, for instance, anaconda certainly
does not ensure that swap size is larger than RAM size:
# the succeeding if-statement implements the following formula for
# suggested swap size.
# swap(mem) = 2 * mem, if mem < 2 GiB
# = mem, if 2 GiB <= mem < 8 GiB
# = mem / 2, if 8 GIB <= mem < 64 GiB
# = 4 GiB, if mem >= 64 GiB
it's going to be exactly equal to memory size or smaller than memory
size on almost all modern systems, according to that at least.
Systemd compares the amount of memory used to the available swap space
and does not offer hibernation if there isn't enough. I haven't seen
reports that this calculation is not done properly. In other words,
systemd cannot always offer hibernation, but when it does, is shouldn't
fail (at least because of memory issues, other problems are still possible