1SYSTEMD-SLEEP.CONF(5) systemd-sleep.conf SYSTEMD-SLEEP.CONF(5)
2
3
4
6 systemd-sleep.conf, sleep.conf.d - Suspend and hibernation
7 configuration file
8
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
19 systemd supports three 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 Settings in these files determine what strings will be written to
40 /sys/power/disk and /sys/power/state by systemd-sleep(8) when
41 systemd(1) attempts to suspend or hibernate the machine.
42
44 Default configuration is defined during compilation, so a configuration
45 file is only needed when it is necessary to deviate from those
46 defaults. By default the configuration file in /etc/systemd/ contains
47 commented out entries showing the defaults as a guide to the
48 administrator. This file can be edited to create local overrides.
49
50 When packages need to customize the configuration, they can install
51 configuration snippets in /usr/lib/systemd/*.conf.d/. Files in /etc/
52 are reserved for the local administrator, who may use this logic to
53 override the configuration files installed by vendor packages. The main
54 configuration file is read before any of the configuration directories,
55 and has the lowest precedence; entries in a file in any configuration
56 directory override entries in the single configuration file. Files in
57 the *.conf.d/ configuration subdirectories are sorted by their filename
58 in lexicographic order, regardless of which of the subdirectories they
59 reside in. If multiple files specify the same option, the entry in the
60 file with the lexicographically latest name takes precedence. It is
61 recommended to prefix all filenames in those subdirectories with a
62 two-digit number and a dash, to simplify the ordering of the files.
63
64 To disable a configuration file supplied by the vendor, the recommended
65 way is to place a symlink to /dev/null in the configuration directory
66 in /etc/, with the same filename as the vendor configuration file.
67
69 The following options can be configured in the "[Sleep]" section of
70 /etc/systemd/sleep.conf or a sleep.conf.d file:
71
72 SuspendMode=, HibernateMode=, HybridSleepMode=
73 The string to be written to /sys/power/disk by, respectively,
74 systemd-suspend.service(8), systemd-hibernate.service(8), or
75 systemd-hybrid-sleep.service(8). More than one value can be
76 specified by separating multiple values with whitespace. They will
77 be tried in turn, until one is written without error. If neither
78 succeeds, the operation will be aborted.
79
80 SuspendState=, HibernateState=, HybridSleepState=
81 The string to be written to /sys/power/state by, respectively,
82 systemd-suspend.service(8), systemd-hibernate.service(8), or
83 systemd-hybrid-sleep.service(8). More than one value can be
84 specified by separating multiple values with whitespace. They will
85 be tried in turn, until one is written without error. If neither
86 succeeds, the operation will be aborted.
87
89 Example: to exploit the “freeze” mode added in Linux 3.9, one can use
90 systemctl suspend with
91
92 [Sleep]
93 SuspendState=freeze
94
96 systemd-sleep(8), systemd-suspend.service(8), systemd-
97 hibernate.service(8), systemd-hybrid-sleep.service(8), systemd(1),
98 systemd.directives(7)
99
100
101
102systemd 219 SYSTEMD-SLEEP.CONF(5)