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+
11 This file is part of elogind.
13 Copyright 2010 Lennart Poettering
16 <!-- 0 /// elogind does not have to enable itself in configure
17 <refentry id="logind.conf" conditional='ENABLE_LOGIND'
18 xmlns:xi="http://www.w3.org/2001/XInclude">
20 <title>logind.conf</title>
21 <productname>systemd</productname>
23 <refentry id="logind.conf" xmlns:xi="http://www.w3.org/2001/XInclude">
25 <title>logind.conf</title>
26 <productname>elogind</productname>
31 <contrib>Developer</contrib>
32 <firstname>Lennart</firstname>
33 <surname>Poettering</surname>
34 <email>lennart@poettering.net</email>
40 <refentrytitle>logind.conf</refentrytitle>
41 <manvolnum>5</manvolnum>
45 <refname>logind.conf</refname>
46 <!-- 0 /// not supported by elogind
47 <refname>logind.conf.d</refname>
49 <refpurpose>Login manager configuration files</refpurpose>
53 <para><filename>/etc/elogind/logind.conf</filename></para>
54 <!-- 0 /// not supported by elogind
55 <para><filename>/etc/systemd/logind.conf.d/*.conf</filename></para>
56 <para><filename>/run/systemd/logind.conf.d/*.conf</filename></para>
57 <para><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></para>
62 <title>Description</title>
64 <!-- 0 /// elogind does not need a service file.
65 <para>These files configure various parameters of the systemd login manager,
66 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. See
67 <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>5</manvolnum></citerefentry>
68 for a general description of the syntax.</para>
74 <!-- 0 /// elogind has only this configuration
75 <xi:include href="standard-conf.xml" xpointer="main-conf" />
79 <title>Options</title>
81 <!-- 0 /// elogind also supports a few system commands
82 <para>All options are configured in the
83 <literal>[Login]</literal> section:</para>
85 <para>All login options are configured in the
86 <literal>[Login]</literal> section, system sleep options are
87 configured in the <literal>[Sleep]</literal> section.</para>
90 <!-- 1 /// elogind needs a second level, as we use two sections. -->
91 <refsect2><title>[Login] section:</title>
95 <!-- 0 /// elogind has no support for AutoVT
98 <term><varname>NAutoVTs=</varname></term>
100 <listitem><para>Takes a positive integer. Configures how many
101 virtual terminals (VTs) to allocate by default that, when
102 switched to and are previously unused,
103 <literal>autovt</literal> services are automatically spawned
104 on. These services are instantiated from the template unit
105 <filename>autovt@.service</filename> for the respective VT TTY
106 name, for example, <filename>autovt@tty4.service</filename>.
107 By default, <filename>autovt@.service</filename> is linked to
108 <filename>getty@.service</filename>. In other words, login
109 prompts are started dynamically as the user switches to unused
110 virtual terminals. Hence, this parameter controls how many
111 login <literal>gettys</literal> are available on the VTs. If a
112 VT is already used by some other subsystem (for example, a
113 graphical login), this kind of activation will not be
114 attempted. Note that the VT configured in
115 <varname>ReserveVT=</varname> is always subject to this kind
116 of activation, even if it is not one of the VTs configured
117 with the <varname>NAutoVTs=</varname> directive. Defaults to
118 6. When set to 0, automatic spawning of
119 <literal>autovt</literal> services is
120 disabled.</para></listitem>
124 <term><varname>ReserveVT=</varname></term>
126 <listitem><para>Takes a positive integer. Identifies one
127 virtual terminal that shall unconditionally be reserved for
128 <filename>autovt@.service</filename> activation (see above).
129 The VT selected with this option will be marked busy
130 unconditionally, so that no other subsystem will allocate it.
131 This functionality is useful to ensure that, regardless of how
132 many VTs are allocated by other subsystems, one login
133 <literal>getty</literal> is always available. Defaults to 6
134 (in other words, there will always be a
135 <literal>getty</literal> available on Alt-F6.). When set to 0,
136 VT reservation is disabled.</para></listitem>
141 <term><varname>KillUserProcesses=</varname></term>
143 <listitem><para>Takes a boolean argument. Configures whether the processes of a
144 <!-- 0 /// elogind has no scope unit, and goes for cgroups only
145 user should be killed when the user logs out. If true, the scope unit
146 corresponding to the session and all processes inside that scope will be
147 terminated. If false, the scope is "abandoned", see
148 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
149 and processes are not killed. Defaults to <literal>&KILL_USER_PROCESSES;</literal>,
151 user should be killed when the user logs out. If true, the processes
152 listed in their session cgroup will be terminated. If false, the session cgroup
155 but see the options <varname>KillOnlyUsers=</varname> and
156 <varname>KillExcludeUsers=</varname> below.</para>
158 <!-- 0 /// elogind has no user manager unit, and lingering isn't clarified, yet.
159 <para>In addition to session processes, user process may run under the user
160 manager unit <filename>user@.service</filename>. Depending on the linger
161 settings, this may allow users to run processes independent of their login
162 sessions. See the description of <command>enable-linger</command> in
163 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
167 <para>Note that setting <varname>KillUserProcesses=yes</varname>
168 will break tools like
169 <citerefentry project='die-net'><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>
171 <citerefentry project='die-net'><refentrytitle>tmux</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
172 <!-- 0 /// elogind does not provide systemd-run or any equivalent, yet.
173 unless they are moved out of the session scope. See example in
174 <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
176 unless they are moved out of the session scope.
182 <term><varname>KillOnlyUsers=</varname></term>
183 <term><varname>KillExcludeUsers=</varname></term>
185 <listitem><para>These settings take space-separated lists of usernames that override
186 the <varname>KillUserProcesses=</varname> setting. A user name may be added to
187 <varname>KillExcludeUsers=</varname> to exclude the processes in the session scopes of
188 that user from being killed even if <varname>KillUserProcesses=yes</varname> is set. If
189 <varname>KillExcludeUsers=</varname> is not set, the <literal>root</literal> user is
190 excluded by default. <varname>KillExcludeUsers=</varname> may be set to an empty value
191 to override this default. If a user is not excluded, <varname>KillOnlyUsers=</varname>
192 is checked next. If this setting is specified, only the session scopes of those users
193 will be killed. Otherwise, users are subject to the
194 <varname>KillUserProcesses=yes</varname> setting.</para></listitem>
198 <term><varname>IdleAction=</varname></term>
200 <listitem><para>Configures the action to take when the system
201 is idle. Takes one of
202 <literal>ignore</literal>,
203 <literal>poweroff</literal>,
204 <literal>reboot</literal>,
205 <literal>halt</literal>,
206 <literal>kexec</literal>,
207 <literal>suspend</literal>,
208 <literal>hibernate</literal>,
209 <literal>hybrid-sleep</literal>,
210 <literal>suspend-then-hibernate</literal>, and
211 <literal>lock</literal>.
212 Defaults to <literal>ignore</literal>.</para>
214 <para>Note that this requires that user sessions correctly
215 report the idle status to the system. The system will execute
216 the action after all sessions report that they are idle, no
217 idle inhibitor lock is active, and subsequently, the time
218 configured with <varname>IdleActionSec=</varname> (see below)
224 <term><varname>IdleActionSec=</varname></term>
226 <listitem><para>Configures the delay after which the action
227 configured in <varname>IdleAction=</varname> (see above) is
228 taken after the system is idle.</para></listitem>
232 <term><varname>InhibitDelayMaxSec=</varname></term>
234 <listitem><para>Specifies the maximum time a system shutdown
235 or sleep request is delayed due to an inhibitor lock of type
236 <literal>delay</literal> being active before the inhibitor is
237 ignored and the operation executes anyway. Defaults to
242 <term><varname>HandlePowerKey=</varname></term>
243 <term><varname>HandleSuspendKey=</varname></term>
244 <term><varname>HandleHibernateKey=</varname></term>
245 <term><varname>HandleLidSwitch=</varname></term>
246 <term><varname>HandleLidSwitchExternalPower=</varname></term>
247 <term><varname>HandleLidSwitchDocked=</varname></term>
249 <listitem><para>Controls how logind shall handle the
250 system power and sleep keys and the lid switch to trigger
251 actions such as system power-off or suspend. Can be one of
252 <literal>ignore</literal>,
253 <literal>poweroff</literal>,
254 <literal>reboot</literal>,
255 <literal>halt</literal>,
256 <literal>kexec</literal>,
257 <literal>suspend</literal>,
258 <literal>hibernate</literal>,
259 <literal>hybrid-sleep</literal>,
260 <literal>suspend-then-hibernate</literal>, and
261 <literal>lock</literal>.
262 If <literal>ignore</literal>, logind will never handle these
263 keys. If <literal>lock</literal>, all running sessions will be
264 screen-locked; otherwise, the specified action will be taken
265 in the respective event. Only input devices with the
266 <literal>power-switch</literal> udev tag will be watched for
267 key/lid switch events. <varname>HandlePowerKey=</varname>
268 defaults to <literal>poweroff</literal>.
269 <varname>HandleSuspendKey=</varname> and
270 <varname>HandleLidSwitch=</varname> default to
271 <literal>suspend</literal>.
272 <varname>HandleLidSwitchExternalPower=</varname> is completely
273 ignored by default (for backwards compatibility) — an explicit
274 value must be set before it will be used to determine
275 behaviour. <varname>HandleLidSwitchDocked=</varname> defaults
276 to <literal>ignore</literal>.
277 <varname>HandleHibernateKey=</varname> defaults to
278 <literal>hibernate</literal>. If the system is inserted in a
279 docking station, or if more than one display is connected, the
280 action specified by <varname>HandleLidSwitchDocked=</varname>
281 occurs; if the system is on external power the action (if any)
282 specified by <varname>HandleLidSwitchExternalPower=</varname>
283 occurs; otherwise the <varname>HandleLidSwitch=</varname>
284 action occurs.</para>
286 <para>A different application may disable logind's handling of system power and
287 sleep keys and the lid switch by taking a low-level inhibitor lock
288 (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
289 <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>).
290 This is most commonly used by graphical desktop environments
291 to take over suspend and hibernation handling, and to use their own configuration
292 mechanisms. If a low-level inhibitor lock is taken, logind will not take any
293 action when that key or switch is triggered and the <varname>Handle*=</varname>
294 settings are irrelevant.</para></listitem>
298 <term><varname>PowerKeyIgnoreInhibited=</varname></term>
299 <term><varname>SuspendKeyIgnoreInhibited=</varname></term>
300 <term><varname>HibernateKeyIgnoreInhibited=</varname></term>
301 <term><varname>LidSwitchIgnoreInhibited=</varname></term>
303 <listitem><para>Controls whether actions that <command>elogind</command>
304 takes when the power and sleep keys and the lid switch are triggered are subject
305 to high-level inhibitor locks ("shutdown", "sleep", "idle"). Low level inhibitor
306 locks (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
307 <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>),
308 are always honored, irrespective of this setting.</para>
310 <para>These settings take boolean arguments. If <literal>no</literal>, the
311 inhibitor locks taken by applications are respected. If <literal>yes</literal>,
312 "shutdown", "sleep", and "idle" inhibitor locks are ignored.
313 <varname>PowerKeyIgnoreInhibited=</varname>,
314 <varname>SuspendKeyIgnoreInhibited=</varname>, and
315 <varname>HibernateKeyIgnoreInhibited=</varname> default to <literal>no</literal>.
316 <varname>LidSwitchIgnoreInhibited=</varname> defaults to <literal>yes</literal>.
317 This means that when <command>elogind</command> is handling events by
318 itself (no low level inhibitor locks are taken by another application), the lid
319 switch does not respect suspend blockers by default, but the power and sleep keys
320 do.</para></listitem>
324 <term><varname>HoldoffTimeoutSec=</varname></term>
326 <listitem><para>Specifies the timeout after system startup or
327 system resume in which systemd will hold off on reacting to
328 lid events. This is required for the system to properly
329 detect any hotplugged devices so systemd can ignore lid events
330 if external monitors, or docks, are connected. If set to 0,
331 systemd will always react immediately, possibly before the
332 kernel fully probed all hotplugged devices. This is safe, as
333 long as you do not care for systemd to account for devices
334 that have been plugged or unplugged while the system was off.
335 Defaults to 30s.</para></listitem>
339 <term><varname>RuntimeDirectorySize=</varname></term>
341 <listitem><para>Sets the size limit on the
342 <varname>$XDG_RUNTIME_DIR</varname> runtime directory for each
343 user who logs in. Takes a size in bytes, optionally suffixed
344 with the usual K, G, M, and T suffixes, to the base 1024
345 (IEC). Alternatively, a numerical percentage suffixed by
346 <literal>%</literal> may be specified, which sets the size
347 limit relative to the amount of physical RAM. Defaults to 10%.
348 Note that this size is a safety limit only. As each runtime
349 directory is a tmpfs file system, it will only consume as much
350 memory as is needed.</para></listitem>
354 <term><varname>InhibitorsMax=</varname></term>
356 <listitem><para>Controls the maximum number of concurrent inhibitors to permit. Defaults to 8192
357 (8K).</para></listitem>
361 <term><varname>SessionsMax=</varname></term>
363 <listitem><para>Controls the maximum number of concurrent user sessions to manage. Defaults to 8192
364 (8K). Depending on how the <filename>pam_systemd.so</filename> module is included in the PAM stack
365 configuration, further login sessions will either be refused, or permitted but not tracked by
366 <filename>elogind</filename>.</para></listitem>
370 <term><varname>RemoveIPC=</varname></term>
372 <listitem><para>Controls whether System V and POSIX IPC objects belonging to the user shall be removed when the
373 user fully logs out. Takes a boolean argument. If enabled, the user may not consume IPC resources after the
374 last of the user's sessions terminated. This covers System V semaphores, shared memory and message queues, as
375 well as POSIX shared memory and message queues. Note that IPC objects of the root user and other system users
376 are excluded from the effect of this setting. Defaults to <literal>yes</literal>.</para></listitem>
380 <!-- 1 /// elogind has an additional section for system commands. -->
383 <refsect2><title>[Sleep] section:</title>
384 <para><command>elogind</command> supports three general
385 power-saving modes:</para>
391 <listitem><para>a low-power state
392 where execution of the OS is paused,
393 and complete power loss might result
394 in lost data, and which is fast to
395 enter and exit. This corresponds to
396 suspend, standby, or freeze states as
397 understood by the kernel.
402 <term>hibernate</term>
404 <listitem><para>a low-power state
405 where execution of the OS is paused,
406 and complete power loss does not
407 result in lost data, and which might
408 be slow to enter and exit. This
409 corresponds to the hibernation as
410 understood by the kernel.
415 <term>hybrid-sleep</term>
417 <listitem><para>a low-power state
418 where execution of the OS is paused,
419 which might be slow to enter, and on
420 complete power loss does not result in
421 lost data but might be slower to exit
422 in that case. This mode is called
423 suspend-to-both by the kernel.
428 <term><varname>SuspendMode=</varname></term>
429 <term><varname>HibernateMode=</varname></term>
430 <term><varname>HybridSleepMode=</varname></term>
432 <listitem><para>The string to be written to
433 <filename>/sys/power/disk</filename> by elogind.
434 More than one value can be specified by separating
435 multiple values with whitespace. They will be tried
436 in turn, until one is written without error. If
437 neither succeeds, the operation will be aborted.
442 <term><varname>SuspendState=</varname></term>
443 <term><varname>HibernateState=</varname></term>
444 <term><varname>HybridSleepState=</varname></term>
446 <listitem><para>The string to be written to
447 <filename>/sys/power/state</filename> by elogind.
448 More than one value can be specified by separating
449 multiple values with whitespace. They will be tried
450 in turn, until one is written without error. If
451 neither succeeds, the operation will be aborted.
461 <title>See Also</title>
463 <!-- 0 /// elogind is in section 8
464 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
465 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
467 <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
469 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
470 <!-- 0 /// UNNEEDED by elogind
471 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>