Lightdm shall never suspend the system itself. Instead it should properly report idle status to systemd where a decision can be taken by checking all relevant services, sessions and inhibitors.
In the past I have reported that idle suspend does not work while showing login screen: https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1730606 After upgrade to 20.4 the system keeps suspending when one seat is showing login screen despite of a user is typing on another seat. The workaround here seems to help with the unwanted suspend, and still needs the cron job to override the missing idle hint and to suspend when applicable. Another similar reports mentioning multiseat setup as a victim of the gdm not playing in the team with systemd: https://gitlab.gnome.org/GNOME /gnome-control-center/-/issues/22 ** Bug watch added: gitlab.gnome.org/GNOME/gnome-control-center/-/issues #22 https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/22 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to lightdm in Ubuntu. https://bugs.launchpad.net/bugs/1928305 Title: Lightdm ignores power saving settings; suspends system in 20 minutes regardless of sleep-inactive-ac-timeout parameter Status in lightdm package in Ubuntu: Confirmed Bug description: Dear colleagues, We have discovered an abnormal operation of the lightdm (1.30.0-0ubuntu4~20.04.1) program. 1. When no user is logged in (the initial user selection screen is displayed) the idle system goes into suspend (sleep) mode. The timeout for this event is 20 minutes. 2. I tried to cancel the entering into sleep mode. To do this, I altered the sleep-inactive-ac-timeout and sleep-inactive-battery- timeout parameters to 0. The command sudo -H -u lightdm dbus-launch --exit-with-session gsettings list-recursively org.gnome.settings-daemon.plugins.power gives the output: root@supercat:/home/supercat# sudo -H -u lightdm dbus-launch --exit-with-session gsettings list-recursively org.gnome.settings-daemon.plugins.power No protocol specified org.gnome.settings-daemon.plugins.power lid-close-ac-action 'suspend' org.gnome.settings-daemon.plugins.power time-critical 300 org.gnome.settings-daemon.plugins.power power-button-action 'suspend' org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor false org.gnome.settings-daemon.plugins.power button-hibernate 'hibernate' org.gnome.settings-daemon.plugins.power idle-dim true org.gnome.settings-daemon.plugins.power button-power 'suspend' org.gnome.settings-daemon.plugins.power lid-close-battery-action 'suspend' org.gnome.settings-daemon.plugins.power priority 0 org.gnome.settings-daemon.plugins.power idle-brightness 30 org.gnome.settings-daemon.plugins.power active true org.gnome.settings-daemon.plugins.power critical-battery-action 'hibernate' org.gnome.settings-daemon.plugins.power button-suspend 'suspend' org.gnome.settings-daemon.plugins.power button-sleep 'hibernate' org.gnome.settings-daemon.plugins.power percentage-critical 3 org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0 org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend' org.gnome.settings-daemon.plugins.power ambient-enabled true org.gnome.settings-daemon.plugins.power notify-perhaps-recall true org.gnome.settings-daemon.plugins.power percentage-low 10 org.gnome.settings-daemon.plugins.power percentage-action 2 org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend' org.gnome.settings-daemon.plugins.power time-low 1200 org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0 org.gnome.settings-daemon.plugins.power time-action 120 org.gnome.settings-daemon.plugins.power use-time-for-policy true 3. I checked the result, the system still suspends (goes into sleep mode) in 20 minutes. I checked the IdleAction parameter in /etc/systemd/logind.conf, because it may affect the suspend mode. It is set to ignore. # 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=root #InhibitDelayMaxSec=5 #HandlePowerKey=poweroff #HandleSuspendKey=suspend #HandleHibernateKey=hibernate #HandleLidSwitch=suspend #HandleLidSwitchExternalPower=suspend #HandleLidSwitchDocked=ignore #PowerKeyIgnoreInhibited=no #SuspendKeyIgnoreInhibited=no #HibernateKeyIgnoreInhibited=no #LidSwitchIgnoreInhibited=yes #HoldoffTimeoutSec=30s IdleAction=ignore IdleActionSec=30min #RuntimeDirectorySize=10% #RemoveIPC=yes #InhibitorsMax=8192 #SessionsMax=8192 I came to conclusion that lightdm ignores correctly given setting for not suspending the system (org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0). Commentaries on this finding are welcome. --- ProblemType: Bug ApportVersion: 2.20.11-0ubuntu27.17 Architecture: amd64 CasperMD5CheckResult: skip CurrentDesktop: GNOME DistroRelease: Ubuntu 20.04 Package: lightdm 1.30.0-0ubuntu4~20.04.1 PackageArchitecture: amd64 Tags: focal third-party-packages Uname: Linux 5.4.96-050496-lowlatency x86_64 UpgradeStatus: Upgraded to focal on 2021-02-10 (92 days ago) UserGroups: android audio cdrom dialout dip fax floppy fuse lpadmin netdev plugdev sambashare scanner tape users vboxusers video _MarkForUpload: True modified.conffile..etc.default.apport: # set this to 0 to disable apport, or to 1 to enable it # you can temporarily override this with # sudo service apport start force_start=1 enabled=0 mtime.conffile..etc.default.apport: 2014-03-07T13:05:12.906701 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1928305/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp