Comment 10 for bug 223770

Revision history for this message
vlowther (victor-lowther) wrote : Re: [Bug 223770] Re: hibernate included in shutdown menu, even if it can't work.

On Tue, 2008-10-14 at 17:44 +0000, hyperair wrote:
> Something worth noting is that depending on capacity of the swap and the
> current memory usage, whether or not there is enough free space on the
> swap to fit the total memory used can be transient. However,
> gnome-power-manager only checks (with pm-is-supported --hibernate) for
> the status of hibernate support only once, if I'm not mistaken. If it
> fails once, it does not try again.

pm-is-supported just check to see of the kernel/uswsusp/tuxonice
supports hibernation. We don't check anything else.

> Another thing worth noting is that, supposing the user is using uswsusp,
> compression is generally used on the swap image, so it would be pretty
> hard to figure out whether it can actually the used memory can actually
> fit into the swap or not, under certain circumstances, because the
> compression ratio is unpredictable.

It is undecidable no matter what method you use because all of them will
try at hibernate time to free up enough memory to make a memory snapshot
fit in the available swap space. On most systems, the majority of
memory is used for caching purposes and can either be flushed or thrown
away.

> As for the case of tuxonice, I have absolutely no idea about how that
> works, having never used it before.
>
> Perhaps it might be a good idea to file this bug upstream.

It is not a bug we can fix. The general case is undecidable.

> --
> Chow Loong Jin
>
--
Victor Lowther
Ubuntu Certified Professional