Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I would like a command I could map to a button or execute within my network.

So far I know the command sudo pm-suspend but I could not make pmi action suspend work on either 12.04 nor 14.04 :

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal was not provided by any .service files

I also used this supposedly cleaner method : dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend

But all these methods have the same apparent result. When I wake my computer, whether on 12.04 or 14.04, some unfinished business glitches the unity launcher and I have to interact with it to "fix it". Glitch

This doesn't happen if I suspend from the unity GUI. Nor does it happen from my laptop where there is a dedicated sleep key. Also there is another clear difference with the GUI method and the above ones, in the clean GUI method (incl my laptop), I have a notification that never appears with the "dirty" methods.


So what function/program/script does unity call when it suspends properly? And how could I map it to a key/event/gesture?

share|improve this question

1 Answer 1

The exact command to suspend your system as a click from the graphical menu in 14.04 would do is:

dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Suspend" boolean:true
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.