Ubuntu – Xubuntu 15.04 Cannot Suspend when inactive

xfce4-power-manager

I have Xubuntu 15.04 installed and having some issues with Suspend. It Suspends fine when done from the command line or the shutdown menu or even by closing the lid. I have set the inactivity timer to 15 minutes using xfce power manager for suspend. However, it never suspends because of inactivity. When I log back in after the failure to suspend, I see this message on the top right:
GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied

I have tried some of the solutions online such as the ones here and here but it didn't make a difference.

Anyone has any ideas of things to try. Is there any logs that can tell me what could be wrong.

Best Answer

It looks like your user is not allowed to suspend the PC when not logged in.

Open /usr/share/polkit-1/actions/org.freedesktop.login1.policy
with your favorite editor as root and search for entry
<action id="org.freedesktop.login1.suspend">

Change
<allow_inactive>auth_admin_keep</allow_inactive>
to :
<allow_inactive>yes</allow_inactive>

Related Question