-<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-
-<!--
- This file is part of systemd.
-
- Copyright 2010 Lennart Poettering
-
- 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.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
--->
+<?xml version='1.0'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+<!-- SPDX-License-Identifier: LGPL-2.1+ -->
<refentry id="logind.conf" conditional='ENABLE_LOGIND'
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>logind.conf</title>
<productname>systemd</productname>
-
- <authorgroup>
- <author>
- <contrib>Developer</contrib>
- <firstname>Lennart</firstname>
- <surname>Poettering</surname>
- <email>lennart@poettering.net</email>
- </author>
- </authorgroup>
</refentryinfo>
<refmeta>
<refsect1>
<title>Description</title>
- <para>These files configure various parameters of the systemd
- login manager,
- <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
- </para>
+ <para>These files configure various parameters of the systemd login manager,
+ <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. See
+ <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ for a general description of the syntax.</para>
</refsect1>
<xi:include href="standard-conf.xml" xpointer="main-conf" />
<para>All options are configured in the
<literal>[Login]</literal> section:</para>
- <variablelist>
+ <variablelist class='config-directives'>
<varlistentry>
<term><varname>NAutoVTs=</varname></term>
corresponding to the session and all processes inside that scope will be
terminated. If false, the scope is "abandoned", see
<citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- and processes are not killed. Defaults to <literal>yes</literal>,
+ and processes are not killed. Defaults to <literal>&KILL_USER_PROCESSES;</literal>,
but see the options <varname>KillOnlyUsers=</varname> and
<varname>KillExcludeUsers=</varname> below.</para>
<literal>kexec</literal>,
<literal>suspend</literal>,
<literal>hibernate</literal>,
- <literal>hybrid-sleep</literal>, and
+ <literal>hybrid-sleep</literal>,
+ <literal>suspend-then-hibernate</literal>, and
<literal>lock</literal>.
Defaults to <literal>ignore</literal>.</para>
5.</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term><varname>UserStopDelaySec=</varname></term>
+
+ <listitem><para>Specifies how long to keep the user record and per-user service
+ <filename>user@.service</filename> around for a user after they logged out fully. If set to zero, the per-user
+ service is terminated immediately when the last session of the user has ended. If this option is configured to
+ non-zero rapid logout/login cycles are sped up, as the user's service manager is not constantly restarted. If
+ set to <literal>infinity</literal> the per-user service for a user is never terminated again after first login,
+ and continues to run until system shutdown. Defaults to 10s.</para></listitem>
+ </varlistentry>
+
<varlistentry>
<term><varname>HandlePowerKey=</varname></term>
<term><varname>HandleSuspendKey=</varname></term>
<term><varname>HandleHibernateKey=</varname></term>
<term><varname>HandleLidSwitch=</varname></term>
+ <term><varname>HandleLidSwitchExternalPower=</varname></term>
<term><varname>HandleLidSwitchDocked=</varname></term>
<listitem><para>Controls how logind shall handle the
<literal>kexec</literal>,
<literal>suspend</literal>,
<literal>hibernate</literal>,
- <literal>hybrid-sleep</literal>, and
+ <literal>hybrid-sleep</literal>,
+ <literal>suspend-then-hibernate</literal>, and
<literal>lock</literal>.
If <literal>ignore</literal>, logind will never handle these
keys. If <literal>lock</literal>, all running sessions will be
<varname>HandleSuspendKey=</varname> and
<varname>HandleLidSwitch=</varname> default to
<literal>suspend</literal>.
- <varname>HandleLidSwitchDocked=</varname> defaults to
- <literal>ignore</literal>.
+ <varname>HandleLidSwitchExternalPower=</varname> is completely
+ ignored by default (for backwards compatibility) — an explicit
+ value must be set before it will be used to determine
+ behaviour. <varname>HandleLidSwitchDocked=</varname> defaults
+ to <literal>ignore</literal>.
<varname>HandleHibernateKey=</varname> defaults to
<literal>hibernate</literal>. If the system is inserted in a
docking station, or if more than one display is connected, the
action specified by <varname>HandleLidSwitchDocked=</varname>
+ occurs; if the system is on external power the action (if any)
+ specified by <varname>HandleLidSwitchExternalPower=</varname>
occurs; otherwise the <varname>HandleLidSwitch=</varname>
action occurs.</para>
<para>A different application may disable logind's handling of system power and
sleep keys and the lid switch by taking a low-level inhibitor lock
- ("handle-power-key", "handle-suspend-key", "handle-hibernate-key",
- "handle-lid-switch"). This is most commonly used by graphical desktop environments
+ (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
+ <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>).
+ This is most commonly used by graphical desktop environments
to take over suspend and hibernation handling, and to use their own configuration
mechanisms. If a low-level inhibitor lock is taken, logind will not take any
action when that key or switch is triggered and the <varname>Handle*=</varname>
<listitem><para>Controls whether actions that <command>systemd-logind</command>
takes when the power and sleep keys and the lid switch are triggered are subject
to high-level inhibitor locks ("shutdown", "sleep", "idle"). Low level inhibitor
- locks ("handle-*-key" and "handle-lid-switch"), are always honored,
- irrespective of this setting.</para>
+ locks (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
+ <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>),
+ are always honored, irrespective of this setting.</para>
<para>These settings take boolean arguments. If <literal>no</literal>, the
inhibitor locks taken by applications are respected. If <literal>yes</literal>,
memory as is needed.</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term><varname>RuntimeDirectoryInodesMax=</varname></term>
+
+ <listitem><para>Sets the limit on number of inodes for the
+ <varname>$XDG_RUNTIME_DIR</varname> runtime directory for each
+ user who logs in. Takes a number, optionally suffixed with the
+ usual K, G, M, and T suffixes, to the base 1024 (IEC).
+ Defaults to <varname>RuntimeDirectorySize=</varname> divided
+ by 4096. Note that this size is a safety limit only.
+ As each runtime directory is a tmpfs file system, it will
+ only consume as much memory as is needed.</para></listitem>
+ </varlistentry>
+
<varlistentry>
<term><varname>InhibitorsMax=</varname></term>
<filename>systemd-logind</filename>.</para></listitem>
</varlistentry>
- <varlistentry>
- <term><varname>UserTasksMax=</varname></term>
-
- <listitem><para>Sets the maximum number of OS tasks each user may run concurrently. This controls the
- <varname>TasksMax=</varname> setting of the per-user slice unit, see
- <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
- for details. If assigned the special value <literal>infinity</literal>, no tasks limit is applied.
- Defaults to 33%, which equals 10813 with the kernel's defaults on the host, but might be smaller in
- OS containers.</para></listitem>
- </varlistentry>
-
<varlistentry>
<term><varname>RemoveIPC=</varname></term>