1SYSTEMD-SLEEP.CONF(5)         systemd-sleep.conf         SYSTEMD-SLEEP.CONF(5)
2
3
4

NAME

6       systemd-sleep.conf, sleep.conf.d - Suspend and hibernation
7       configuration file
8

SYNOPSIS

10       /etc/systemd/sleep.conf
11
12       /etc/systemd/sleep.conf.d/*.conf
13
14       /run/systemd/sleep.conf.d/*.conf
15
16       /usr/lib/systemd/sleep.conf.d/*.conf
17

DESCRIPTION

19       systemd supports four general power-saving modes:
20
21       suspend
22           a low-power state where execution of the OS is paused, and complete
23           power loss might result in lost data, and which is fast to enter
24           and exit. This corresponds to suspend, standby, or freeze states as
25           understood by the kernel.
26
27       hibernate
28           a low-power state where execution of the OS is paused, and complete
29           power loss does not result in lost data, and which might be slow to
30           enter and exit. This corresponds to the hibernation as understood
31           by the kernel.
32
33       hybrid-sleep
34           a low-power state where execution of the OS is paused, which might
35           be slow to enter, and on complete power loss does not result in
36           lost data but might be slower to exit in that case. This mode is
37           called suspend-to-both by the kernel.
38
39       suspend-then-hibernate
40           A low power state where the system is initially suspended (the
41           state is stored in RAM). If not interrupted within the delay
42           specified by HibernateDelaySec=, the system will be woken using an
43           RTC alarm and hibernated (the state is then stored on disk).
44
45       Settings in these files determine what strings will be written to
46       /sys/power/disk and /sys/power/state by systemd-sleep(8) when
47       systemd(1) attempts to suspend or hibernate the machine. See
48       systemd.syntax(7) for a general description of the syntax.
49

CONFIGURATION DIRECTORIES AND PRECEDENCE

51       The default configuration is set during compilation, so configuration
52       is only needed when it is necessary to deviate from those defaults.
53       Initially, the main configuration file in /etc/systemd/ contains
54       commented out entries showing the defaults as a guide to the
55       administrator. Local overrides can be created by editing this file or
56       by creating drop-ins, as described below. Using drop-ins for local
57       configuration is recommended over modifications to the main
58       configuration file.
59
60       In addition to the "main" configuration file, drop-in configuration
61       snippets are read from /usr/lib/systemd/*.conf.d/,
62       /usr/local/lib/systemd/*.conf.d/, and /etc/systemd/*.conf.d/. Those
63       drop-ins have higher precedence and override the main configuration
64       file. Files in the *.conf.d/ configuration subdirectories are sorted by
65       their filename in lexicographic order, regardless of in which of the
66       subdirectories they reside. When multiple files specify the same
67       option, for options which accept just a single value, the entry in the
68       file sorted last takes precedence, and for options which accept a list
69       of values, entries are collected as they occur in the sorted files.
70
71       When packages need to customize the configuration, they can install
72       drop-ins under /usr/. Files in /etc/ are reserved for the local
73       administrator, who may use this logic to override the configuration
74       files installed by vendor packages. Drop-ins have to be used to
75       override package drop-ins, since the main configuration file has lower
76       precedence. It is recommended to prefix all filenames in those
77       subdirectories with a two-digit number and a dash, to simplify the
78       ordering of the files.
79
80       To disable a configuration file supplied by the vendor, the recommended
81       way is to place a symlink to /dev/null in the configuration directory
82       in /etc/, with the same filename as the vendor configuration file.
83

OPTIONS

85       The following options can be configured in the [Sleep] section of
86       /etc/systemd/sleep.conf or a sleep.conf.d file:
87
88       AllowSuspend=, AllowHibernation=, AllowSuspendThenHibernate=,
89       AllowHybridSleep=
90           By default any power-saving mode is advertised if possible (i.e.
91           the kernel supports that mode, the necessary resources are
92           available). Those switches can be used to disable specific modes.
93
94           If AllowHibernation=no or AllowSuspend=no is used, this implies
95           AllowSuspendThenHibernate=no and AllowHybridSleep=no, since those
96           methods use both suspend and hibernation internally.
97           AllowSuspendThenHibernate=yes and AllowHybridSleep=yes can be used
98           to override and enable those specific modes.
99
100       SuspendMode=, HibernateMode=, HybridSleepMode=
101           The string to be written to /sys/power/disk by, respectively,
102           systemd-suspend.service(8), systemd-hibernate.service(8), or
103           systemd-hybrid-sleep.service(8). More than one value can be
104           specified by separating multiple values with whitespace. They will
105           be tried in turn, until one is written without error. If neither
106           succeeds, the operation will be aborted.
107
108           systemd-suspend-then-hibernate.service(8) uses the value of
109           SuspendMode= when suspending and the value of HibernateMode= when
110           hibernating.
111
112       SuspendState=, HibernateState=, HybridSleepState=
113           The string to be written to /sys/power/state by, respectively,
114           systemd-suspend.service(8), systemd-hibernate.service(8), or
115           systemd-hybrid-sleep.service(8). More than one value can be
116           specified by separating multiple values with whitespace. They will
117           be tried in turn, until one is written without error. If neither
118           succeeds, the operation will be aborted.
119
120           systemd-suspend-then-hibernate.service(8) uses the value of
121           SuspendState= when suspending and the value of HibernateState= when
122           hibernating.
123
124       HibernateDelaySec=
125           The amount of time the system spends in suspend mode before the
126           system is automatically put into hibernate mode, when using
127           systemd-suspend-then-hibernate.service(8). Defaults to 2h.
128

EXAMPLE: FREEZE

130       Example: to exploit the “freeze” mode added in Linux 3.9, one can use
131       systemctl suspend with
132
133           [Sleep]
134           SuspendState=freeze
135

SEE ALSO

137       systemd-sleep(8), systemd-suspend.service(8), systemd-
138       hibernate.service(8), systemd-hybrid-sleep.service(8), systemd-suspend-
139       then-hibernate.service(8), systemd(1), systemd.directives(7)
140
141
142
143systemd 251                                              SYSTEMD-SLEEP.CONF(5)
Impressum