logind correctly says hibernation is not available: $ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanHibernate ('na',) $ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanHybridSleep ('na',) When I try to hibernate from the dialog, xfsm-shutdown-helper crashes: # coredumpctl -1 info PID: 533 (xfsm-shutdown-h) UID: 0 (root) GID: 0 (root) Signal: 11 (SEGV) Timestamp: Fri 2017-06-30 10:21:31 -03 (1min 43s ago) Command Line: /usr/lib/xfce4/session/xfsm-shutdown-helper --hibernate Executable: /usr/lib/xfce4/session/xfsm-shutdown-helper Control Group: /user.slice/user-1000.slice/session-c1.scope Unit: session-c1.scope Slice: user-1000.slice Session: c1 Owner UID: 1000 (marcos) Boot ID: 7e4a0d5299294e78ac98d72c15080ffa Machine ID: 5e941632ec3847a3b48a6d428267b01d Hostname: arch Storage: /var/lib/systemd/coredump/core.xfsm-shutdown-h.0.7e4a0d5299294e78ac98d72c15080ffa.533.1498828891000000000000.lz4 Message: Process 533 (xfsm-shutdown-h) of user 0 dumped core. Stack trace of thread 533: #0 0x00007fb6085fc348 __libc_free (libc.so.6) #1 0x00007fb608959d72 g_error_free (libglib-2.0.so.0) #2 0x0000000000400d43 n/a (xfsm-shutdown-helper) #3 0x0000000000400b6e n/a (xfsm-shutdown-helper) #4 0x00007fb60859f43a __libc_start_main (libc.so.6) #5 0x0000000000400c4a n/a (xfsm-shutdown-helper) I am running Arch, with xfce4-session 4.12.1-7, systemd 232-8. Expected behaviour: do not show "Hibernate" button.
Implementation example of logind's Can* methods: https://git.gnome.org/browse/gnome-session/tree/gnome-session/gsm-systemd.c
I can confirm the behavior with xfce4-session 4.13 too. By reading the code, xfsm check the capabilities : https://git.xfce.org/xfce/xfce4-session/tree/xfce4-session/xfsm-systemd.c#n130 So it shouldn't display the Hybernate/Hybrid etc buttons if not available…
I could not find any reference to org.freedesktop.login1.Manager.Can* methods. polkit_authority_check_authorization_sync() just check if user is authorized to perform the action.
*** Bug 14867 has been marked as a duplicate of this bug. ***
Possible solution in https://bugzilla.xfce.org/show_bug.cgi?id=14707 .
*** This bug has been marked as a duplicate of bug 14707 ***
It's a bit weird that an older bug is marked as duplicate of a newer one. But OK, doesn't matter that much.