You are not logged in.

#1 2020-02-14 00:41:36

feluxe
Member
Registered: 2017-12-21
Posts: 9

IdleAction / IdleActionSec in logind.conf not working

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! smile

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=8192

Unfortunately 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

#2 2020-02-14 08:27:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,712

Re: IdleAction / IdleActionSec in logind.conf not working

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

#3 2020-02-14 14:54:21

feluxe
Member
Registered: 2017-12-21
Posts: 9

Re: IdleAction / IdleActionSec in logind.conf not working

V1del wrote:

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;
V1del wrote:

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! smile

Offline

#4 2020-02-14 15:02:31

progandy
Member
Registered: 2012-05-17
Posts: 3,686

Re: IdleAction / IdleActionSec in logind.conf not working

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 ' |

Offline

Board footer

Powered by FluxBB