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