Debian Codegraph @

upstream/debian-unstable/man5/logind.conf.5

raw
1 '\" t
2 .TH "LOGIND\&.CONF" "5" "" "systemd 261~rc3" "logind.conf"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 logind.conf, logind.conf.d \- Login manager configuration files
24 .SH "SYNOPSIS"
25 .PP
26 .RS 4
27 /etc/systemd/logind\&.conf
28 .RE
29 .RS 4
30 /run/systemd/logind\&.conf
31 .RE
32 .RS 4
33 /usr/local/lib/systemd/logind\&.conf
34 .RE
35 .RS 4
36 /usr/lib/systemd/logind\&.conf
37 .RE
38 .RS 4
39 /etc/systemd/logind\&.conf\&.d/*\&.conf
40 .RE
41 .RS 4
42 /run/systemd/logind\&.conf\&.d/*\&.conf
43 .RE
44 .RS 4
45 /usr/local/lib/systemd/logind\&.conf\&.d/*\&.conf
46 .RE
47 .RS 4
48 /usr/lib/systemd/logind\&.conf\&.d/*\&.conf
49 .RE
50 .SH "DESCRIPTION"
51 .PP
52 These files configure various parameters of the systemd login manager,
53 \fBsystemd-logind.service\fR(8)\&. See
54 \fBsystemd.syntax\fR(7)
55 for a general description of the syntax\&.
56 .SH "CONFIGURATION DIRECTORIES AND PRECEDENCE"
57 .PP
58 The default configuration is set during compilation, so configuration is only needed when it is necessary to deviate from those defaults\&. The main configuration file is loaded from one of the listed directories in order of priority, only the first file found is used:
59 /etc/systemd/,
60 /run/systemd/,
61 /usr/local/lib/systemd/
62 \&\s-2\u[1]\d\s+2,
63 /usr/lib/systemd/\&. The vendor version of the file contains commented out entries showing the defaults as a guide to the administrator\&. Local overrides can also be created by creating drop\-ins, as described below\&. The main configuration file can also be edited for this purpose (or a copy in
64 /etc/
65 if it is shipped under
66 /usr/), however using drop\-ins for local configuration is recommended over modifications to the main configuration file\&.
67 .PP
68 In addition to the main configuration file, drop\-in configuration snippets are read from
69 /usr/lib/systemd/*\&.conf\&.d/,
70 /usr/local/lib/systemd/*\&.conf\&.d/, and
71 /etc/systemd/*\&.conf\&.d/\&. Those drop\-ins have higher precedence and override the main configuration file\&. Files in the
72 *\&.conf\&.d/
73 configuration subdirectories are sorted by their filename in lexicographic order, regardless of in which of the subdirectories they reside\&. When multiple files specify the same option, for options which accept just a single value, the entry in the file sorted last takes precedence, and for options which accept a list of values, entries are collected as they occur in the sorted files\&.
74 .PP
75 When packages need to customize the configuration, they can install drop\-ins under
76 /usr/\&. Files in
77 /etc/
78 are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages\&. Drop\-ins have to be used to override package drop\-ins, since the main configuration file has lower precedence\&. It is recommended to prefix all filenames in those subdirectories with a two\-digit number and a dash, to simplify the ordering\&. This also defines a concept of drop\-in priorities to allow OS vendors to ship drop\-ins within a specific range lower than the range used by users\&. This should lower the risk of package drop\-ins overriding accidentally drop\-ins defined by users\&. It is recommended to use the range 10\-40 for drop\-ins in
79 /usr/
80 and the range 60\-90 for drop\-ins in
81 /etc/
82 and
83 /run/, to make sure that local and transient drop\-ins take priority over drop\-ins shipped by the OS vendor\&.
84 .PP
85 To disable a configuration file supplied by the vendor, the recommended way is to place a symlink to
86 /dev/null
87 in the configuration directory in
88 /etc/, with the same filename as the vendor configuration file\&.
89 .SH "OPTIONS"
90 .PP
91 All options are configured in the [Login] section:
92 .PP
93 \fINAutoVTs=\fR
94 .RS 4
95 Takes a positive integer\&. Configures how many virtual terminals (VTs) to allocate by default that, when switched to and are previously unused,
96 "autovt"
97 services are automatically spawned on\&. These services are instantiated from the template unit
98 autovt@\&.service
99 for the respective VT TTY name, for example,
100 autovt@tty4\&.service\&. By default,
101 autovt@\&.service
102 is linked to
103 getty@\&.service\&. In other words, login prompts are started dynamically as the user switches to unused virtual terminals\&. Hence, this parameter controls how many login
104 "gettys"
105 are available on the VTs\&. If a VT is already used by some other subsystem (for example, a graphical login), this kind of activation will not be attempted\&. Note that the VT configured in
106 \fIReserveVT=\fR
107 is always subject to this kind of activation, even if it is not one of the VTs configured with the
108 \fINAutoVTs=\fR
109 directive\&. Defaults to 6\&. When set to 0, automatic spawning of
110 "autovt"
111 services is disabled\&.
112 .RE
113 .PP
114 \fIReserveVT=\fR
115 .RS 4
116 Takes a positive integer\&. Identifies one virtual terminal that shall unconditionally be reserved for
117 autovt@\&.service
118 activation (see above)\&. The VT selected with this option will be marked busy unconditionally, so that no other subsystem will allocate it\&. This functionality is useful to ensure that, regardless of how many VTs are allocated by other subsystems, one login
119 "getty"
120 is always available\&. Defaults to 6 (in other words, there will always be a
121 "getty"
122 available on Alt\-F6\&.)\&. When set to 0, VT reservation is disabled\&.
123 .sp
124 Added in version 190\&.
125 .RE
126 .PP
127 \fIKillUserProcesses=\fR
128 .RS 4
129 Takes a boolean argument\&. Configures whether the processes of a user should be killed when the user logs out\&. If true, the scope unit corresponding to the session and all processes inside that scope will be terminated\&. If false, the scope is "abandoned", see
130 \fBsystemd.scope\fR(5), and processes are not killed\&. Defaults to
131 "no", but see the options
132 \fIKillOnlyUsers=\fR
133 and
134 \fIKillExcludeUsers=\fR
135 below\&.
136 .sp
137 In addition to session processes, user process may run under the user manager unit
138 user@\&.service\&. Depending on the linger settings, this may allow users to run processes independent of their login sessions\&. See the description of
139 \fBenable\-linger\fR
140 in
141 \fBloginctl\fR(1)\&.
142 .sp
143 Note that setting
144 \fIKillUserProcesses=yes\fR
145 will break tools like
146 \fBscreen\fR(1)
147 and
148 \fBtmux\fR(1), unless they are moved out of the session scope\&. See example in
149 \fBsystemd-run\fR(1)\&.
150 .RE
151 .PP
152 \fIKillOnlyUsers=\fR, \fIKillExcludeUsers=\fR
153 .RS 4
154 These settings take space\-separated lists of usernames that override the
155 \fIKillUserProcesses=\fR
156 setting\&. A user name may be added to
157 \fIKillExcludeUsers=\fR
158 to exclude the processes in the session scopes of that user from being killed even if
159 \fIKillUserProcesses=yes\fR
160 is set\&. If
161 \fIKillExcludeUsers=\fR
162 is not set, the
163 "root"
164 user is excluded by default\&.
165 \fIKillExcludeUsers=\fR
166 may be set to an empty value to override this default\&. If a user is not excluded,
167 \fIKillOnlyUsers=\fR
168 is checked next\&. If this setting is specified, only the processes in the session scopes of those users will be killed\&. Otherwise, users are subject to the
169 \fIKillUserProcesses=yes\fR
170 setting\&.
171 .RE
172 .PP
173 \fIIdleAction=\fR
174 .RS 4
175 Configures the action to take when the system is idle\&. Takes one of
176 "ignore",
177 "poweroff",
178 "reboot",
179 "halt",
180 "kexec",
181 "suspend",
182 "hibernate",
183 "hybrid\-sleep",
184 "suspend\-then\-hibernate",
185 "sleep", and
186 "lock"\&. Defaults to
187 "ignore"\&.
188 .sp
189 Note that this requires that user sessions correctly report the idle status to the system\&. The system will execute the action after all sessions report that they are idle, no idle inhibitor lock is active, and subsequently, the time configured with
190 \fIIdleActionSec=\fR
191 (see below) has expired\&.
192 .sp
193 Added in version 198\&.
194 .RE
195 .PP
196 \fIIdleActionSec=\fR
197 .RS 4
198 Configures the delay after which the action configured in
199 \fIIdleAction=\fR
200 (see above) is taken after the system is idle\&.
201 .sp
202 Added in version 198\&.
203 .RE
204 .PP
205 \fIInhibitDelayMaxSec=\fR
206 .RS 4
207 Specifies the maximum time a system shutdown or sleep request is delayed due to an inhibitor lock of type
208 "delay"
209 being active before the inhibitor is ignored and the operation executes anyway\&. Defaults to 5\&.
210 .RE
211 .PP
212 \fIUserStopDelaySec=\fR
213 .RS 4
214 Specifies how long to keep the user record and per\-user service
215 user@\&.service
216 around for a user after they logged out fully\&. If set to zero, the per\-user service is terminated immediately when the last session of the user has ended\&. If this option is configured to non\-zero rapid logout/login cycles are sped up, as the user\*(Aqs service manager is not constantly restarted\&. If set to
217 "infinity"
218 the per\-user service for a user is never terminated again after first login, and continues to run until system shutdown\&. Defaults to 10s\&.
219 .sp
220 Added in version 240\&.
221 .RE
222 .PP
223 \fISleepOperation=\fR
224 .RS 4
225 Takes a list of sleep operations\&. Possible values are
226 "suspend",
227 "hibernate",
228 "hybrid\-sleep", and
229 "suspend\-then\-hibernate"\&. Controls the candidate sleep operations for the
230 "sleep"
231 action\&. When
232 "sleep"
233 action is performed, the specified sleep operations are checked in a fixed order ("suspend\-then\-hibernate"
234 →
235 "hybrid\-sleep"
236 →
237 "suspend"
238 →
239 "hibernate"), and the first one supported by the machine is used to put the system into sleep\&. Defaults to
240 "suspend\-then\-hibernate suspend hibernate"\&.
241 .sp
242 Added in version 256\&.
243 .RE
244 .PP
245 \fIHandlePowerKey=\fR, \fIHandlePowerKeyLongPress=\fR, \fIHandleRebootKey=\fR, \fIHandleRebootKeyLongPress=\fR, \fIHandleSuspendKey=\fR, \fIHandleSuspendKeyLongPress=\fR, \fIHandleHibernateKey=\fR, \fIHandleHibernateKeyLongPress=\fR, \fIHandleLidSwitch=\fR, \fIHandleLidSwitchExternalPower=\fR, \fIHandleLidSwitchDocked=\fR, \fIHandleSecureAttentionKey=\fR
246 .RS 4
247 Controls how logind shall handle the system power, reboot and sleep keys and the lid switch to trigger actions such as system power\-off, reboot or suspend\&. Can be one of
248 "ignore",
249 "poweroff",
250 "reboot",
251 "halt",
252 "kexec",
253 "suspend",
254 "hibernate",
255 "hybrid\-sleep",
256 "suspend\-then\-hibernate",
257 "sleep",
258 "lock",
259 "factory\-reset", and
260 "secure\-attention\-key"\&. If
261 "ignore",
262 \fBsystemd\-logind\fR
263 will never handle these keys\&. If
264 "lock", all running sessions will be screen\-locked; otherwise, the specified action will be taken in the respective event\&. Only input devices with the
265 "power\-switch"
266 udev tag will be watched for key/lid switch events\&.
267 .sp
268 \fIHandlePowerKey=\fR
269 defaults to
270 "poweroff",
271 \fIHandleRebootKey=\fR
272 defaults to
273 "reboot",
274 \fIHandleSuspendKey=\fR
275 defaults to
276 "suspend",
277 \fIHandleHibernateKey=\fR
278 defaults to
279 "hibernate",
280 \fIHandlePowerKeyLongPress=\fR
281 defaults to
282 "ignore",
283 \fIHandleRebootKeyLongPress=\fR
284 defaults to
285 "poweroff",
286 \fIHandleSuspendKeyLongPress=\fR
287 defaults to
288 "hibernate",
289 \fIHandleHibernateKeyLongPress=\fR
290 defaults to
291 "ignore"\&.
292 \fIHandleLidSwitch=\fR
293 defaults to
294 "suspend"\&.
295 \fIHandleLidSwitchExternalPower=\fR
296 is completely ignored by default (for backwards compatibility) \(em an explicit value must be set before it will be used to determine behaviour\&.
297 \fIHandleLidSwitchDocked=\fR
298 defaults to
299 "ignore"\&. If the system is inserted in a docking station, or if more than one display is connected, the action specified by
300 \fIHandleLidSwitchDocked=\fR
301 occurs; if the system is on external power the action (if any) specified by
302 \fIHandleLidSwitchExternalPower=\fR
303 occurs; otherwise the
304 \fIHandleLidSwitch=\fR
305 action occurs\&.
306 \fIHandleSecureAttentionKey=\fR
307 defaults to
308 "secure\-attention\-key"
309 .sp
310 A different application may disable logind\*(Aqs handling of system power and sleep keys and the lid switch by taking a low\-level inhibitor lock ("handle\-power\-key",
311 "handle\-suspend\-key",
312 "handle\-hibernate\-key",
313 "handle\-lid\-switch",
314 "handle\-reboot\-key")\&. This is most commonly used by graphical desktop environments to take over suspend and hibernation handling, and to use their own configuration mechanisms\&. If a low\-level inhibitor lock is taken, logind will not take any action when that key or switch is triggered and the
315 \fIHandle*=\fR
316 settings are irrelevant, except for
317 \fIHandleSecureAttentionKey=\fR, which is always handled since its addition in v257\&.
318 .sp
319 Added in version 184\&.
320 .RE
321 .PP
322 \fIPowerKeyIgnoreInhibited=\fR, \fISuspendKeyIgnoreInhibited=\fR, \fIHibernateKeyIgnoreInhibited=\fR, \fILidSwitchIgnoreInhibited=\fR, \fIRebootKeyIgnoreInhibited=\fR
323 .RS 4
324 Controls whether actions that
325 \fBsystemd\-logind\fR
326 takes when the power, reboot and sleep keys and the lid switch are triggered are subject to high\-level inhibitor locks ("shutdown", "reboot", "sleep", "idle")\&. Low level inhibitor locks ("handle\-power\-key",
327 "handle\-suspend\-key",
328 "handle\-hibernate\-key",
329 "handle\-lid\-switch",
330 "handle\-reboot\-key"), are always honored, irrespective of this setting\&.
331 .sp
332 These settings take boolean arguments\&. If
333 "no", the inhibitor locks taken by applications are respected\&. If
334 "yes", "shutdown", "reboot" "sleep", and "idle" inhibitor locks are ignored\&.
335 \fIPowerKeyIgnoreInhibited=\fR,
336 \fISuspendKeyIgnoreInhibited=\fR,
337 \fIHibernateKeyIgnoreInhibited=\fR
338 and
339 \fIRebootKeyIgnoreInhibited=\fR
340 default to
341 "no"\&.
342 \fILidSwitchIgnoreInhibited=\fR
343 defaults to
344 "yes"\&. This means that when
345 \fBsystemd\-logind\fR
346 is handling events by itself (no low level inhibitor locks are taken by another application), the lid switch does not respect suspend blockers by default, but the power and sleep keys do\&.
347 .sp
348 Added in version 190\&.
349 .RE
350 .PP
351 \fIHoldoffTimeoutSec=\fR
352 .RS 4
353 Specifies a period of time after system startup or system resume in which systemd will hold off on reacting to lid events\&. This is required for the system to properly detect any hotplugged devices so systemd can ignore lid events if external monitors, or docks, are connected\&. If set to 0, systemd will always react immediately, possibly before the kernel fully probed all hotplugged devices\&. This is safe, as long as you do not care for systemd to account for devices that have been plugged or unplugged while the system was off\&. Defaults to 30s\&.
354 .sp
355 Added in version 220\&.
356 .RE
357 .PP
358 \fIRuntimeDirectorySize=\fR
359 .RS 4
360 Sets the size limit on the
361 \fI$XDG_RUNTIME_DIR\fR
362 runtime directory for each user who logs in\&. Takes a size in bytes, optionally suffixed with the usual K, G, M, and T suffixes, to the base 1024 (IEC)\&. Alternatively, a numerical percentage suffixed by
363 "%"
364 may be specified, which sets the size limit relative to the amount of physical RAM\&. Defaults to 10%\&. Note that this size is a safety limit only\&. As each runtime directory is a tmpfs file system, it will only consume as much memory as is needed\&.
365 .sp
366 Added in version 211\&.
367 .RE
368 .PP
369 \fIRuntimeDirectoryInodesMax=\fR
370 .RS 4
371 Sets the limit on number of inodes for the
372 \fI$XDG_RUNTIME_DIR\fR
373 runtime directory for each user who logs in\&. Takes a number, optionally suffixed with the usual K, G, M, and T suffixes, to the base 1024 (IEC)\&. Defaults to
374 \fIRuntimeDirectorySize=\fR
375 divided by 4096\&. Note that this size is a safety limit only\&. As each runtime directory is a tmpfs file system, it will only consume as much memory as is needed\&.
376 .sp
377 Added in version 246\&.
378 .RE
379 .PP
380 \fIInhibitorsMax=\fR
381 .RS 4
382 Controls the maximum number of concurrent inhibitors to permit\&. Defaults to 8192 (8K)\&.
383 .sp
384 Added in version 230\&.
385 .RE
386 .PP
387 \fISessionsMax=\fR
388 .RS 4
389 Controls the maximum number of concurrent user sessions to manage\&. Defaults to 8192 (8K)\&. Depending on how the
390 pam_systemd\&.so
391 module is included in the PAM stack configuration, further login sessions will either be refused, or permitted but not tracked by
392 systemd\-logind\&.
393 .sp
394 Added in version 230\&.
395 .RE
396 .PP
397 \fIRemoveIPC=\fR
398 .RS 4
399 Controls whether System V and POSIX IPC objects belonging to the user shall be removed when the user fully logs out\&. Takes a boolean argument\&. If enabled, the user may not consume IPC resources after the last of the user\*(Aqs sessions terminated\&. This covers System V semaphores, shared memory and message queues, as well as POSIX shared memory and message queues\&. Note that IPC objects of the root user and other system users are excluded from the effect of this setting\&. Defaults to
400 "yes"\&.
401 .sp
402 Added in version 212\&.
403 .RE
404 .PP
405 \fIStopIdleSessionSec=\fR
406 .RS 4
407 Specifies a timeout in seconds, or a time span value after which
408 systemd\-logind
409 checks the idle state of all sessions\&. Every session that is idle for longer than the timeout will be stopped\&. Note that this option does not apply to
410 "greeter"
411 or
412 "lock\-screen"
413 sessions\&. Defaults to
414 "infinity"
415 (systemd\-logind
416 is not checking the idle state of sessions)\&. For details about the syntax of time spans, see
417 \fBsystemd.time\fR(7)\&.
418 .sp
419 Added in version 252\&.
420 .RE
421 .PP
422 \fIDesignatedMaintenanceTime=\fR
423 .RS 4
424 Specifies a default calendar event for scheduled shutdowns\&. So when using e\&.g\&. the command
425 \fBshutdown \-r\fR
426 to reboot the system without specifying a timeout, logind would use the configured calendar event instead\&. For details about the syntax of calendar events, see
427 \fBsystemd.time\fR(7)\&.
428 .sp
429 Added in version 257\&.
430 .RE
431 .PP
432 \fIWallMessages=\fR
433 .RS 4
434 Controls whether
435 \fBwall\fR(1)
436 messages should be sent to the terminals of all currently logged in users upon shutdown or reboot\&. Defaults to
437 "yes", and can be changed at runtime via the DBus
438 "EnableWallMessages"
439 and
440 "WallMessagePrefix"
441 properties\&.
442 .sp
443 Added in version 258\&.
444 .RE
445 .SH "SEE ALSO"
446 .PP
447 \fBsystemd\fR(1), \fBsystemd-logind.service\fR(8), \fBloginctl\fR(1), \fBsystemd-system.conf\fR(5)
448 .SH "NOTES"
449 .IP " 1." 4
450 💣💥🧨💥💥💣 Please note that those configuration files must be available at all times. If
451 /usr/local/
452 is a separate partition, it may not be available during early boot, and must not be used for configuration.
453