Comment 10 for bug 1504254

Revision history for this message
Etienne URBAH (eurbah) wrote :

I apologize, but my comment #9 was wrong :

After more precise testing of 'systemd' version 232-21ubuntu2 from Ubuntu 17.04 Zesty with 'IdleAction=suspend' and 'IdleActionSec=2min' :

'systemd' does NOT unduly suspend my computer when there is an opened user session (OK).

But 'systemd' does NOT systematically suspend my computer 2mn after the last opened user session has been closed.

As a workaround, I am using the attached 'login-screen-suspend.sh' script.
Since '/etc/rc.local' seems to be deprecated, I am starting my script as a 'systemd' service whose '/etc/systemd/system/login-screen-suspend.service' file has following content :

[Unit]
Description=login screen suspend daemon
After=systemd-user-sessions.service

[Service]
Environment="LOGFILE=/var/log/login-screen-suspend.log"
ExecStart=/bin/sh -c "/usr/local/sbin/login-screen-suspend.sh >> $LOGFILE 2>&1"

[Install]
WantedBy=multi-user.target