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">
6 This file is part of elogind.
7 SPDX-License-Identifier: LGPL-2.1+
10 Copyright 2010 Lennart Poettering
12 elogind is free software; you can redistribute it and/or modify it
13 under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
17 elogind is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
22 You should have received a copy of the GNU Lesser General Public License
23 along with elogind; If not, see <http://www.gnu.org/licenses/>.
26 <!-- 0 /// elogind does not have to enable itself in configure
27 <refentry id="logind.conf" conditional='ENABLE_LOGIND'
28 xmlns:xi="http://www.w3.org/2001/XInclude">
30 <refentry id="logind.conf" xmlns:xi="http://www.w3.org/2001/XInclude">
33 <title>logind.conf</title>
34 <productname>elogind</productname>
38 <contrib>Developer</contrib>
39 <firstname>Lennart</firstname>
40 <surname>Poettering</surname>
41 <email>lennart@poettering.net</email>
47 <refentrytitle>logind.conf</refentrytitle>
48 <manvolnum>5</manvolnum>
52 <refname>logind.conf</refname>
53 <!-- 0 /// not supported by elogind
54 <refname>logind.conf.d</refname>
56 <refpurpose>Login manager configuration files</refpurpose>
60 <para><filename>/etc/elogind/logind.conf</filename></para>
61 <!-- 0 /// not supported by elogind
62 <para><filename>/etc/systemd/logind.conf.d/*.conf</filename></para>
63 <para><filename>/run/systemd/logind.conf.d/*.conf</filename></para>
64 <para><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></para>
69 <title>Description</title>
71 <para>These files configure various parameters of the elogind
72 <!-- 0 /// elogind does not need a service file.
74 <citerefentry><refentrytitle>elogind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
81 <!-- 0 /// elogind has only this configuration
82 <xi:include href="standard-conf.xml" xpointer="main-conf" />
86 <title>Options</title>
88 <!-- 0 /// elogind also supports a few system commands
89 <para>All options are configured in the
90 <literal>[Login]</literal> section:</para>
92 <para>All login options are configured in the
93 <literal>[Login]</literal> section, system sleep options are
94 configured in the <literal>[Sleep]</literal> section.</para>
97 <!-- 1 /// elogind needs a second level, as we use two sections. -->
98 <refsect2><title>[Login] section:</title>
102 <!-- 0 /// elogind has no support for AutoVT
105 <term><varname>NAutoVTs=</varname></term>
107 <listitem><para>Takes a positive integer. Configures how many
108 virtual terminals (VTs) to allocate by default that, when
109 switched to and are previously unused,
110 <literal>autovt</literal> services are automatically spawned
111 on. These services are instantiated from the template unit
112 <filename>autovt@.service</filename> for the respective VT TTY
113 name, for example, <filename>autovt@tty4.service</filename>.
114 By default, <filename>autovt@.service</filename> is linked to
115 <filename>getty@.service</filename>. In other words, login
116 prompts are started dynamically as the user switches to unused
117 virtual terminals. Hence, this parameter controls how many
118 login <literal>gettys</literal> are available on the VTs. If a
119 VT is already used by some other subsystem (for example, a
120 graphical login), this kind of activation will not be
121 attempted. Note that the VT configured in
122 <varname>ReserveVT=</varname> is always subject to this kind
123 of activation, even if it is not one of the VTs configured
124 with the <varname>NAutoVTs=</varname> directive. Defaults to
125 6. When set to 0, automatic spawning of
126 <literal>autovt</literal> services is
127 disabled.</para></listitem>
131 <term><varname>ReserveVT=</varname></term>
133 <listitem><para>Takes a positive integer. Identifies one
134 virtual terminal that shall unconditionally be reserved for
135 <filename>autovt@.service</filename> activation (see above).
136 The VT selected with this option will be marked busy
137 unconditionally, so that no other subsystem will allocate it.
138 This functionality is useful to ensure that, regardless of how
139 many VTs are allocated by other subsystems, one login
140 <literal>getty</literal> is always available. Defaults to 6
141 (in other words, there will always be a
142 <literal>getty</literal> available on Alt-F6.). When set to 0,
143 VT reservation is disabled.</para></listitem>
148 <term><varname>KillUserProcesses=</varname></term>
150 <listitem><para>Takes a boolean argument. Configures whether the processes of a
151 <!-- 0 /// elogind has no scope unit, and goes for cgroups only
152 user should be killed when the user logs out. If true, the scope unit
153 corresponding to the session and all processes inside that scope will be
154 terminated. If false, the scope is "abandoned", see
155 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
157 user should be killed when the user logs out. If true, the processes
158 listed in their session cgroup will be terminated. If false, the session cgroup
161 and processes are not killed. Defaults to <literal>yes</literal>,
162 but see the options <varname>KillOnlyUsers=</varname> and
163 <varname>KillExcludeUsers=</varname> below.</para>
165 <!-- 0 /// elogind has no user manager unit, and lingering isn't clarified, yet.
166 <para>In addition to session processes, user process may run under the user
167 manager unit <filename>user@.service</filename>. Depending on the linger
168 settings, this may allow users to run processes independent of their login
169 sessions. See the description of <command>enable-linger</command> in
170 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
173 <para>Note that setting <varname>KillUserProcesses=yes</varname>
174 will break tools like
175 <citerefentry project='die-net'><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>
177 <citerefentry project='die-net'><refentrytitle>tmux</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
178 <!-- 0 /// elogind does not provide systemd-run or any equivalent, yet.
179 unless they are moved out of the session scope. See example in
180 <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
182 unless they are moved out of the session scope.
188 <term><varname>KillOnlyUsers=</varname></term>
189 <term><varname>KillExcludeUsers=</varname></term>
191 <listitem><para>These settings take space-separated lists of usernames that override
192 the <varname>KillUserProcesses=</varname> setting. A user name may be added to
193 <varname>KillExcludeUsers=</varname> to exclude the processes in the session scopes of
194 that user from being killed even if <varname>KillUserProcesses=yes</varname> is set. If
195 <varname>KillExcludeUsers=</varname> is not set, the <literal>root</literal> user is
196 excluded by default. <varname>KillExcludeUsers=</varname> may be set to an empty value
197 to override this default. If a user is not excluded, <varname>KillOnlyUsers=</varname>
198 is checked next. If this setting is specified, only the session scopes of those users
199 will be killed. Otherwise, users are subject to the
200 <varname>KillUserProcesses=yes</varname> setting.</para></listitem>
204 <term><varname>IdleAction=</varname></term>
206 <listitem><para>Configures the action to take when the system
207 is idle. Takes one of
208 <literal>ignore</literal>,
209 <literal>poweroff</literal>,
210 <literal>reboot</literal>,
211 <literal>halt</literal>,
212 <literal>kexec</literal>,
213 <literal>suspend</literal>,
214 <literal>hibernate</literal>,
215 <literal>hybrid-sleep</literal>, and
216 <literal>lock</literal>.
217 Defaults to <literal>ignore</literal>.</para>
219 <para>Note that this requires that user sessions correctly
220 report the idle status to the system. The system will execute
221 the action after all sessions report that they are idle, no
222 idle inhibitor lock is active, and subsequently, the time
223 configured with <varname>IdleActionSec=</varname> (see below)
229 <term><varname>IdleActionSec=</varname></term>
231 <listitem><para>Configures the delay after which the action
232 configured in <varname>IdleAction=</varname> (see above) is
233 taken after the system is idle.</para></listitem>
237 <term><varname>InhibitDelayMaxSec=</varname></term>
239 <listitem><para>Specifies the maximum time a system shutdown
240 or sleep request is delayed due to an inhibitor lock of type
241 <literal>delay</literal> being active before the inhibitor is
242 ignored and the operation executes anyway. Defaults to
247 <term><varname>HandlePowerKey=</varname></term>
248 <term><varname>HandleSuspendKey=</varname></term>
249 <term><varname>HandleHibernateKey=</varname></term>
250 <term><varname>HandleLidSwitch=</varname></term>
251 <term><varname>HandleLidSwitchDocked=</varname></term>
253 <listitem><para>Controls how logind shall handle the
254 system power and sleep keys and the lid switch to trigger
255 actions such as system power-off or suspend. Can be one of
256 <literal>ignore</literal>,
257 <literal>poweroff</literal>,
258 <literal>reboot</literal>,
259 <literal>halt</literal>,
260 <literal>kexec</literal>,
261 <literal>suspend</literal>,
262 <literal>hibernate</literal>,
263 <literal>hybrid-sleep</literal>, and
264 <literal>lock</literal>.
265 If <literal>ignore</literal>, logind will never handle these
266 keys. If <literal>lock</literal>, all running sessions will be
267 screen-locked; otherwise, the specified action will be taken
268 in the respective event. Only input devices with the
269 <literal>power-switch</literal> udev tag will be watched for
270 key/lid switch events. <varname>HandlePowerKey=</varname>
271 defaults to <literal>poweroff</literal>.
272 <varname>HandleSuspendKey=</varname> and
273 <varname>HandleLidSwitch=</varname> default to
274 <literal>suspend</literal>.
275 <varname>HandleLidSwitchDocked=</varname> defaults to
276 <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; otherwise the <varname>HandleLidSwitch=</varname>
282 action occurs.</para>
284 <para>A different application may disable logind's handling of system power and
285 sleep keys and the lid switch by taking a low-level inhibitor lock
286 (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
287 <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>).
288 This is most commonly used by graphical desktop environments
289 to take over suspend and hibernation handling, and to use their own configuration
290 mechanisms. If a low-level inhibitor lock is taken, logind will not take any
291 action when that key or switch is triggered and the <varname>Handle*=</varname>
292 settings are irrelevant.</para></listitem>
296 <term><varname>PowerKeyIgnoreInhibited=</varname></term>
297 <term><varname>SuspendKeyIgnoreInhibited=</varname></term>
298 <term><varname>HibernateKeyIgnoreInhibited=</varname></term>
299 <term><varname>LidSwitchIgnoreInhibited=</varname></term>
301 <listitem><para>Controls whether actions that <command>systemd-logind</command>
302 takes when the power and sleep keys and the lid switch are triggered are subject
303 to high-level inhibitor locks ("shutdown", "sleep", "idle"). Low level inhibitor
304 locks (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
305 <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>),
306 are always honored, irrespective of this setting.</para>
308 <para>These settings take boolean arguments. If <literal>no</literal>, the
309 inhibitor locks taken by applications are respected. If <literal>yes</literal>,
310 "shutdown", "sleep", and "idle" inhibitor locks are ignored.
311 <varname>PowerKeyIgnoreInhibited=</varname>,
312 <varname>SuspendKeyIgnoreInhibited=</varname>, and
313 <varname>HibernateKeyIgnoreInhibited=</varname> default to <literal>no</literal>.
314 <varname>LidSwitchIgnoreInhibited=</varname> defaults to <literal>yes</literal>.
315 This means that when <command>systemd-logind</command> is handling events by
316 itself (no low level inhibitor locks are taken by another application), the lid
317 switch does not respect suspend blockers by default, but the power and sleep keys
318 do.</para></listitem>
322 <term><varname>HoldoffTimeoutSec=</varname></term>
324 <listitem><para>Specifies the timeout after system startup or
325 system resume in which systemd will hold off on reacting to
326 lid events. This is required for the system to properly
327 detect any hotplugged devices so systemd can ignore lid events
328 if external monitors, or docks, are connected. If set to 0,
329 systemd will always react immediately, possibly before the
330 kernel fully probed all hotplugged devices. This is safe, as
331 long as you do not care for systemd to account for devices
332 that have been plugged or unplugged while the system was off.
333 Defaults to 30s.</para></listitem>
337 <term><varname>RuntimeDirectorySize=</varname></term>
339 <listitem><para>Sets the size limit on the
340 <varname>$XDG_RUNTIME_DIR</varname> runtime directory for each
341 user who logs in. Takes a size in bytes, optionally suffixed
342 with the usual K, G, M, and T suffixes, to the base 1024
343 (IEC). Alternatively, a numerical percentage suffixed by
344 <literal>%</literal> may be specified, which sets the size
345 limit relative to the amount of physical RAM. Defaults to 10%.
346 Note that this size is a safety limit only. As each runtime
347 directory is a tmpfs file system, it will only consume as much
348 memory as is needed.</para></listitem>
352 <term><varname>InhibitorsMax=</varname></term>
354 <listitem><para>Controls the maximum number of concurrent inhibitors to permit. Defaults to 8192
355 (8K).</para></listitem>
359 <term><varname>SessionsMax=</varname></term>
361 <listitem><para>Controls the maximum number of concurrent user sessions to manage. Defaults to 8192
362 (8K). Depending on how the <filename>pam_systemd.so</filename> module is included in the PAM stack
363 configuration, further login sessions will either be refused, or permitted but not tracked by
364 <filename>systemd-logind</filename>.</para></listitem>
368 <term><varname>UserTasksMax=</varname></term>
370 <listitem><para>Sets the maximum number of OS tasks each user may run concurrently. This controls the
371 <varname>TasksMax=</varname> setting of the per-user slice unit, see
372 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
373 for details. If assigned the special value <literal>infinity</literal>, no tasks limit is applied.
374 Defaults to 33%, which equals 10813 with the kernel's defaults on the host, but might be smaller in
375 OS containers.</para></listitem>
379 <term><varname>RemoveIPC=</varname></term>
381 <listitem><para>Controls whether System V and POSIX IPC objects belonging to the user shall be removed when the
382 user fully logs out. Takes a boolean argument. If enabled, the user may not consume IPC resources after the
383 last of the user's sessions terminated. This covers System V semaphores, shared memory and message queues, as
384 well as POSIX shared memory and message queues. Note that IPC objects of the root user and other system users
385 are excluded from the effect of this setting. Defaults to <literal>yes</literal>.</para></listitem>
389 <!-- 1 /// elogind has an additional section for system commands. -->
392 <refsect2><title>[Sleep] section:</title>
393 <para><command>elogind</command> supports three general
394 power-saving modes:</para>
400 <listitem><para>a low-power state
401 where execution of the OS is paused,
402 and complete power loss might result
403 in lost data, and which is fast to
404 enter and exit. This corresponds to
405 suspend, standby, or freeze states as
406 understood by the kernel.
411 <term>hibernate</term>
413 <listitem><para>a low-power state
414 where execution of the OS is paused,
415 and complete power loss does not
416 result in lost data, and which might
417 be slow to enter and exit. This
418 corresponds to the hibernation as
419 understood by the kernel.
424 <term>hybrid-sleep</term>
426 <listitem><para>a low-power state
427 where execution of the OS is paused,
428 which might be slow to enter, and on
429 complete power loss does not result in
430 lost data but might be slower to exit
431 in that case. This mode is called
432 suspend-to-both by the kernel.
437 <term><varname>SuspendMode=</varname></term>
438 <term><varname>HibernateMode=</varname></term>
439 <term><varname>HybridSleepMode=</varname></term>
441 <listitem><para>The string to be written to
442 <filename>/sys/power/disk</filename> by elogind.
443 More than one value can be specified by separating
444 multiple values with whitespace. They will be tried
445 in turn, until one is written without error. If
446 neither succeeds, the operation will be aborted.
451 <term><varname>SuspendState=</varname></term>
452 <term><varname>HibernateState=</varname></term>
453 <term><varname>HybridSleepState=</varname></term>
455 <listitem><para>The string to be written to
456 <filename>/sys/power/state</filename> by elogind.
457 More than one value can be specified by separating
458 multiple values with whitespace. They will be tried
459 in turn, until one is written without error. If
460 neither succeeds, the operation will be aborted.
470 <title>See Also</title>
472 <!-- 0 /// elogind is in section 8
473 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
474 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
476 <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
478 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
479 <!-- 0 /// UNNEEDED by elogind
480 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>