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