You are not logged in.
Hi there,
I'm trying to configure suspend on idle for my laptop.
I can run the following commands from the command line without issues:
* systemctl suspend
* systemctl suspend-then-hibernate
* systemctl hibernate
Even `suspend-then-hibernate` works as expected, awesome! ![]()
In order to `suspend-then-hibernate` on 2 minutes of inactivity I tried to change `IdleAction` and `IdleActionSec` in `/etc/systemd/logind.conf`:
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend-then-hibernate
HandleLidSwitchExternalPower=suspend-then-hibernate
HandleLidSwitchDocked=suspend-then-hibernate
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
IdleAction=suspend-then-hibernate
IdleActionSec=120
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192Unfortunately this doesn't work and I couldn't figure out why.
I use i3wm as a DE.
Does anyone know how to fix/debug this?
Last edited by feluxe (2020-02-14 00:42:38)
Offline
How are you starting i3? FWIW If I'm not mistaken i3 doesn't actually set the Idle Information that would make this work anyway, even if you do start it correctly to have a proper session, but my info on that could be dated.
Offline
How are you starting i3?
I think it's started via `/usr/share/xsessions/i3.desktop`:
[Desktop Entry]
Name=i3
Comment=improved dynamic tiling window manager
Exec=i3
TryExec=i3
Type=Application
X-LightDM-DesktopName=i3
DesktopNames=i3
Keywords=tiling;wm;windowmanager;window;manager;If I'm not mistaken i3 doesn't actually set the Idle Information that would make this work anyway, even if you do start it correctly to have a proper session
Hmm, that's unfortunate...
I think I'll omit `logind.conf` then. I'll bake my own script based on `xprintidle`...
Thanks for the info! ![]()
Offline
If you wish to use the systemd IdleAction, then you can set up xss-lock to run a screenlocker. It also sets the systemd idle status.
https://wiki.archlinux.org/index.php/Se … activity_2
https://wiki.archlinux.org/index.php/Po … t#xss-lock
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
How are you starting i3?
Hi, I know this is an old post, but I am having similar issues. I've had some issues with other methods of auto suspend (like using xss-lock etc) to get exactly what I desire, so I was wondering if depending on how I start i3, would it make a difference?
I set IdleAction=suspend in the logind.conf file. But it doesn't work. I have xset in a particular way so that it will lock the screen after 10 mins, and will wait for a 15 sec period for me to do react before it actually locks the session. But I have not found a way to have this working along with a suspend after lets say 20 mins. When I use something something like xss-lock, then after the session is locked (as in my user is locked and would need a password to log back in), the os does suspend, but it has some permission issues, like each time after it suspends, when I log back in I get the polkit popup asking for password to suspend. Initially I ignored it, but sometimes when I open it I see not just one of them, sometimes there are lots of these polkit password popus, it kinda gets annoying so I decided to completely ditch after attempts of trying to figure out how to fix it.
But I still haven't found a satisfactory way to suspend but also keeping the xset working the same way.
Offline