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