Possible Duplicate:
Put 'nix box to sleep from command line?

I found that the solution was to do:

pmi action hibernate

But when I typed in that, it showed:

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

I couldn't go further from here. Please help me to fix the problem.

link|improve this question
feedback

migrated from stackoverflow.com May 18 '11 at 14:29

This question came from our site for professional and enthusiast programmers.

closed as exact duplicate by slhck, studiohack May 19 '11 at 1:04

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

2 Answers

In Ubuntu there's a script which is part of the pm-utils package - /usr/sbin/pm-suspend which can be used to suspend from the command line.

sudo /usr/sbin/pm-suspend

Additionally there is pm-hibernate to hibernate to disk and pm-suspend-hybrid to do a combined hibernate/suspend.

link|improve this answer
feedback

The low level way would be

echo -n mem /sys/power/state

or for suspend-to-disk (hibernate)

echo -n disk /sys/power/state
link|improve this answer
feedback