Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

up vote 4 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.

share|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
    
@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. –  mehaase Jun 29 '12 at 14:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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