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
15 elogind is free software; you can redistribute it and/or modify it
16 under the terms of the GNU Lesser General Public License as published by
17 the Free Software Foundation; either version 2.1 of the License, or
18 (at your option) any later version.
20 elogind is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 Lesser General Public License for more details.
25 You should have received a copy of the GNU Lesser General Public License
26 along with elogind; If not, see <http://www.gnu.org/licenses/>.
29 <!-- 0 /// elogind does not have to enable itself in configure
30 <refentry id="logind.conf" conditional='ENABLE_LOGIND'
31 xmlns:xi="http://www.w3.org/2001/XInclude">
33 <title>logind.conf</title>
34 <productname>systemd</productname>
36 <refentry id="logind.conf" xmlns:xi="http://www.w3.org/2001/XInclude">
38 <title>logind.conf</title>
39 <productname>elogind</productname>
44 <contrib>Developer</contrib>
45 <firstname>Lennart</firstname>
46 <surname>Poettering</surname>
47 <email>lennart@poettering.net</email>
53 <refentrytitle>logind.conf</refentrytitle>
54 <manvolnum>5</manvolnum>
58 <refname>logind.conf</refname>
59 <!-- 0 /// not supported by elogind
60 <refname>logind.conf.d</refname>
62 <refpurpose>Login manager configuration files</refpurpose>
66 <para><filename>/etc/elogind/logind.conf</filename></para>
67 <!-- 0 /// not supported by elogind
68 <para><filename>/etc/systemd/logind.conf.d/*.conf</filename></para>
69 <para><filename>/run/systemd/logind.conf.d/*.conf</filename></para>
70 <para><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></para>
75 <title>Description</title>
77 <para>These files configure various parameters of the elogind
78 <!-- 0 /// elogind does not need a service file.
80 <citerefentry><refentrytitle>elogind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
87 <!-- 0 /// elogind has only this configuration
88 <xi:include href="standard-conf.xml" xpointer="main-conf" />
92 <title>Options</title>
94 <!-- 0 /// elogind also supports a few system commands
95 <para>All options are configured in the
96 <literal>[Login]</literal> section:</para>
98 <para>All login options are configured in the
99 <literal>[Login]</literal> section, system sleep options are
100 configured in the <literal>[Sleep]</literal> section.</para>
103 <!-- 1 /// elogind needs a second level, as we use two sections. -->
104 <refsect2><title>[Login] section:</title>
108 <!-- 0 /// elogind has no support for AutoVT
111 <term><varname>NAutoVTs=</varname></term>
113 <listitem><para>Takes a positive integer. Configures how many
114 virtual terminals (VTs) to allocate by default that, when
115 switched to and are previously unused,
116 <literal>autovt</literal> services are automatically spawned
117 on. These services are instantiated from the template unit
118 <filename>autovt@.service</filename> for the respective VT TTY
119 name, for example, <filename>autovt@tty4.service</filename>.
120 By default, <filename>autovt@.service</filename> is linked to
121 <filename>getty@.service</filename>. In other words, login
122 prompts are started dynamically as the user switches to unused
123 virtual terminals. Hence, this parameter controls how many
124 login <literal>gettys</literal> are available on the VTs. If a
125 VT is already used by some other subsystem (for example, a
126 graphical login), this kind of activation will not be
127 attempted. Note that the VT configured in
128 <varname>ReserveVT=</varname> is always subject to this kind
129 of activation, even if it is not one of the VTs configured
130 with the <varname>NAutoVTs=</varname> directive. Defaults to
131 6. When set to 0, automatic spawning of
132 <literal>autovt</literal> services is
133 disabled.</para></listitem>
137 <term><varname>ReserveVT=</varname></term>
139 <listitem><para>Takes a positive integer. Identifies one
140 virtual terminal that shall unconditionally be reserved for
141 <filename>autovt@.service</filename> activation (see above).
142 The VT selected with this option will be marked busy
143 unconditionally, so that no other subsystem will allocate it.
144 This functionality is useful to ensure that, regardless of how
145 many VTs are allocated by other subsystems, one login
146 <literal>getty</literal> is always available. Defaults to 6
147 (in other words, there will always be a
148 <literal>getty</literal> available on Alt-F6.). When set to 0,
149 VT reservation is disabled.</para></listitem>
154 <term><varname>KillUserProcesses=</varname></term>
156 <listitem><para>Takes a boolean argument. Configures whether the processes of a
157 <!-- 0 /// elogind has no scope unit, and goes for cgroups only
158 user should be killed when the user logs out. If true, the scope unit
159 corresponding to the session and all processes inside that scope will be
160 terminated. If false, the scope is "abandoned", see
161 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
162 and processes are not killed. Defaults to <literal>&KILL_USER_PROCESSES;</literal>,
164 user should be killed when the user logs out. If true, the processes
165 listed in their session cgroup will be terminated. If false, the session cgroup
168 but see the options <varname>KillOnlyUsers=</varname> and
169 <varname>KillExcludeUsers=</varname> below.</para>
171 <!-- 0 /// elogind has no user manager unit, and lingering isn't clarified, yet.
172 <para>In addition to session processes, user process may run under the user
173 manager unit <filename>user@.service</filename>. Depending on the linger
174 settings, this may allow users to run processes independent of their login
175 sessions. See the description of <command>enable-linger</command> in
176 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
180 <para>Note that setting <varname>KillUserProcesses=yes</varname>
181 will break tools like
182 <citerefentry project='die-net'><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>
184 <citerefentry project='die-net'><refentrytitle>tmux</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
185 <!-- 0 /// elogind does not provide systemd-run or any equivalent, yet.
186 unless they are moved out of the session scope. See example in
187 <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
189 unless they are moved out of the session scope.
195 <term><varname>KillOnlyUsers=</varname></term>
196 <term><varname>KillExcludeUsers=</varname></term>
198 <listitem><para>These settings take space-separated lists of usernames that override
199 the <varname>KillUserProcesses=</varname> setting. A user name may be added to
200 <varname>KillExcludeUsers=</varname> to exclude the processes in the session scopes of
201 that user from being killed even if <varname>KillUserProcesses=yes</varname> is set. If
202 <varname>KillExcludeUsers=</varname> is not set, the <literal>root</literal> user is
203 excluded by default. <varname>KillExcludeUsers=</varname> may be set to an empty value
204 to override this default. If a user is not excluded, <varname>KillOnlyUsers=</varname>
205 is checked next. If this setting is specified, only the session scopes of those users
206 will be killed. Otherwise, users are subject to the
207 <varname>KillUserProcesses=yes</varname> setting.</para></listitem>
211 <term><varname>IdleAction=</varname></term>
213 <listitem><para>Configures the action to take when the system
214 is idle. Takes one of
215 <literal>ignore</literal>,
216 <literal>poweroff</literal>,
217 <literal>reboot</literal>,
218 <literal>halt</literal>,
219 <literal>kexec</literal>,
220 <literal>suspend</literal>,
221 <literal>hibernate</literal>,
222 <literal>hybrid-sleep</literal>,
223 <literal>suspend-then-hibernate</literal>, and
224 <literal>lock</literal>.
225 Defaults to <literal>ignore</literal>.</para>
227 <para>Note that this requires that user sessions correctly
228 report the idle status to the system. The system will execute
229 the action after all sessions report that they are idle, no
230 idle inhibitor lock is active, and subsequently, the time
231 configured with <varname>IdleActionSec=</varname> (see below)
237 <term><varname>IdleActionSec=</varname></term>
239 <listitem><para>Configures the delay after which the action
240 configured in <varname>IdleAction=</varname> (see above) is
241 taken after the system is idle.</para></listitem>
245 <term><varname>InhibitDelayMaxSec=</varname></term>
247 <listitem><para>Specifies the maximum time a system shutdown
248 or sleep request is delayed due to an inhibitor lock of type
249 <literal>delay</literal> being active before the inhibitor is
250 ignored and the operation executes anyway. Defaults to
255 <term><varname>HandlePowerKey=</varname></term>
256 <term><varname>HandleSuspendKey=</varname></term>
257 <term><varname>HandleHibernateKey=</varname></term>
258 <term><varname>HandleLidSwitch=</varname></term>
259 <term><varname>HandleLidSwitchExternalPower=</varname></term>
260 <term><varname>HandleLidSwitchDocked=</varname></term>
262 <listitem><para>Controls how logind shall handle the
263 system power and sleep keys and the lid switch to trigger
264 actions such as system power-off or suspend. Can be one of
265 <literal>ignore</literal>,
266 <literal>poweroff</literal>,
267 <literal>reboot</literal>,
268 <literal>halt</literal>,
269 <literal>kexec</literal>,
270 <literal>suspend</literal>,
271 <literal>hibernate</literal>,
272 <literal>hybrid-sleep</literal>,
273 <literal>suspend-then-hibernate</literal>, and
274 <literal>lock</literal>.
275 If <literal>ignore</literal>, logind will never handle these
276 keys. If <literal>lock</literal>, all running sessions will be
277 screen-locked; otherwise, the specified action will be taken
278 in the respective event. Only input devices with the
279 <literal>power-switch</literal> udev tag will be watched for
280 key/lid switch events. <varname>HandlePowerKey=</varname>
281 defaults to <literal>poweroff</literal>.
282 <varname>HandleSuspendKey=</varname> and
283 <varname>HandleLidSwitch=</varname> default to
284 <literal>suspend</literal>.
285 <varname>HandleLidSwitchExternalPower=</varname> is completely
286 ignored by default (for backwards compatibility) — an explicit
287 value must be set before it will be used to determine
288 behaviour. <varname>HandleLidSwitchDocked=</varname> defaults
289 to <literal>ignore</literal>.
290 <varname>HandleHibernateKey=</varname> defaults to
291 <literal>hibernate</literal>. If the system is inserted in a
292 docking station, or if more than one display is connected, the
293 action specified by <varname>HandleLidSwitchDocked=</varname>
294 occurs; if the system is on external power the action (if any)
295 specified by <varname>HandleLidSwitchExternalPower=</varname>
296 occurs; otherwise the <varname>HandleLidSwitch=</varname>
297 action occurs.</para>
299 <para>A different application may disable logind's handling of system power and
300 sleep keys and the lid switch by taking a low-level inhibitor lock
301 (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
302 <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>).
303 This is most commonly used by graphical desktop environments
304 to take over suspend and hibernation handling, and to use their own configuration
305 mechanisms. If a low-level inhibitor lock is taken, logind will not take any
306 action when that key or switch is triggered and the <varname>Handle*=</varname>
307 settings are irrelevant.</para></listitem>
311 <term><varname>PowerKeyIgnoreInhibited=</varname></term>
312 <term><varname>SuspendKeyIgnoreInhibited=</varname></term>
313 <term><varname>HibernateKeyIgnoreInhibited=</varname></term>
314 <term><varname>LidSwitchIgnoreInhibited=</varname></term>
316 <listitem><para>Controls whether actions that <command>elogind</command>
317 takes when the power and sleep keys and the lid switch are triggered are subject
318 to high-level inhibitor locks ("shutdown", "sleep", "idle"). Low level inhibitor
319 locks (<literal>handle-power-key</literal>, <literal>handle-suspend-key</literal>,
320 <literal>handle-hibernate-key</literal>, <literal>handle-lid-switch</literal>),
321 are always honored, irrespective of this setting.</para>
323 <para>These settings take boolean arguments. If <literal>no</literal>, the
324 inhibitor locks taken by applications are respected. If <literal>yes</literal>,
325 "shutdown", "sleep", and "idle" inhibitor locks are ignored.
326 <varname>PowerKeyIgnoreInhibited=</varname>,
327 <varname>SuspendKeyIgnoreInhibited=</varname>, and
328 <varname>HibernateKeyIgnoreInhibited=</varname> default to <literal>no</literal>.
329 <varname>LidSwitchIgnoreInhibited=</varname> defaults to <literal>yes</literal>.
330 This means that when <command>elogind</command> is handling events by
331 itself (no low level inhibitor locks are taken by another application), the lid
332 switch does not respect suspend blockers by default, but the power and sleep keys
333 do.</para></listitem>
337 <term><varname>HoldoffTimeoutSec=</varname></term>
339 <listitem><para>Specifies the timeout after system startup or
340 system resume in which systemd will hold off on reacting to
341 lid events. This is required for the system to properly
342 detect any hotplugged devices so systemd can ignore lid events
343 if external monitors, or docks, are connected. If set to 0,
344 systemd will always react immediately, possibly before the
345 kernel fully probed all hotplugged devices. This is safe, as
346 long as you do not care for systemd to account for devices
347 that have been plugged or unplugged while the system was off.
348 Defaults to 30s.</para></listitem>
352 <term><varname>RuntimeDirectorySize=</varname></term>
354 <listitem><para>Sets the size limit on the
355 <varname>$XDG_RUNTIME_DIR</varname> runtime directory for each
356 user who logs in. Takes a size in bytes, optionally suffixed
357 with the usual K, G, M, and T suffixes, to the base 1024
358 (IEC). Alternatively, a numerical percentage suffixed by
359 <literal>%</literal> may be specified, which sets the size
360 limit relative to the amount of physical RAM. Defaults to 10%.
361 Note that this size is a safety limit only. As each runtime
362 directory is a tmpfs file system, it will only consume as much
363 memory as is needed.</para></listitem>
367 <term><varname>InhibitorsMax=</varname></term>
369 <listitem><para>Controls the maximum number of concurrent inhibitors to permit. Defaults to 8192
370 (8K).</para></listitem>
374 <term><varname>SessionsMax=</varname></term>
376 <listitem><para>Controls the maximum number of concurrent user sessions to manage. Defaults to 8192
377 (8K). Depending on how the <filename>pam_systemd.so</filename> module is included in the PAM stack
378 configuration, further login sessions will either be refused, or permitted but not tracked by
379 <filename>elogind</filename>.</para></listitem>
383 <term><varname>UserTasksMax=</varname></term>
385 <listitem><para>Sets the maximum number of OS tasks each user may run concurrently. This controls the
386 <varname>TasksMax=</varname> setting of the per-user slice unit, see
387 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
388 for details. If assigned the special value <literal>infinity</literal>, no tasks limit is applied.
389 Defaults to 33%, which equals 10813 with the kernel's defaults on the host, but might be smaller in
390 OS containers.</para></listitem>
394 <term><varname>RemoveIPC=</varname></term>
396 <listitem><para>Controls whether System V and POSIX IPC objects belonging to the user shall be removed when the
397 user fully logs out. Takes a boolean argument. If enabled, the user may not consume IPC resources after the
398 last of the user's sessions terminated. This covers System V semaphores, shared memory and message queues, as
399 well as POSIX shared memory and message queues. Note that IPC objects of the root user and other system users
400 are excluded from the effect of this setting. Defaults to <literal>yes</literal>.</para></listitem>
404 <!-- 1 /// elogind has an additional section for system commands. -->
407 <refsect2><title>[Sleep] section:</title>
408 <para><command>elogind</command> supports three general
409 power-saving modes:</para>
415 <listitem><para>a low-power state
416 where execution of the OS is paused,
417 and complete power loss might result
418 in lost data, and which is fast to
419 enter and exit. This corresponds to
420 suspend, standby, or freeze states as
421 understood by the kernel.
426 <term>hibernate</term>
428 <listitem><para>a low-power state
429 where execution of the OS is paused,
430 and complete power loss does not
431 result in lost data, and which might
432 be slow to enter and exit. This
433 corresponds to the hibernation as
434 understood by the kernel.
439 <term>hybrid-sleep</term>
441 <listitem><para>a low-power state
442 where execution of the OS is paused,
443 which might be slow to enter, and on
444 complete power loss does not result in
445 lost data but might be slower to exit
446 in that case. This mode is called
447 suspend-to-both by the kernel.
452 <term><varname>SuspendMode=</varname></term>
453 <term><varname>HibernateMode=</varname></term>
454 <term><varname>HybridSleepMode=</varname></term>
456 <listitem><para>The string to be written to
457 <filename>/sys/power/disk</filename> by elogind.
458 More than one value can be specified by separating
459 multiple values with whitespace. They will be tried
460 in turn, until one is written without error. If
461 neither succeeds, the operation will be aborted.
466 <term><varname>SuspendState=</varname></term>
467 <term><varname>HibernateState=</varname></term>
468 <term><varname>HybridSleepState=</varname></term>
470 <listitem><para>The string to be written to
471 <filename>/sys/power/state</filename> by elogind.
472 More than one value can be specified by separating
473 multiple values with whitespace. They will be tried
474 in turn, until one is written without error. If
475 neither succeeds, the operation will be aborted.
485 <title>See Also</title>
487 <!-- 0 /// elogind is in section 8
488 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
489 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
491 <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
493 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
494 <!-- 0 /// UNNEEDED by elogind
495 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>