1 <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
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" >
9 SPDX-License-Identifier: LGPL-2.1+
12 <!-- 0 /// elogind does not have to enable itself in configure
13 <refentry id="logind.conf" conditional='ENABLE_LOGIND'
14 xmlns:xi="http://www.w3.org/2001/XInclude">
16 <title>logind.conf</title>
17 <productname>systemd</productname>
19 <refentry id="logind.conf" xmlns:xi="http://www.w3.org/2001/XInclude">
21 <title>logind.conf</title>
22 <productname>elogind</productname>
27 <refentrytitle>logind.conf</refentrytitle>
28 <manvolnum>5</manvolnum>
32 <refname>logind.conf</refname>
33 <!-- 0 /// not supported by elogind
34 <refname>logind.conf.d</refname>
36 <refpurpose>Login manager configuration files</refpurpose>
40 <para><filename>/etc/elogind/logind.conf</filename></para>
41 <!-- 0 /// not supported by elogind
42 <para><filename>/etc/systemd/logind.conf.d/*.conf</filename></para>
43 <para><filename>/run/systemd/logind.conf.d/*.conf</filename></para>
44 <para><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></para>
49 <title>Description</title>
51 <!-- 0 /// elogind does not need a service file.
52 <para>These files configure various parameters of the systemd login manager,
53 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. See
54 <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>5</manvolnum></citerefentry>
55 for a general description of the syntax.</para>
61 <!-- 0 /// elogind has only this configuration
62 <xi:include href="standard-conf.xml" xpointer="main-conf" />
66 <title>Options</title>
68 <!-- 0 /// elogind also supports a few system commands
69 <para>All options are configured in the
70 <literal>[Login]</literal> section:</para>
72 <para>All login options are configured in the
73 <literal>[Login]</literal> section, system sleep options are
74 configured in the <literal>[Sleep]</literal> section.</para>
77 <!-- 1 /// elogind needs a second level, as we use two sections. -->
78 <refsect2><title>[Login] section:</title>
82 <!-- 0 /// elogind has no support for AutoVT
85 <term><varname>NAutoVTs=</varname></term>
87 <listitem><para>Takes a positive integer. Configures how many
88 virtual terminals (VTs) to allocate by default that, when
89 switched to and are previously unused,
90 <literal>autovt</literal> services are automatically spawned
91 on. These services are instantiated from the template unit
92 <filename>autovt@.service</filename> for the respective VT TTY
93 name, for example, <filename>autovt@tty4.service</filename>.
94 By default, <filename>autovt@.service</filename> is linked to
95 <filename>getty@.service</filename>. In other words, login
96 prompts are started dynamically as the user switches to unused
97 virtual terminals. Hence, this parameter controls how many
98 login <literal>gettys</literal> are available on the VTs. If a
99 VT is already used by some other subsystem (for example, a
100 graphical login), this kind of activation will not be
101 attempted. Note that the VT configured in
102 <varname>ReserveVT=</varname> is always subject to this kind
103 of activation, even if it is not one of the VTs configured
104 with the <varname>NAutoVTs=</varname> directive. Defaults to
105 6. When set to 0, automatic spawning of
106 <literal>autovt</literal> services is
107 disabled.</para></listitem>
111 <term><varname>ReserveVT=</varname></term>
113 <listitem><para>Takes a positive integer. Identifies one
114 virtual terminal that shall unconditionally be reserved for
115 <filename>autovt@.service</filename> activation (see above).
116 The VT selected with this option will be marked busy
117 unconditionally, so that no other subsystem will allocate it.
118 This functionality is useful to ensure that, regardless of how
119 many VTs are allocated by other subsystems, one login
120 <literal>getty</literal> is always available. Defaults to 6
121 (in other words, there will always be a
122 <literal>getty</literal> available on Alt-F6.). When set to 0,
123 VT reservation is disabled.</para></listitem>
128 <term><varname>KillUserProcesses=</varname></term>
130 <listitem><para>Takes a boolean argument. Configures whether the processes of a
131 <!-- 0 /// elogind has no scope unit, and goes for cgroups only
132 user should be killed when the user logs out. If true, the scope unit
133 corresponding to the session and all processes inside that scope will be
134 terminated. If false, the scope is "abandoned", see
135 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
136 and processes are not killed. Defaults to <literal>&KILL_USER_PROCESSES;</literal>,
138 user should be killed when the user logs out. If true, the processes
139 listed in their session cgroup will be terminated. If false, the session cgroup
142 but see the options <varname>KillOnlyUsers=</varname> and
143 <varname>KillExcludeUsers=</varname> below.</para>
145 <!-- 0 /// elogind has no user manager unit, and lingering isn't clarified, yet.
146 <para>In addition to session processes, user process may run under the user
147 manager unit <filename>user@.service</filename>. Depending on the linger
148 settings, this may allow users to run processes independent of their login
149 sessions. See the description of <command>enable-linger</command> in
150 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
154 <para>Note that setting <varname>KillUserProcesses=yes</varname>
155 will break tools like
156 <citerefentry project='die-net'><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>
158 <citerefentry project='die-net'><refentrytitle>tmux</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
159 <!-- 0 /// elogind does not provide systemd-run or any equivalent, yet.
160 unless they are moved out of the session scope. See example in
161 <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
163 unless they are moved out of the session scope.
169 <term><varname>KillOnlyUsers=</varname></term>
170 <term><varname>KillExcludeUsers=</varname></term>
172 <listitem><para>These settings take space-separated lists of usernames that override
173 the <varname>KillUserProcesses=</varname> setting. A user name may be added to
174 <varname>KillExcludeUsers=</varname> to exclude the processes in the session scopes of
175 that user from being killed even if <varname>KillUserProcesses=yes</varname> is set. If
176 <varname>KillExcludeUsers=</varname> is not set, the <literal>root</literal> user is
177 excluded by default. <varname>KillExcludeUsers=</varname> may be set to an empty value
178 to override this default. If a user is not excluded, <varname>KillOnlyUsers=</varname>
179 is checked next. If this setting is specified, only the session scopes of those users
180 will be killed. Otherwise, users are subject to the
181 <varname>KillUserProcesses=yes</varname> setting.</para></listitem>
185 <term><varname>IdleAction=</varname></term>
187 <listitem><para>Configures the action to take when the system
188 is idle. Takes one of
189 <literal>ignore</literal>,
190 <literal>poweroff</literal>,
191 <literal>reboot</literal>,
192 <literal>halt</literal>,
193 <literal>kexec</literal>,
194 <literal>suspend</literal>,
195 <literal>hibernate</literal>,
196 <literal>hybrid-sleep</literal>,
197 <literal>suspend-then-hibernate</literal>, and
198 <literal>lock</literal>.
199 Defaults to <literal>ignore</literal>.</para>
201 <para>Note that this requires that user sessions correctly
202 report the idle status to the system. The system will execute
203 the action after all sessions report that they are idle, no
204 idle inhibitor lock is active, and subsequently, the time
205 configured with <varname>IdleActionSec=</varname> (see below)
211 <term><varname>IdleActionSec=</varname></term>
213 <listitem><para>Configures the delay after which the action
214 configured in <varname>IdleAction=</varname> (see above) is
215 taken after the system is idle.</para></listitem>
219 <term><varname>InhibitDelayMaxSec=</varname></term>
221 <listitem><para>Specifies the maximum time a system shutdown
222 or sleep request is delayed due to an inhibitor lock of type
223 <literal>delay</literal> being active before the inhibitor is
224 ignored and the operation executes anyway. Defaults to
229 <term><varname>HandlePowerKey=</varname></term>
230 <term><varname>HandleSuspendKey=</varname></term>
231 <term><varname>HandleHibernateKey=</varname></term>
232 <term><varname>HandleLidSwitch=</varname></term>
233 <term><varname>HandleLidSwitchExternalPower=</varname></term>
234 <term><varname>HandleLidSwitchDocked=</varname></term>
236 <listitem><para>Controls how logind shall handle the
237 system power and sleep keys and the lid switch to trigger
238 actions such as system power-off or suspend. Can be one of
239 <literal>ignore</literal>,
240 <literal>poweroff</literal>,
241 <literal>reboot</literal>,
242 <literal>halt</literal>,
243 <literal>kexec</literal>,
244 <literal>suspend</literal>,
245 <literal>hibernate</literal>,
246 <literal>hybrid-sleep</literal>,
247 <literal>suspend-then-hibernate</literal>, and
248 <literal>lock</literal>.
249 If <literal>ignore</literal>, logind will never handle these
250 keys. If <literal>lock</literal>, all running sessions will be
251 screen-locked; otherwise, the specified action will be taken
252 in the respective event. Only input devices with the
253 <literal>power-switch</literal> udev tag will be watched for
254 key/lid switch events. <varname>HandlePowerKey=</varname>
255 defaults to <literal>poweroff</literal>.
256 <varname>HandleSuspendKey=</varname> and
257 <varname>HandleLidSwitch=</varname> default to
258 <literal>suspend</literal>.
259 <varname>HandleLidSwitchExternalPower=</varname> is completely
260 ignored by default (for backwards compatibility) — an explicit
261 value must be set before it will be used to determine
262 behaviour. <varname>HandleLidSwitchDocked=</varname> defaults
263 to <literal>ignore</literal>.
264 <varname>HandleHibernateKey=</varname> defaults to
265 <literal>hibernate</literal>. If the system is inserted in a
266 docking station, or if more than one display is connected, the
267 action specified by <varname>HandleLidSwitchDocked=</varname>
268 occurs; if the system is on external power the action (if any)
269 specified by <varname>HandleLidSwitchExternalPower=</varname>
270 occurs; otherwise the <varname>HandleLidSwitch=</varname>
271 action occurs.</para>
273 <para>A different application may disable logind's handling of system power and
274 sleep keys and the lid switch by taking a low-level inhibitor lock
275 (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
276 <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>).
277 This is most commonly used by graphical desktop environments
278 to take over suspend and hibernation handling, and to use their own configuration
279 mechanisms. If a low-level inhibitor lock is taken, logind will not take any
280 action when that key or switch is triggered and the <varname>Handle*=</varname>
281 settings are irrelevant.</para></listitem>
285 <term><varname>PowerKeyIgnoreInhibited=</varname></term>
286 <term><varname>SuspendKeyIgnoreInhibited=</varname></term>
287 <term><varname>HibernateKeyIgnoreInhibited=</varname></term>
288 <term><varname>LidSwitchIgnoreInhibited=</varname></term>
290 <listitem><para>Controls whether actions that <command>elogind</command>
291 takes when the power and sleep keys and the lid switch are triggered are subject
292 to high-level inhibitor locks ("shutdown", "sleep", "idle"). Low level inhibitor
293 locks (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
294 <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>),
295 are always honored, irrespective of this setting.</para>
297 <para>These settings take boolean arguments. If <literal>no</literal>, the
298 inhibitor locks taken by applications are respected. If <literal>yes</literal>,
299 "shutdown", "sleep", and "idle" inhibitor locks are ignored.
300 <varname>PowerKeyIgnoreInhibited=</varname>,
301 <varname>SuspendKeyIgnoreInhibited=</varname>, and
302 <varname>HibernateKeyIgnoreInhibited=</varname> default to <literal>no</literal>.
303 <varname>LidSwitchIgnoreInhibited=</varname> defaults to <literal>yes</literal>.
304 This means that when <command>elogind</command> is handling events by
305 itself (no low level inhibitor locks are taken by another application), the lid
306 switch does not respect suspend blockers by default, but the power and sleep keys
307 do.</para></listitem>
311 <term><varname>HoldoffTimeoutSec=</varname></term>
313 <listitem><para>Specifies the timeout after system startup or
314 system resume in which systemd will hold off on reacting to
315 lid events. This is required for the system to properly
316 detect any hotplugged devices so systemd can ignore lid events
317 if external monitors, or docks, are connected. If set to 0,
318 systemd will always react immediately, possibly before the
319 kernel fully probed all hotplugged devices. This is safe, as
320 long as you do not care for systemd to account for devices
321 that have been plugged or unplugged while the system was off.
322 Defaults to 30s.</para></listitem>
326 <term><varname>RuntimeDirectorySize=</varname></term>
328 <listitem><para>Sets the size limit on the
329 <varname>$XDG_RUNTIME_DIR</varname> runtime directory for each
330 user who logs in. Takes a size in bytes, optionally suffixed
331 with the usual K, G, M, and T suffixes, to the base 1024
332 (IEC). Alternatively, a numerical percentage suffixed by
333 <literal>%</literal> may be specified, which sets the size
334 limit relative to the amount of physical RAM. Defaults to 10%.
335 Note that this size is a safety limit only. As each runtime
336 directory is a tmpfs file system, it will only consume as much
337 memory as is needed.</para></listitem>
341 <term><varname>InhibitorsMax=</varname></term>
343 <listitem><para>Controls the maximum number of concurrent inhibitors to permit. Defaults to 8192
344 (8K).</para></listitem>
348 <term><varname>SessionsMax=</varname></term>
350 <listitem><para>Controls the maximum number of concurrent user sessions to manage. Defaults to 8192
351 (8K). Depending on how the <filename>pam_systemd.so</filename> module is included in the PAM stack
352 configuration, further login sessions will either be refused, or permitted but not tracked by
353 <filename>elogind</filename>.</para></listitem>
357 <term><varname>RemoveIPC=</varname></term>
359 <listitem><para>Controls whether System V and POSIX IPC objects belonging to the user shall be removed when the
360 user fully logs out. Takes a boolean argument. If enabled, the user may not consume IPC resources after the
361 last of the user's sessions terminated. This covers System V semaphores, shared memory and message queues, as
362 well as POSIX shared memory and message queues. Note that IPC objects of the root user and other system users
363 are excluded from the effect of this setting. Defaults to <literal>yes</literal>.</para></listitem>
367 <!-- 1 /// elogind has an additional section for system commands. -->
370 <refsect2><title>[Sleep] section:</title>
371 <para><command>elogind</command> supports three general
372 power-saving modes:</para>
378 <listitem><para>a low-power state
379 where execution of the OS is paused,
380 and complete power loss might result
381 in lost data, and which is fast to
382 enter and exit. This corresponds to
383 suspend, standby, or freeze states as
384 understood by the kernel.
389 <term>hibernate</term>
391 <listitem><para>a low-power state
392 where execution of the OS is paused,
393 and complete power loss does not
394 result in lost data, and which might
395 be slow to enter and exit. This
396 corresponds to the hibernation as
397 understood by the kernel.
402 <term>hybrid-sleep</term>
404 <listitem><para>a low-power state
405 where execution of the OS is paused,
406 which might be slow to enter, and on
407 complete power loss does not result in
408 lost data but might be slower to exit
409 in that case. This mode is called
410 suspend-to-both by the kernel.
415 <term><varname>SuspendMode=</varname></term>
416 <term><varname>HibernateMode=</varname></term>
417 <term><varname>HybridSleepMode=</varname></term>
419 <listitem><para>The string to be written to
420 <filename>/sys/power/disk</filename> by elogind.
421 More than one value can be specified by separating
422 multiple values with whitespace. They will be tried
423 in turn, until one is written without error. If
424 neither succeeds, the operation will be aborted.
429 <term><varname>SuspendState=</varname></term>
430 <term><varname>HibernateState=</varname></term>
431 <term><varname>HybridSleepState=</varname></term>
433 <listitem><para>The string to be written to
434 <filename>/sys/power/state</filename> by elogind.
435 More than one value can be specified by separating
436 multiple values with whitespace. They will be tried
437 in turn, until one is written without error. If
438 neither succeeds, the operation will be aborted.
448 <title>See Also</title>
450 <!-- 0 /// elogind is in section 8
451 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
452 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
454 <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
456 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
457 <!-- 0 /// UNNEEDED by elogind
458 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>