diff --git a/man/logind.conf.xml b/man/logind.conf.xml
index 56981c1837..6cb41b6955 100644
--- a/man/logind.conf.xml
+++ b/man/logind.conf.xml
@@ -343,10 +343,11 @@
StopIdleSessionSec=
Specifies a timeout in seconds, or a time span value after which
- systemd-logind checks the idle state of all sessions. Every session that is idle for
- longer then the timeout will be stopped. Defaults to infinity
- (systemd-logind is not checking the idle state of sessions). For details about the syntax
- of time spans, see
+ systemd-logind checks the idle state of all sessions. Every session that is idle
+ for longer than the timeout will be stopped. Note that this option doesn't apply to
+ greeter or lock-screen sessions. Defaults to
+ infinity (systemd-logind is not checking the idle state
+ of sessions). For details about the syntax of time spans, see
systemd.time7.
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 4edc4b9b88..57b9696d1d 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -713,7 +713,7 @@ static int session_setup_stop_on_idle_timer(Session *s) {
assert(s);
- if (s->manager->stop_idle_session_usec == USEC_INFINITY)
+ if (s->manager->stop_idle_session_usec == USEC_INFINITY || IN_SET(s->class, SESSION_GREETER, SESSION_LOCK_SCREEN))
return 0;
r = sd_event_add_time_relative(