-   Linux - Desktop (
-   -   Stand-by from command-line (

Weapon S 01-18-2013 03:49 AM

Stand-by from command-line
I'm on Debian Squeeze. I've uninstalled the graphical login manager, and am using the command-line more often.
I'd like to be able to put the PC in stand-by from the command-line. I guess I'd need some ACPI daemon? Currently I have XFCE, and stand-by works properly under it. (Also the power buttons on the keyboard.) So maybe I only have to make sure XFCE's daemon is run, even if X isn't started?
Basic Google searches didn't help, and I don't know what I'm looking for exactly. Any help is welcome.

Snark1994 01-18-2013 06:50 AM

What version of XFCE do you have? I think older versions use HAL, newer versions use UPower. In any event, you can try:


sudo pm-suspend


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

You may not need sudo for the first command if you're in the power group....

towheedm 01-18-2013 06:55 AM

You can use the programs from the pm-utils package. Those are:
  • pm-suspend
  • pm-hibernate, and
  • pm-suspend-hibrid

You can get more help from the manpages:

man pm-action
I've never used them. Hope it works for you.

Weapon S 01-18-2013 11:15 AM

Ok, that works. There's also the packages acpi-support and acpi-fakekeys which seem to be the things you need, if you want to use power keys on your keyboard.

All times are GMT -5. The time now is 02:37 PM.