Comment 3 for bug 1730606

Revision history for this message
amk (9-launchpad-mikus-sk) wrote :

After upgrade to Ubuntu version 20.4 the issue with the idle status reporting by lightdm-greeter remains. This continues to have idle setting of logind.conf ignored:

https://www.freedesktop.org/software/systemd/man/logind.conf.html
> Note that this requires that user sessions correctly report the idle status to the system. The system will execute the action after *all sessions* report that they are idle, no idle inhibitor lock is active, and subsequently, the time configured with IdleActionSec= (see below) has expired.

At the other hand, installing lightdm and unity-greeter causes suspend to happen every 20 minutes while one screen shows greeter, regardless of all other screens. Reported also at https://askubuntu.com/questions/1337649/how-to-disable-suspend-in-20-minutes-from-the-lightdm-login-screen and as https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1928305

There is a workaround available there (set both org.gnome.settings-daemon.plugins.power and com.canonical.unity.settings-daemon.plugins.power sleep-inactive-ac-type to 'nothing'), preventing the unexpected suspend by greeter. Issue of this bug remains since the greeter still does not report idle to logind.

The script to check idle status of all session and force suspend overriding login screen needs update, systemd-inhibit --list does not have parseable output, like it was the case in systemd version 229. Needed to be replaced by command
gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.ListInhibitors

There are several other reports of this problem, for example also at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896083 or https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/22 but I am not sure about be the best upstream place to track this. It looks like gdm/lightdm greeter is not designed to work under logind but attempts to control the system sleep status on its own.