Comment 6 for bug 599352

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Maverick] Need to not display hibernation in UI if do not have enough swap space

The indicator just asks upower whether it's able to hibernate. Why was that task added, doesn't it show the error message that upower returns? I recently tested it in XFCE, and there that works, so upower is sending an appropriate error.

upower itself already does have logic to check whether we have enough swap space. Currently it says "yes" if there is at least (active memory) * 0.8 available swap space. For the corner cases where this isn't enough, the UI should return an appropriate error message. Also, I regularly hibernate with less swap than I have memory, just because most memory is used by caches. This seems to do fine for most cases. Is there some practical scenario where this fails? We could certainly bump the 0.8 to 1, in which case it should almost always succeed.