Whereas many questions are geared towards implementing hibernation, mine is how to disable it.

I've just encrypted my swap partition, and I such my system can still hibernate, but cannot resume anymore. So, to avoid mistakes I would to disable hibernating system-wide.

Note: I still want suspend!

link|improve this question

feedback

1 Answer

up vote 5 down vote accepted

Run this:

sudoedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy

Change action id="org.freedesktop.upower.hibernate">defaults>allow_active to no. Save and exit. That will stop users being able to do that from the desktop.

If you have a sleep or hibernate button on your keyboard or case, these will still work IIRC so you need to "break" their default behaviour. Run:

gconftool -s /apps/gnome-power-manager/buttons/hibernate -t string interactive

Source.

link|improve this answer
Great many thanks! This works like a charm :-) – Huygens Nov 12 '10 at 9:08
Will this also stop the machine hibernating when the battery's low? – poolie Mar 5 '11 at 0:21
@poolie It shouldn't interfere with that (we're not actually breaking the hibernate function)... But I don't know how that event is wired. It might break if it does silly checks. – Oli Mar 5 '11 at 0:33
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.