chiark / gitweb /
logind: support for hybrid sleep (i.e. suspend+hibernate at the same time)
[elogind.git] / man / logind.conf.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
6 <!--
7   This file is part of systemd.
8
9   Copyright 2010 Lennart Poettering
10
11   systemd is free software; you can redistribute it and/or modify it
12   under the terms of the GNU Lesser General Public License as published by
13   the Free Software Foundation; either version 2.1 of the License, or
14   (at your option) any later version.
15
16   systemd is distributed in the hope that it will be useful, but
17   WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19   Lesser General Public License for more details.
20
21   You should have received a copy of the GNU Lesser General Public License
22   along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 -->
24
25 <refentry id="logind.conf">
26         <refentryinfo>
27                 <title>logind.conf</title>
28                 <productname>systemd</productname>
29
30                 <authorgroup>
31                         <author>
32                                 <contrib>Developer</contrib>
33                                 <firstname>Lennart</firstname>
34                                 <surname>Poettering</surname>
35                                 <email>lennart@poettering.net</email>
36                         </author>
37                 </authorgroup>
38         </refentryinfo>
39
40         <refmeta>
41                 <refentrytitle>logind.conf</refentrytitle>
42                 <manvolnum>5</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>logind.conf</refname>
47                 <refpurpose>Login manager configuration file</refpurpose>
48         </refnamediv>
49
50         <refsynopsisdiv>
51                 <para><filename>/etc/systemd/logind.conf</filename></para>
52         </refsynopsisdiv>
53
54         <refsect1>
55                 <title>Description</title>
56
57                 <para>This file configures various parameters of the systemd login manager <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
58
59         </refsect1>
60
61         <refsect1>
62                 <title>Options</title>
63
64                 <para>All options are configured in the
65                 <literal>[Login]</literal> section:</para>
66
67                 <variablelist>
68
69                         <varlistentry>
70                                 <term><varname>NAutoVTs=</varname></term>
71
72                                 <listitem><para>Takes a positive
73                                 integer. Configures how many virtual
74                                 terminals (VTs) to allocate by default
75                                 that -- when switched to and
76                                 previously unused --
77                                 <literal>autovt</literal> services are
78                                 automatically spawned on. These
79                                 services are instantiated from the
80                                 template unit
81                                 <filename>autovt@.service</filename>
82                                 for the respective VT TTY name,
83                                 e.g. <filename>autovt@tty4.service</filename>. By
84                                 default
85                                 <filename>autovt@.service</filename>
86                                 is linked to
87                                 <filename>getty@.service</filename>,
88                                 i.e. login prompts are started
89                                 dynamically as the user switches to
90                                 unused virtual terminals. Hence, this
91                                 parameter controls how many login
92                                 <literal>gettys</literal> are
93                                 available on the VTs. If a VT is
94                                 already used by some other subsystem
95                                 (for example a graphical login) this
96                                 kind of activation will not be
97                                 attempted. Note that the VT configured
98                                 in <varname>ReserveVT=</varname> is
99                                 always subject to this kind of
100                                 activation, even if it is not one of
101                                 VTs configured with the
102                                 <varname>NAutoVTs=</varname>
103                                 directive. Defaults to 6. When set to
104                                 0, automatic spawning of
105                                 <literal>autovt</literal> services is
106                                 disabled. </para></listitem>
107                         </varlistentry>
108
109                         <varlistentry>
110                                 <term><varname>ReserveVT=</varname></term>
111
112                                 <listitem><para>Takes a positive
113                                 integer. Configures the number of one
114                                 virtual terminal that shall
115                                 unconditionally be reserved for
116                                 <filename>autovt@.service</filename>
117                                 activation (see above). The VT
118                                 selected with this option will be
119                                 marked busy unconditionally so that no
120                                 other subsystem will allocate it. This
121                                 functionality is useful to ensure that
122                                 regardless how many VTs are allocated
123                                 by other subsystems one login
124                                 <literal>getty</literal> is always
125                                 available. Defaults to 6 (with other
126                                 words: there'll always be a
127                                 <literal>getty</literal> available on
128                                 Alt-F6.). When set to 0, VT
129                                 reservation is
130                                 disabled.</para></listitem>
131                         </varlistentry>
132
133                         <varlistentry>
134                                 <term><varname>KillUserProcesses=</varname></term>
135
136                                 <listitem><para>Takes a boolean
137                                 argument. Configures whether the
138                                 processes of a user should be killed
139                                 when she or he completely logs out (i.e. after
140                                 her/his last session ended). Defaults to
141                                 <literal>no</literal>.</para></listitem>
142                         </varlistentry>
143
144                         <varlistentry>
145                                 <term><varname>KillOnlyUsers=</varname></term>
146                                 <term><varname>KillExcludeUsers=</varname></term>
147
148                                 <listitem><para>These settings take
149                                 space separated lists of user names
150                                 that influence the effect of
151                                 <varname>KillUserProcesses=</varname>. If
152                                 not empty only processes of users
153                                 listed in
154                                 <varname>KillOnlyUsers</varname> will
155                                 be killed when they log out
156                                 entirely. Processes of users listed in
157                                 <varname>KillExcludeUsers=</varname>
158                                 are excluded from being
159                                 killed. <varname>KillExcludeUsers=</varname>
160                                 defaults to <literal>root</literal>
161                                 and takes precedence over
162                                 <varname>KillOnlyUsers=</varname>
163                                 which defaults to the empty list.</para></listitem>
164                         </varlistentry>
165
166                         <varlistentry>
167                                 <term><varname>Controllers=</varname></term>
168                                 <term><varname>ResetControllers=</varname></term>
169
170                                 <listitem><para>These settings control
171                                 the default control group hierarchies
172                                 users logging in are added to. When
173                                 logging in users will get private
174                                 control groups in all hierarchies
175                                 listed in
176                                 <varname>Controllers=</varname> and be
177                                 reset to the root control group in all
178                                 hierarchies listed in
179                                 <varname>ResetControllers=</varname>. <varname>Controllers=</varname>
180                                 defaults to the empty list,
181                                 <varname>ResetControllers=</varname>
182                                 defaults to
183                                 <literal>cpu</literal>.</para></listitem>
184                         </varlistentry>
185
186                         <varlistentry>
187                                 <term><varname>InhibitDelayMaxSec=</varname></term>
188
189                                 <listitem><para>Specifies the maximum
190                                 time a system shutdown or sleep
191                                 request is delayed due to an inhibitor
192                                 lock of type <literal>delay</literal>
193                                 being active -- before it is ignored
194                                 and the operation executed
195                                 anyway. Defaults to
196                                 5s.</para></listitem>
197                         </varlistentry>
198
199                         <varlistentry>
200                                 <term><varname>HandlePowerKey=</varname></term>
201                                 <term><varname>HandleSuspendKey=</varname></term>
202                                 <term><varname>HandleHibernateKey=</varname></term>
203                                 <term><varname>HandleLidSwitch=</varname></term>
204
205                                 <listitem><para>Controls whether
206                                 logind shall handle the system power
207                                 and sleep keys and the lid switch to
208                                 trigger actions such as system
209                                 power-off or suspend. Can be one of
210                                 <literal>ignore</literal>,
211                                 <literal>poweroff</literal>,
212                                 <literal>reboot</literal>,
213                                 <literal>halt</literal>,
214                                 <literal>kexec</literal>,
215                                 <literal>hibernate</literal> and
216                                 <literal>hybrid-sleep</literal>. If
217                                 <literal>ignore</literal> logind will
218                                 never handle these keys. Otherwise the
219                                 specified action will be taken in the
220                                 respective event. Only input devices
221                                 with the
222                                 <literal>power-switch</literal> udev
223                                 tag will be watched for key/lid switch
224                                 events. <varname>HandlePowerKey=</varname>
225                                 defaults to
226                                 <literal>poweroff</literal>.
227                                 <varname>HandleSuspendKey=</varname>
228                                 and
229                                 <varname>HandleLidSwitch=</varname>
230                                 default to <literal>suspend</literal>.
231                                 <varname>HandleHibernateKey=</varname>
232                                 defaults to
233                                 <literal>hibernate</literal>.</para></listitem>
234                         </varlistentry>
235
236                         <varlistentry>
237                                 <term><varname>PowerKeyIgnoreInhibited=</varname></term>
238                                 <term><varname>SuspendKeyIgnoreInhibited=</varname></term>
239                                 <term><varname>HibernateKeyIgnoreInhibited=</varname></term>
240                                 <term><varname>LidSwitchIgnoreInhibited=</varname></term>
241
242                                 <listitem><para>Controls whether
243                                 actions triggered by the power and
244                                 sleep keys and the lid switch are
245                                 subject to inhibitor locks. These
246                                 settings take boolean arguments. If
247                                 <literal>off</literal> the inhibitor
248                                 locks taken by applications in order
249                                 to block the requested operation are
250                                 respected, if <literal>on</literal>
251                                 the requested operation is executed in
252                                 any
253                                 case. <varname>PowerKeyIgnoreInhibited=</varname>,
254                                 <varname>SuspendKeyIgnoreInhibited=</varname>
255                                 and
256                                 <varname>HibernateKeyIgnoreInhibited=</varname>
257                                 defaults to <literal>off</literal>,
258                                 <varname>LidSwitchIgnoreInhibited=</varname>
259                                 defaults to
260                                 <literal>yes</literal>. This means
261                                 that the lid switch does not respect
262                                 suspend blockers by default, but the
263                                 power and sleep keys do.
264                                 </para></listitem>
265                         </varlistentry>
266
267                 </variablelist>
268
269                 <para>Note that setting
270                 <varname>KillUserProcesses=1</varname> will break tools
271                 like
272                 <citerefentry><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
273
274                 <para>Note that <varname>KillUserProcesses=1</varname>
275                 is a weaker version of
276                 <varname>kill-session-processes=1</varname> which may
277                 be configured per-service for
278                 <citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The
279                 latter kills processes of a session as soon as it
280                 ends, the former kills processes as soon as the last
281                 session of the user ends.</para>
282         </refsect1>
283
284         <refsect1>
285                   <title>See Also</title>
286                   <para>
287                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
288                           <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
289                           <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
290                           <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
291                   </para>
292         </refsect1>
293
294 </refentry>