]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/logind.conf.xml
man: use <simplelist> for 'See also' sections
[thirdparty/systemd.git] / man / logind.conf.xml
CommitLineData
514094f9 1<?xml version='1.0'?>
3a54a157 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
c7f7e859
MK
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4<!ENTITY % entities SYSTEM "custom-entities.ent" >
5%entities;
6]>
db9ecf05 7<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
8fa365e5 8
d3fae78f 9<refentry id="logind.conf" conditional='ENABLE_LOGIND'
798d3a52
ZJS
10 xmlns:xi="http://www.w3.org/2001/XInclude">
11 <refentryinfo>
12 <title>logind.conf</title>
13 <productname>systemd</productname>
798d3a52
ZJS
14 </refentryinfo>
15
16 <refmeta>
17 <refentrytitle>logind.conf</refentrytitle>
18 <manvolnum>5</manvolnum>
19 </refmeta>
20
21 <refnamediv>
22 <refname>logind.conf</refname>
23 <refname>logind.conf.d</refname>
24 <refpurpose>Login manager configuration files</refpurpose>
25 </refnamediv>
26
27 <refsynopsisdiv>
73e97bb0
ZJS
28 <para><simplelist>
29 <member><filename>/etc/systemd/logind.conf</filename></member>
30 <member><filename>/etc/systemd/logind.conf.d/*.conf</filename></member>
31 <member><filename>/run/systemd/logind.conf.d/*.conf</filename></member>
32 <member><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></member>
33 </simplelist></para>
798d3a52
ZJS
34 </refsynopsisdiv>
35
36 <refsect1>
37 <title>Description</title>
38
0f943ae4
ZJS
39 <para>These files configure various parameters of the systemd login manager,
40 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. See
675fa6ea 41 <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry>
0f943ae4 42 for a general description of the syntax.</para>
798d3a52
ZJS
43 </refsect1>
44
e93549ef 45 <xi:include href="standard-conf.xml" xpointer="main-conf" />
798d3a52
ZJS
46
47 <refsect1>
48 <title>Options</title>
49
50 <para>All options are configured in the
bdac5608 51 [Login] section:</para>
798d3a52 52
d2acdcc6 53 <variablelist class='config-directives'>
798d3a52
ZJS
54
55 <varlistentry>
56 <term><varname>NAutoVTs=</varname></term>
57
58 <listitem><para>Takes a positive integer. Configures how many
59 virtual terminals (VTs) to allocate by default that, when
60 switched to and are previously unused,
61 <literal>autovt</literal> services are automatically spawned
62 on. These services are instantiated from the template unit
63 <filename>autovt@.service</filename> for the respective VT TTY
64 name, for example, <filename>autovt@tty4.service</filename>.
65 By default, <filename>autovt@.service</filename> is linked to
66 <filename>getty@.service</filename>. In other words, login
67 prompts are started dynamically as the user switches to unused
68 virtual terminals. Hence, this parameter controls how many
69 login <literal>gettys</literal> are available on the VTs. If a
70 VT is already used by some other subsystem (for example, a
71 graphical login), this kind of activation will not be
72 attempted. Note that the VT configured in
73 <varname>ReserveVT=</varname> is always subject to this kind
74 of activation, even if it is not one of the VTs configured
75 with the <varname>NAutoVTs=</varname> directive. Defaults to
76 6. When set to 0, automatic spawning of
77 <literal>autovt</literal> services is
78 disabled.</para></listitem>
79 </varlistentry>
80
81 <varlistentry>
82 <term><varname>ReserveVT=</varname></term>
83
84 <listitem><para>Takes a positive integer. Identifies one
85 virtual terminal that shall unconditionally be reserved for
86 <filename>autovt@.service</filename> activation (see above).
87 The VT selected with this option will be marked busy
88 unconditionally, so that no other subsystem will allocate it.
89 This functionality is useful to ensure that, regardless of how
90 many VTs are allocated by other subsystems, one login
91 <literal>getty</literal> is always available. Defaults to 6
92 (in other words, there will always be a
93 <literal>getty</literal> available on Alt-F6.). When set to 0,
ec07c3c8
AK
94 VT reservation is disabled.</para>
95
96 <xi:include href="version-info.xml" xpointer="v190"/></listitem>
798d3a52
ZJS
97 </varlistentry>
98
99 <varlistentry>
100 <term><varname>KillUserProcesses=</varname></term>
101
65eb37f8
ZJS
102 <listitem><para>Takes a boolean argument. Configures whether the processes of a
103 user should be killed when the user logs out. If true, the scope unit
104 corresponding to the session and all processes inside that scope will be
4f25723c 105 terminated. If false, the scope is "abandoned", see
65eb37f8 106 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
c7f7e859 107 and processes are not killed. Defaults to <literal>&KILL_USER_PROCESSES;</literal>,
921f831d
ZJS
108 but see the options <varname>KillOnlyUsers=</varname> and
109 <varname>KillExcludeUsers=</varname> below.</para>
65eb37f8
ZJS
110
111 <para>In addition to session processes, user process may run under the user
112 manager unit <filename>user@.service</filename>. Depending on the linger
113 settings, this may allow users to run processes independent of their login
114 sessions. See the description of <command>enable-linger</command> in
115 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
116 </para>
117
118 <para>Note that setting <varname>KillUserProcesses=yes</varname>
798d3a52 119 will break tools like
65eb37f8
ZJS
120 <citerefentry project='die-net'><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>
121 and
122 <citerefentry project='die-net'><refentrytitle>tmux</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
123 unless they are moved out of the session scope. See example in
124 <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
125 </para></listitem>
798d3a52
ZJS
126 </varlistentry>
127
128 <varlistentry>
129 <term><varname>KillOnlyUsers=</varname></term>
130 <term><varname>KillExcludeUsers=</varname></term>
131
41b6ae4d
ZJS
132 <listitem><para>These settings take space-separated lists of usernames that override the
133 <varname>KillUserProcesses=</varname> setting. A user name may be added to
134 <varname>KillExcludeUsers=</varname> to exclude the processes in the session scopes of that user from
135 being killed even if <varname>KillUserProcesses=yes</varname> is set. If
136 <varname>KillExcludeUsers=</varname> is not set, the <literal>root</literal> user is excluded by
137 default. <varname>KillExcludeUsers=</varname> may be set to an empty value to override this
138 default. If a user is not excluded, <varname>KillOnlyUsers=</varname> is checked next. If this
139 setting is specified, only the processes in the session scopes of those users will be
140 killed. Otherwise, users are subject to the <varname>KillUserProcesses=yes</varname> setting.
141 </para></listitem>
798d3a52
ZJS
142 </varlistentry>
143
144 <varlistentry>
145 <term><varname>IdleAction=</varname></term>
146
147 <listitem><para>Configures the action to take when the system
cd4dd90b
MY
148 is idle. Takes one of <literal>ignore</literal>, <literal>poweroff</literal>, <literal>reboot</literal>,
149 <literal>halt</literal>, <literal>kexec</literal>, <literal>suspend</literal>, <literal>hibernate</literal>,
150 <literal>hybrid-sleep</literal>, <literal>suspend-then-hibernate</literal>, <literal>sleep</literal>,
151 and <literal>lock</literal>. Defaults to <literal>ignore</literal>.</para>
798d3a52
ZJS
152
153 <para>Note that this requires that user sessions correctly
154 report the idle status to the system. The system will execute
155 the action after all sessions report that they are idle, no
156 idle inhibitor lock is active, and subsequently, the time
157 configured with <varname>IdleActionSec=</varname> (see below)
158 has expired.</para>
ec07c3c8
AK
159
160 <xi:include href="version-info.xml" xpointer="v198"/>
798d3a52
ZJS
161 </listitem>
162 </varlistentry>
163
164 <varlistentry>
165 <term><varname>IdleActionSec=</varname></term>
166
167 <listitem><para>Configures the delay after which the action
168 configured in <varname>IdleAction=</varname> (see above) is
ec07c3c8
AK
169 taken after the system is idle.</para>
170
171 <xi:include href="version-info.xml" xpointer="v198"/></listitem>
798d3a52
ZJS
172 </varlistentry>
173
174 <varlistentry>
175 <term><varname>InhibitDelayMaxSec=</varname></term>
176
177 <listitem><para>Specifies the maximum time a system shutdown
178 or sleep request is delayed due to an inhibitor lock of type
179 <literal>delay</literal> being active before the inhibitor is
180 ignored and the operation executes anyway. Defaults to
181 5.</para></listitem>
182 </varlistentry>
183
9afe9efb
LP
184 <varlistentry>
185 <term><varname>UserStopDelaySec=</varname></term>
186
187 <listitem><para>Specifies how long to keep the user record and per-user service
188 <filename>user@.service</filename> around for a user after they logged out fully. If set to zero, the per-user
189 service is terminated immediately when the last session of the user has ended. If this option is configured to
190 non-zero rapid logout/login cycles are sped up, as the user's service manager is not constantly restarted. If
191 set to <literal>infinity</literal> the per-user service for a user is never terminated again after first login,
ec07c3c8
AK
192 and continues to run until system shutdown. Defaults to 10s.</para>
193
194 <xi:include href="version-info.xml" xpointer="v240"/></listitem>
9afe9efb
LP
195 </varlistentry>
196
cd4dd90b
MY
197 <varlistentry>
198 <term><varname>SleepOperation=</varname></term>
199
200 <listitem><para>Takes a list of sleep operations. Possible values are <literal>suspend</literal>,
201 <literal>hibernate</literal>, <literal>hybrid-sleep</literal>, and <literal>suspend-then-hibernate</literal>.
202 Controls the candidate sleep operations for the <literal>sleep</literal> action. When <literal>sleep</literal>
203 action is performed, the specified sleep operations are checked in a fixed order (<literal>suspend-then-hibernate</literal>
204 → <literal>hybrid-sleep</literal> → <literal>suspend</literal> → <literal>hibernate</literal>), and
205 the first one supported by the machine is used to put the system into sleep. Defaults to
206 <literal>suspend-then-hibernate suspend hibernate</literal>.</para>
207
208 <xi:include href="version-info.xml" xpointer="v256"/></listitem>
209 </varlistentry>
210
798d3a52
ZJS
211 <varlistentry>
212 <term><varname>HandlePowerKey=</varname></term>
a520bb66
YA
213 <term><varname>HandlePowerKeyLongPress=</varname></term>
214 <term><varname>HandleRebootKey=</varname></term>
215 <term><varname>HandleRebootKeyLongPress=</varname></term>
798d3a52 216 <term><varname>HandleSuspendKey=</varname></term>
a520bb66 217 <term><varname>HandleSuspendKeyLongPress=</varname></term>
798d3a52 218 <term><varname>HandleHibernateKey=</varname></term>
a520bb66 219 <term><varname>HandleHibernateKeyLongPress=</varname></term>
798d3a52 220 <term><varname>HandleLidSwitch=</varname></term>
e25937a3 221 <term><varname>HandleLidSwitchExternalPower=</varname></term>
798d3a52
ZJS
222 <term><varname>HandleLidSwitchDocked=</varname></term>
223
30e0343b
LP
224 <listitem><para>Controls how logind shall handle the system power, reboot and sleep keys and the lid
225 switch to trigger actions such as system power-off, reboot or suspend. Can be one of
cd4dd90b
MY
226 <literal>ignore</literal>, <literal>poweroff</literal>, <literal>reboot</literal>, <literal>halt</literal>,
227 <literal>kexec</literal>, <literal>suspend</literal>, <literal>hibernate</literal>, <literal>hybrid-sleep</literal>,
228 <literal>suspend-then-hibernate</literal>, <literal>sleep</literal>, <literal>lock</literal>, and
30e0343b
LP
229 <literal>factory-reset</literal>. If <literal>ignore</literal>, <command>systemd-logind</command>
230 will never handle these keys. If <literal>lock</literal>, all running sessions will be screen-locked;
231 otherwise, the specified action will be taken in the respective event. Only input devices with the
232 <literal>power-switch</literal> udev tag will be watched for key/lid switch
233 events.</para>
234
235 <para><varname>HandlePowerKey=</varname> defaults to <literal>poweroff</literal>,
236 <varname>HandleRebootKey=</varname> defaults to <literal>reboot</literal>,
237 <varname>HandleSuspendKey=</varname> defaults to <literal>suspend</literal>,
238 <varname>HandleHibernateKey=</varname> defaults to <literal>hibernate</literal>,
239 <varname>HandlePowerKeyLongPress=</varname> defaults to <literal>ignore</literal>,
240 <varname>HandleRebootKeyLongPress=</varname> defaults to <literal>poweroff</literal>,
241 <varname>HandleSuspendKeyLongPress=</varname> defaults to <literal>hibernate</literal>,
242 <varname>HandleHibernateKeyLongPress=</varname> defaults to <literal>ignore</literal>.
243 <varname>HandleLidSwitch=</varname> defaults to <literal>suspend</literal>.
244 <varname>HandleLidSwitchExternalPower=</varname> is completely ignored by default (for backwards
245 compatibility) — an explicit value must be set before it will be used to determine
246 behaviour. <varname>HandleLidSwitchDocked=</varname> defaults to <literal>ignore</literal>. If the
247 system is inserted in a docking station, or if more than one display is connected, the action
248 specified by <varname>HandleLidSwitchDocked=</varname> occurs; if the system is on external power the
249 action (if any) specified by <varname>HandleLidSwitchExternalPower=</varname> occurs; otherwise the
250 <varname>HandleLidSwitch=</varname> action occurs.</para>
05b2a8fd
ZJS
251
252 <para>A different application may disable logind's handling of system power and
253 sleep keys and the lid switch by taking a low-level inhibitor lock
3daffa82 254 (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
adbb2b6a 255 <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>,
a520bb66 256 <literal>handle-reboot-key</literal>).
3daffa82 257 This is most commonly used by graphical desktop environments
05b2a8fd
ZJS
258 to take over suspend and hibernation handling, and to use their own configuration
259 mechanisms. If a low-level inhibitor lock is taken, logind will not take any
260 action when that key or switch is triggered and the <varname>Handle*=</varname>
aefdc112
AK
261 settings are irrelevant.</para>
262
263 <xi:include href="version-info.xml" xpointer="v184"/></listitem>
798d3a52
ZJS
264 </varlistentry>
265
266 <varlistentry>
267 <term><varname>PowerKeyIgnoreInhibited=</varname></term>
268 <term><varname>SuspendKeyIgnoreInhibited=</varname></term>
269 <term><varname>HibernateKeyIgnoreInhibited=</varname></term>
270 <term><varname>LidSwitchIgnoreInhibited=</varname></term>
adbb2b6a 271 <term><varname>RebootKeyIgnoreInhibited=</varname></term>
798d3a52 272
05b2a8fd 273 <listitem><para>Controls whether actions that <command>systemd-logind</command>
adbb2b6a
RM
274 takes when the power, reboot and sleep keys and the lid switch are triggered are subject
275 to high-level inhibitor locks ("shutdown", "reboot", "sleep", "idle"). Low level inhibitor
3daffa82 276 locks (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
adbb2b6a
RM
277 <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>,
278 <literal>handle-reboot-key</literal>),
3daffa82 279 are always honored, irrespective of this setting.</para>
05b2a8fd
ZJS
280
281 <para>These settings take boolean arguments. If <literal>no</literal>, the
282 inhibitor locks taken by applications are respected. If <literal>yes</literal>,
adbb2b6a 283 "shutdown", "reboot" "sleep", and "idle" inhibitor locks are ignored.
798d3a52 284 <varname>PowerKeyIgnoreInhibited=</varname>,
adbb2b6a
RM
285 <varname>SuspendKeyIgnoreInhibited=</varname>,
286 <varname>HibernateKeyIgnoreInhibited=</varname> and
287 <varname>RebootKeyIgnoreInhibited=</varname> default to <literal>no</literal>.
05b2a8fd
ZJS
288 <varname>LidSwitchIgnoreInhibited=</varname> defaults to <literal>yes</literal>.
289 This means that when <command>systemd-logind</command> is handling events by
290 itself (no low level inhibitor locks are taken by another application), the lid
291 switch does not respect suspend blockers by default, but the power and sleep keys
aefdc112
AK
292 do.</para>
293
294 <xi:include href="version-info.xml" xpointer="v190"/></listitem>
798d3a52
ZJS
295 </varlistentry>
296
9d10cbee
DH
297 <varlistentry>
298 <term><varname>HoldoffTimeoutSec=</varname></term>
299
e9dd6984 300 <listitem><para>Specifies a period of time after system startup or
9d10cbee 301 system resume in which systemd will hold off on reacting to
a8eaaee7
JE
302 lid events. This is required for the system to properly
303 detect any hotplugged devices so systemd can ignore lid events
9d10cbee
DH
304 if external monitors, or docks, are connected. If set to 0,
305 systemd will always react immediately, possibly before the
306 kernel fully probed all hotplugged devices. This is safe, as
307 long as you do not care for systemd to account for devices
308 that have been plugged or unplugged while the system was off.
ec07c3c8
AK
309 Defaults to 30s.</para>
310
311 <xi:include href="version-info.xml" xpointer="v220"/></listitem>
9d10cbee
DH
312 </varlistentry>
313
798d3a52
ZJS
314 <varlistentry>
315 <term><varname>RuntimeDirectorySize=</varname></term>
316
317 <listitem><para>Sets the size limit on the
318 <varname>$XDG_RUNTIME_DIR</varname> runtime directory for each
319 user who logs in. Takes a size in bytes, optionally suffixed
320 with the usual K, G, M, and T suffixes, to the base 1024
321 (IEC). Alternatively, a numerical percentage suffixed by
322 <literal>%</literal> may be specified, which sets the size
323 limit relative to the amount of physical RAM. Defaults to 10%.
324 Note that this size is a safety limit only. As each runtime
325 directory is a tmpfs file system, it will only consume as much
ec07c3c8
AK
326 memory as is needed.</para>
327
328 <xi:include href="version-info.xml" xpointer="v211"/></listitem>
90558f31
LP
329 </varlistentry>
330
cc1c85fb
TM
331 <varlistentry>
332 <term><varname>RuntimeDirectoryInodesMax=</varname></term>
333
334 <listitem><para>Sets the limit on number of inodes for the
335 <varname>$XDG_RUNTIME_DIR</varname> runtime directory for each
336 user who logs in. Takes a number, optionally suffixed with the
337 usual K, G, M, and T suffixes, to the base 1024 (IEC).
338 Defaults to <varname>RuntimeDirectorySize=</varname> divided
339 by 4096. Note that this size is a safety limit only.
340 As each runtime directory is a tmpfs file system, it will
ec07c3c8
AK
341 only consume as much memory as is needed.</para>
342
343 <xi:include href="version-info.xml" xpointer="v246"/></listitem>
cc1c85fb
TM
344 </varlistentry>
345
c5a11ae2
LP
346 <varlistentry>
347 <term><varname>InhibitorsMax=</varname></term>
348
349 <listitem><para>Controls the maximum number of concurrent inhibitors to permit. Defaults to 8192
ec07c3c8
AK
350 (8K).</para>
351
352 <xi:include href="version-info.xml" xpointer="v230"/></listitem>
c5a11ae2
LP
353 </varlistentry>
354
183e0738
LP
355 <varlistentry>
356 <term><varname>SessionsMax=</varname></term>
357
358 <listitem><para>Controls the maximum number of concurrent user sessions to manage. Defaults to 8192
359 (8K). Depending on how the <filename>pam_systemd.so</filename> module is included in the PAM stack
360 configuration, further login sessions will either be refused, or permitted but not tracked by
ec07c3c8
AK
361 <filename>systemd-logind</filename>.</para>
362
363 <xi:include href="version-info.xml" xpointer="v230"/></listitem>
183e0738
LP
364 </varlistentry>
365
798d3a52
ZJS
366 <varlistentry>
367 <term><varname>RemoveIPC=</varname></term>
368
f59d94bc
LP
369 <listitem><para>Controls whether System V and POSIX IPC objects belonging to the user shall be removed when the
370 user fully logs out. Takes a boolean argument. If enabled, the user may not consume IPC resources after the
371 last of the user's sessions terminated. This covers System V semaphores, shared memory and message queues, as
372 well as POSIX shared memory and message queues. Note that IPC objects of the root user and other system users
ec07c3c8
AK
373 are excluded from the effect of this setting. Defaults to <literal>yes</literal>.</para>
374
375 <xi:include href="version-info.xml" xpointer="v212"/></listitem>
798d3a52
ZJS
376 </varlistentry>
377
82325af3
MS
378 <varlistentry>
379 <term><varname>StopIdleSessionSec=</varname></term>
380
381 <listitem><para>Specifies a timeout in seconds, or a time span value after which
382 <filename>systemd-logind</filename> checks the idle state of all sessions. Every session that is idle for
383 longer then the timeout will be stopped. Defaults to <literal>infinity</literal>
384 (<filename>systemd-logind</filename> is not checking the idle state of sessions). For details about the syntax
385 of time spans, see
386 <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
ec07c3c8
AK
387 </para>
388
389 <xi:include href="version-info.xml" xpointer="v252"/></listitem>
82325af3 390 </varlistentry>
798d3a52
ZJS
391 </variablelist>
392 </refsect1>
393
394 <refsect1>
395 <title>See Also</title>
13a69c12
DT
396 <para><simplelist type="inline">
397 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
398 <member><citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
399 <member><citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
400 <member><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
401 </simplelist></para>
798d3a52 402 </refsect1>
8fa365e5
LP
403
404</refentry>