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