Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a command line way to disable suspend in ubuntu 12.04?

I can only ssh to my 12.04, is there a way to disable suspend mode via command line?

Thank you.

share|improve this question
up vote 6 down vote accepted

This should work (adapted from here).

Create a file /etc/polkit-1/50-local.d/disable-suspend.pkla containing:

[Disable suspend]
share|improve this answer
This worked well for me today (2013-09-22) on Ubuntu 12.04, except the directory name was /etc/polkit-1/localauthority/50-local.d – rpilkey Sep 22 '13 at 22:25
I am having huge problem with suspend so I don't dare to test this. But does it mean that, with this script, even if I order suspend (via close lid, via button, via menu button), Ubuntu will not go into suspend? – Heisenberg Nov 20 '13 at 22:43
@anh yes, that's the idea. – terdon Nov 21 '13 at 12:40

Your Answer


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.