You are not logged in.

#1 2018-08-28 03:28:15

Frat_Papi
Member
Registered: 2018-05-02
Posts: 19

Systemd keeps suspending due to idle even though no idle is occuring

I recently configured suspend-to-disk on my arch linux laptop, everything was working good until I changed my IdleAction to suspend-then-hibernate in my logind.conf file here:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
IdleAction=suspend-then-hibernate
IdleActionSec=15min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%

now every 15 minutes my laptop suspends even when I and using google-chrome or editing code.
here is the part of journalctl where the suspend occurs

Aug 27 17:47:36 ArchLinux sudo[10804]: pam_unix(sudo:session): session opened for user root by (uid=0)
Aug 27 17:47:39 ArchLinux sudo[10804]: pam_unix(sudo:session): session closed for user root
Aug 27 17:50:31 ArchLinux systemd-logind[2401]: System idle. Taking action.
Aug 27 17:50:31 ArchLinux systemd-logind[2401]: Suspending, then hibernating...
Aug 27 17:50:31 ArchLinux NetworkManager[2403]: <info>  [1535406631.3573] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Aug 27 17:50:31 ArchLinux NetworkManager[2403]: <info>  [1535406631.3574] manager: NetworkManager state is now ASLEEP
Aug 27 17:50:31 ArchLinux systemd[1]: Starting Cleanup of Temporary Directories...
Aug 27 17:50:31 ArchLinux NetworkManager[2403]: <info>  [1535406631.3577] device (wlp4s0): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed')
Aug 27 17:50:31 ArchLinux NetworkManager[2403]: <info>  [1535406631.3598] device (wlp4s0): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-state: 'managed')
Aug 27 17:50:31 ArchLinux NetworkManager[2403]: <info>  [1535406631.3602] dhcp4 (wlp4s0): canceled DHCP transaction

any help would be greatly appreciated.

Offline

#2 2018-08-28 03:49:02

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: Systemd keeps suspending due to idle even though no idle is occuring

IdleActionSec=15min

Are you sure you can specify minutes like that?  I checked the man page and couldn't find any answer.  Try using the actual amount of seconds instead of using minutes.

Offline

#3 2018-08-28 04:16:23

Frat_Papi
Member
Registered: 2018-05-02
Posts: 19

Re: Systemd keeps suspending due to idle even though no idle is occuring

I edited the logind file to account for seconds and systemd still seems to think I am idling while doing multiple processes like playing spoitfy while using google chrome and terminator, here is what the status for logind shows if this helps any
[sam@ArchLinux home]$ systemctl status systemd-logind.service
● systemd-logind.service - Login Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static; vendor preset: disabled)
   Active: active (running) since Mon 2018-08-27 23:57:24 EDT; 16min ago
     Docs: man:systemd-logind.service(8)
           man:logind.conf(5)
           https://www.freedesktop.org/wiki/Softwa … emd/logind
           https://www.freedesktop.org/wiki/Softwa … /multiseat
Main PID: 2483 (systemd-logind)
   Status: "Processing requests..."
    Tasks: 1 (limit: 4915)
   Memory: 1.7M
   CGroup: /system.slice/systemd-logind.service
           └─2483 /usr/lib/systemd/systemd-logind

Aug 27 23:57:23 ArchLinux systemd-logind[2483]: Watching system buttons on /dev/input/event1 (Lid Switch)
Aug 27 23:57:23 ArchLinux systemd-logind[2483]: Watching system buttons on /dev/input/event2 (Sleep Button)
Aug 27 23:57:24 ArchLinux systemd-logind[2483]: Watching system buttons on /dev/input/event0 (AT Translated Set 2 keyboard)
Aug 27 23:57:24 ArchLinux systemd-logind[2483]: Watching system buttons on /dev/input/event5 (ThinkPad Extra Buttons)
Aug 27 23:57:24 ArchLinux systemd-logind[2483]: New seat seat0.
Aug 27 23:57:24 ArchLinux systemd[1]: Started Login Service.
Aug 27 23:57:27 ArchLinux systemd-logind[2483]: New session c1 of user sam.
Aug 28 00:12:37 ArchLinux systemd-logind[2483]: System idle. Taking action.
Aug 28 00:12:37 ArchLinux systemd-logind[2483]: Suspending, then hibernating...
Aug 28 00:12:43 ArchLinux systemd-logind[2483]: Operation 'sleep' finished.

Offline

#4 2018-08-28 06:11:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: Systemd keeps suspending due to idle even though no idle is occuring

What desktop session do you use?
(And if the answer isn't gnome, this probably won't work)

Online

#5 2018-08-28 06:29:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Systemd keeps suspending due to idle even though no idle is occuring


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2018-08-28 06:30:29

Frat_Papi
Member
Registered: 2018-05-02
Posts: 19

Re: Systemd keeps suspending due to idle even though no idle is occuring

I use i3 and startx to initialize it, so no desktop manager.

Offline

#7 2018-08-28 06:32:54

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: Systemd keeps suspending due to idle even though no idle is occuring

Then this setting doesn't work, it relies on session signals.
Use eg. xautolock (despite the name) or xidle (AUR) to suspend the system (or do other fancy stuff on idleness)

Online

#8 2018-08-28 16:38:07

Frat_Papi
Member
Registered: 2018-05-02
Posts: 19

Re: Systemd keeps suspending due to idle even though no idle is occuring

I think I found the problem here https://github.com/systemd/systemd/issues/1295
apparently logind doesn't work well with I3 only workstations and needs a DE to properly do idle detection.
thank you seth I am gonna try and use autolock.

Offline

Board footer

Powered by FluxBB