Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

(This was previously asked, but the solution no longer works under 11.10.)

In Ubuntu 11.10 any user can suspend the machine from the power menu in the top right of the screen without needing root privileges. How can I suspend as a normal user from a command line?

share|improve this question
Under 11.10 the command pmi action suspend errors out with Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal was not provided by any .service files – detly Apr 11 '12 at 10:26
That's a bug and should be treated as such ;) – Rinzwind Apr 11 '12 at 10:27
@Rinzwind - I thought it may have been a bug of the "get it out of the repos" kind :P – detly Apr 11 '12 at 10:30
I guess someone should create a .service file for org.freedesktop.Hal Noooooo idea how though :D… see the comment by zolti in his answer. Does that work for you? – Rinzwind Apr 11 '12 at 10:33
Here's the bug – detly Apr 11 '12 at 10:41

There is a new answer to this at How can I suspend/hibernate from command line?. You can suspend your machine (if it supports that) without any password by typing

dbus-send --system --print-reply \
    --dest="org.freedesktop.UPower" \
    /org/freedesktop/UPower \

This works for me on Ubuntu 12.04. Credits to Adam who posted the answer over there.

share|improve this answer
This only works with root for me, on Xubuntu 13.04. – tsbertalan Mar 16 '14 at 21:38
on 15.10 I get Error org.freedesktop.DBus.Error.UnknownMethod: Method "Suspend" with signature "" on interface "org.freedesktop.UPower" doesn't exist – MalcolmOcean Jun 20 at 8:01

Test your system if it supports the pm-suspend command with the following simple script:

for m in --suspend --hibernate --suspend-hybrid 
  echo -n "$m: "
  if pm-is-supported $m; then echo "supported"; else echo "not supported"; fi

Sample output:

--suspend: supported
--hibernate: supported
--suspend-hybrid: not supported

If you have --suspend: supported you should be able to suspend your system with sudo pm-suspend.

share|improve this answer
Your answer requires sudo — please read the question again :) – detly Apr 11 '12 at 10:17
You're right, although the test does not... but anyway I understand this is not what you're after. – lgarzo Apr 11 '12 at 10:21

I'm doing this successfully with the powermanagement-interface package and "pmi action suspend" in 12.10. Perhaps the problem you were having has been corrected in updates.

share|improve this answer

Most functions in system dbus will need root power. So this should work well (tested on Ubuntu 14.04):

dbus-send --session --dest=com.canonical.Unity \
 /com/canonical/Unity/Session \

This may work too:

dbus-send --session --dest=org.gnome.SessionManager \
 /org/gnome/SessionManager \

Install d-feet tool and browse DBus for all available options.

share|improve this answer

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.