You are not logged in.

#1 2021-12-08 04:21:58

Apollo_V
Member
Registered: 2020-08-16
Posts: 8

Random suspends even while system is being used.

Hello all,

I started encountering this issue a month ago and am struggling to find a valid solution.

The Problem: Laptop suspends even when the system is not idle, i.e, playing videos, code compilation, code execution, playing games etc,. This is a new problem to me which I haven't encountered before. Previously, the system used to wait for 50 mins in idle mode then xautolock used to lock the system, then wait for another 10 mins before suspending. I haven't touched this configuration recently so I believe some update might have changed systemd-logind behavior (I might be wrong here).

System:

WM : DWM
kernel : 5.15.6

Things I've tried : My first thought was a change in the configuration file /etc/systemd/logind.conf, but nothing seemed off, even then I've changed few things and my current conf file is :

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#HandlePowerKey=poweroff
HandleSuspendKey=ignore
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=ignore
#HandleLidSwitchDocked=ignore
#HandleRebootKey=reboot
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
IdleAction=ignore
IdleActionSec=24000
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodes=400k
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192

xautolock options in my xintrc file

xautolock -time 50 -locker slock -killtime 10 -killer "systemctl suspend" -corners -+00 -secure

Changing few conf options in /etc/systemd/logind.conf atleast made the suspends stop while playing games but still suspended during compilations, aur builds and executions, videos etc.,

I am not sure how to proceed from here. Few resources online have suggested to mask sleep.target suspend.target hibernate.target hybrid-sleep.target but I'm not sure that's a proper way to go. I'm stumped as to why the setup suddenly stopped working. Please comment any suggestions you might have. Thanks in advance.

Related outputs:
systemctl status systemd-logind

● systemd-logind.service - User Login Management
     Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static)
     Active: active (running) since Mon 2021-12-06 18:24:37 PST; 1 day 1h ago
       Docs: man:sd-login(3)
             man:systemd-logind.service(8)
             man:logind.conf(5)
             man:org.freedesktop.login1(5)
   Main PID: 962 (systemd-logind)
     Status: "Processing requests..."
      Tasks: 1 (limit: 18746)
     Memory: 2.0M
        CPU: 329ms
     CGroup: /system.slice/systemd-logind.service
             └─962 /usr/lib/systemd/systemd-logind

Dec 06 18:24:42 Olympus systemd-logind[962]: New session 1 of user uname.
Dec 07 08:37:33 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 08:37:44 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 09:05:28 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 10:54:17 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 11:45:59 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 12:03:01 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 15:00:08 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 15:00:25 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 18:44:45 Olympus systemd-logind[962]: Operation 'sleep' finished.

journalctl -b -u systemd-suspend.service

