mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
logind: don't setup idle session watch for lock-screen and greeter
Reason to skip the idle session logic for these session classes is that they are idle by default.
This commit is contained in:
parent
b4a9d19e4e
commit
508b4786e8
@ -379,10 +379,11 @@
|
||||
<term><varname>StopIdleSessionSec=</varname></term>
|
||||
|
||||
<listitem><para>Specifies a timeout in seconds, or a time span value after which
|
||||
<filename>systemd-logind</filename> checks the idle state of all sessions. Every session that is idle for
|
||||
longer then the timeout will be stopped. Defaults to <literal>infinity</literal>
|
||||
(<filename>systemd-logind</filename> is not checking the idle state of sessions). For details about the syntax
|
||||
of time spans, see
|
||||
<filename>systemd-logind</filename> 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
|
||||
<literal>greeter</literal> or <literal>lock-screen</literal> sessions. Defaults to
|
||||
<literal>infinity</literal> (<filename>systemd-logind</filename> is not checking the idle state
|
||||
of sessions). For details about the syntax of time spans, see
|
||||
<citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
|
||||
</para>
|
||||
|
||||
|
@ -738,7 +738,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(
|
||||
|
Loading…
Reference in New Issue
Block a user