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!


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


  • 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
  • @Oli What version of Ubuntu is this for? I did this a few days ago and my computer still sleeps or hibernates every night. It's driving me nuts. Jun 29 '12 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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