-- Journal begins at Wed 2020-08-26 21:02:55 PDT, ends at Tue 2021-12-07 20:00:10 PST. --
Dec 06 22:04:24 Olympus systemd[1]: Starting System Suspend...
Dec 06 22:04:24 Olympus systemd-sleep[659403]: Entering sleep state 'suspend'...
Dec 07 08:37:33 Olympus systemd-sleep[659403]: System returned from sleep state.
Dec 07 08:37:33 Olympus systemd[1]: systemd-suspend.service: Deactivated successfully.
Dec 07 08:37:33 Olympus systemd[1]: Finished System Suspend.
Dec 07 08:37:33 Olympus systemd[1]: Starting System Suspend...
Dec 07 08:37:33 Olympus systemd-sleep[659911]: Entering sleep state 'suspend'...
Dec 07 08:37:44 Olympus systemd-sleep[659911]: System returned from sleep state.
Dec 07 08:37:44 Olympus systemd[1]: systemd-suspend.service: Deactivated successfully.
Dec 07 08:37:44 Olympus systemd[1]: Finished System Suspend.
Dec 07 09:05:20 Olympus systemd[1]: Starting System Suspend...
Dec 07 09:05:20 Olympus systemd-sleep[745589]: Entering sleep state 'suspend'...
Dec 07 09:05:28 Olympus systemd-sleep[745589]: System returned from sleep state.
Dec 07 09:05:28 Olympus systemd[1]: systemd-suspend.service: Deactivated successfully.
Dec 07 09:05:28 Olympus systemd[1]: Finished System Suspend.
Dec 07 10:54:10 Olympus systemd[1]: Starting System Suspend...
Dec 07 10:54:10 Olympus systemd-sleep[1074544]: Entering sleep state 'suspend'...
Dec 07 10:54:17 Olympus systemd-sleep[1074544]: System returned from sleep state.
Dec 07 10:54:17 Olympus systemd[1]: systemd-suspend.service: Deactivated successfully.
Dec 07 10:54:17 Olympus systemd[1]: Finished System Suspend.
Dec 07 11:43:58 Olympus systemd[1]: Starting System Suspend...
Dec 07 11:43:58 Olympus systemd-sleep[1224025]: Entering sleep state 'suspend'...
Dec 07 11:45:59 Olympus systemd-sleep[1224025]: System returned from sleep state.
Dec 07 11:45:59 Olympus systemd[1]: systemd-suspend.service: Deactivated successfully.
Dec 07 11:45:59 Olympus systemd[1]: Finished System Suspend.
Dec 07 11:57:55 Olympus systemd[1]: Starting System Suspend...
Dec 07 11:57:55 Olympus systemd-sleep[1260287]: Entering sleep state 'suspend'...
Dec 07 12:03:01 Olympus systemd-sleep[1260287]: System returned from sleep state.
Dec 07 12:03:01 Olympus systemd[1]: systemd-suspend.service: Deactivated successfully.
Dec 07 12:03:01 Olympus systemd[1]: Finished System Suspend.
Dec 07 14:03:58 Olympus systemd[1]: Starting System Suspend...
Dec 07 14:03:58 Olympus systemd-sleep[1625579]: Entering sleep state 'suspend'...
Dec 07 15:00:08 Olympus systemd-sleep[1625579]: System returned from sleep state.
Dec 07 15:00:08 Olympus systemd[1]: systemd-suspend.service: Deactivated successfully.
Dec 07 15:00:08 Olympus systemd[1]: Finished System Suspend.
Dec 07 15:00:08 Olympus systemd[1]: Starting System Suspend...
Dec 07 15:00:08 Olympus systemd-sleep[1626041]: Entering sleep state 'suspend'...
Dec 07 15:00:25 Olympus systemd-sleep[1626041]: System returned from sleep state.
Dec 07 15:00:25 Olympus systemd[1]: systemd-suspend.service: Deactivated successfully.
Dec 07 15:00:25 Olympus systemd[1]: Finished System Suspend.
Dec 07 18:44:39 Olympus systemd[1]: Starting System Suspend...
Dec 07 18:44:39 Olympus systemd-sleep[2302746]: Entering sleep state 'suspend'...
Dec 07 18:44:45 Olympus systemd-sleep[2302746]: System returned from sleep state.
Dec 07 18:44:45 Olympus systemd[1]: systemd-suspend.service: Deactivated successfully.
Dec 07 18:44:45 Olympus systemd[1]: Finished System Suspend.

journalctl -b -u systemd-logind

-- Journal begins at Wed 2020-08-26 21:02:55 PDT, ends at Tue 2021-12-07 20:00:10 PST. --
Dec 06 18:24:37 Olympus systemd[1]: Starting User Login Management...
Dec 06 18:24:37 Olympus systemd-logind[962]: New seat seat0.
Dec 06 18:24:37 Olympus systemd-logind[962]: Watching system buttons on /dev/input/event2 (Power Button)
Dec 06 18:24:37 Olympus systemd-logind[962]: Watching system buttons on /dev/input/event1 (Lid Switch)
Dec 06 18:24:37 Olympus systemd-logind[962]: Watching system buttons on /dev/input/event0 (Sleep Button)
Dec 06 18:24:37 Olympus systemd-logind[962]: Watching system buttons on /dev/input/event3 (AT Translated Set 2 keyboard)
Dec 06 18:24:37 Olympus systemd-logind[962]: Watching system buttons on /dev/input/event4 (ThinkPad Extra Buttons)
Dec 06 18:24:37 Olympus systemd[1]: Started User Login Management.
Dec 06 18:24:38 Olympus systemd-logind[962]: Watching system buttons on /dev/input/event25 (SONiX USB DEVICE)
Dec 06 18:24:38 Olympus systemd-logind[962]: Watching system buttons on /dev/input/event26 (SONiX USB DEVICE Keyboard)
Dec 06 18:24:39 Olympus systemd-logind[962]: Watching system buttons on /dev/input/event28 (Logitech B330/M330/M3)
Dec 06 18:24:42 Olympus systemd-logind[962]: New session 1 of user uname.
Dec 07 08:37:33 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 08:37:44 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 09:05:28 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 10:54:17 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 11:45:59 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 12:03:01 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 15:00:08 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 15:00:25 Olympus systemd-logind[962]: Operation 'sleep' finished.
Dec 07 18:44:45 Olympus systemd-logind[962]: Operation 'sleep' finished.

Let me know if any other info or output is needed.

Offline

Board footer

Powered by FluxBB