So I've found this useful post on XFCE forums.
I followed along with the thread, and here are the relevant outputs I got:
Code: Select all
$ groups
andoru cdrom floppy sudo audio dip video plugdev vboxusers netdev
Code: Select all
$ cat /etc/systemd/logind.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
HandlePowerKey=suspend
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=ignore
HandleRebootKey=reboot
PowerKeyIgnoreInhibited=no
SuspendKeyIgnoreInhibited=no
HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodes=400k
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
Code: Select all
# journalctl --no-pager -u polkit | grep FAILED
[...]
Feb 11 01:34:22 polkitd(authority=local)[598]: Operator of unix-session:2 FAILED to authenticate to gain authorization for action org.freedesktop.login1.suspend for system-bus-name::1.35 [xfce4-power-manager] (owned by unix-user:andoru)
Feb 12 21:11:59 polkitd(authority=local)[598]: Operator of unix-session:2 FAILED to authenticate to gain authorization for action org.freedesktop.login1.suspend for system-bus-name::1.35 [xfce4-power-manager] (owned by unix-user:andoru)
Feb 13 05:12:42 polkitd(authority=local)[598]: Operator of unix-session:2 FAILED to authenticate to gain authorization for action org.freedesktop.login1.suspend for system-bus-name::1.35 [xfce4-power-manager] (owned by unix-user:andoru)
Then I looked at how I should make polkit rules on Debian, and made this file:
Code: Select all
$ cat /usr/share/polkit-1/rules.d/10-suspend.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.suspend" &&
subject.isInGroup("users")) {
return polkit.Result.YES;
}
});
What gives? Is there something I'm missing?
I've also tried killing light-locker as was instructed in the thread linked above, and it did seem to want to suspend without password confirmation, but this time I got this message:
So it still wouldn't suspend automatically, when it's actually supposed to... aside for the blow to security.