You are not logged in.

#1 2014-04-28 20:38:18

gravgun
Member
Registered: 2014-04-28
Posts: 1

[SOLVED] DBus Permission denied when suspend/hibernate

Hi everybody,
since the upower 0.99 update, which deleted deprecated DBus methods for power management (which in turn broke xfce4-power-manager for some time, now fixed), I can't suspend or hibernate properly.
Using xfce4-session-logout and clicking "Suspend"/"Hibernate" or manually using d-feet to trigger org.freedesktop.login1.Manager.Suspend (with parameter ['true']) gives the following error:

GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied

I'm pretty sure this problem comes from either polkit or PAM as I could read here (the same happened on Xubuntu apparently) but I am a complete noob with these two things.
Probably this comes from non-updated config in /etc/pam.d/, I guess...
Any pointers?

Auto-solved: polkit was the culprit: just took the first example on https://wiki.archlinux.org/index.php/Polkit#Examples, and made it return YES:

polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.login1.suspend" ||
        action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
        action.id == "org.freedesktop.login1.hibernate" ||
        action.id == "org.freedesktop.login1.hibernate-multiple-sessions") {
        return polkit.Result.YES;
    }
});

Last edited by gravgun (2014-04-28 21:23:50)

Offline

Board footer

Powered by FluxBB