7

I'm using Crunchbang Waldorf with the Jessie repositories, and suspend functionality has recently been broken. It seems that UPower, the tool Crunchbang used to suspend, just removed suspend functionality.

The suspend command executes like this:

jaapz at jipjip in ~  
$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend   
Error org.freedesktop.DBus.Error.UnknownMethod: Method "Suspend" with signature "" on interface "org.freedesktop.UPower" doesn't exist

I cannot find why the suspend functionality has just disappeared, does anyone know a solution?

slm
  • 363,520
  • 117
  • 767
  • 871
jaapz
  • 584
  • 1
  • 4
  • 9
  • Maybe the function has been renamed. Can you try "hibernate" instead of "suspend"? Which version of upower do you use? On 1st of Sept there where some upgrades. [This diff](http://cgit.freedesktop.org/upower/commit/?id=657331063761bad6e7c608585a30ea18c6fdcf71) shows that hibernate is maybe the new keyword – PythoNic Sep 09 '14 at 12:37
  • Afaik hibernate and suspend are both gone. – jaapz Sep 10 '14 at 11:52
  • 1
    And "hibernate" is never a synonym of "suspend": they're two quite different functions. – Auspex Oct 14 '14 at 15:11

2 Answers2

6

Upower no longer handles suspend/resume. That's done by logind.

Of course, I have what I believe to be the correct version of systemd (which provides logind) and the correct version of upower, and I still have problems (though not with crunchbang).

In any case, make sure you have at least systemd=215-5+b1, libpam-systemd=215-5+b1 and policykit-1=0.105-7

$ qdbus --system org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.CanSuspend
yes
$ qdbus --system org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Suspend true

ETA: apparently you also need systemd-sysv, which is going to break upstart if you have it (it may be a good enough replacement, but there are some things that still require upstart)

Auspex
  • 465
  • 3
  • 12
3

Might be better to try:

dbus-send --print-reply --system --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Suspend boolean:true
Vlastimil Burián
  • 27,586
  • 56
  • 179
  • 309
Chris
  • 31
  • 1