0

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.

0

2 Answers 2

5

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.

3

The low level way would be

echo -n mem > /sys/power/state

or for suspend-to-disk (hibernate)

echo -n disk > /sys/power/state

The available modes can be found by

cat /sys/power/state