]>
Commit | Line | Data |
---|---|---|
3802a3d3 | 1 | <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> |
19adb8a3 | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
12b42c76 | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
19adb8a3 ZJS |
4 | |
5 | <!-- | |
572eb058 | 6 | SPDX-License-Identifier: LGPL-2.1+ |
19adb8a3 ZJS |
7 | --> |
8 | ||
778b6a3f JT |
9 | <refentry id="systemd-sleep.conf" |
10 | xmlns:xi="http://www.w3.org/2001/XInclude"> | |
19adb8a3 ZJS |
11 | <refentryinfo> |
12 | <title>systemd-sleep.conf</title> | |
13 | <productname>systemd</productname> | |
19adb8a3 ZJS |
14 | </refentryinfo> |
15 | ||
16 | <refmeta> | |
17 | <refentrytitle>systemd-sleep.conf</refentrytitle> | |
18 | <manvolnum>5</manvolnum> | |
19 | </refmeta> | |
20 | ||
21 | <refnamediv> | |
22 | <refname>systemd-sleep.conf</refname> | |
778b6a3f | 23 | <refname>sleep.conf.d</refname> |
19adb8a3 ZJS |
24 | <refpurpose>Suspend and hibernation configuration file</refpurpose> |
25 | </refnamediv> | |
26 | ||
27 | <refsynopsisdiv> | |
12b42c76 TG |
28 | <para><filename>/etc/systemd/sleep.conf</filename></para> |
29 | <para><filename>/etc/systemd/sleep.conf.d/*.conf</filename></para> | |
778b6a3f | 30 | <para><filename>/run/systemd/sleep.conf.d/*.conf</filename></para> |
12b42c76 | 31 | <para><filename>/usr/lib/systemd/sleep.conf.d/*.conf</filename></para> |
19adb8a3 ZJS |
32 | </refsynopsisdiv> |
33 | ||
34 | <refsect1> | |
35 | <title>Description</title> | |
36 | ||
c58493c0 | 37 | <para><command>systemd</command> supports four general |
19adb8a3 ZJS |
38 | power-saving modes:</para> |
39 | ||
40 | <variablelist> | |
41 | <varlistentry> | |
42 | <term>suspend</term> | |
43 | ||
44 | <listitem><para>a low-power state | |
45 | where execution of the OS is paused, | |
46 | and complete power loss might result | |
47 | in lost data, and which is fast to | |
48 | enter and exit. This corresponds to | |
49 | suspend, standby, or freeze states as | |
50 | understood by the kernel. | |
51 | </para></listitem> | |
52 | </varlistentry> | |
53 | ||
54 | <varlistentry> | |
55 | <term>hibernate</term> | |
56 | ||
57 | <listitem><para>a low-power state | |
58 | where execution of the OS is paused, | |
59 | and complete power loss does not | |
60 | result in lost data, and which might | |
61 | be slow to enter and exit. This | |
62 | corresponds to the hibernation as | |
63 | understood by the kernel. | |
64 | </para></listitem> | |
65 | </varlistentry> | |
66 | ||
67 | <varlistentry> | |
68 | <term>hybrid-sleep</term> | |
69 | ||
70 | <listitem><para>a low-power state | |
71 | where execution of the OS is paused, | |
72 | which might be slow to enter, and on | |
73 | complete power loss does not result in | |
74 | lost data but might be slower to exit | |
75 | in that case. This mode is called | |
76 | suspend-to-both by the kernel. | |
77 | </para></listitem> | |
78 | </varlistentry> | |
c58493c0 ML |
79 | |
80 | <varlistentry> | |
e68c79db | 81 | <term>suspend-then-hibernate</term> |
c58493c0 ML |
82 | |
83 | <listitem><para>A low power state where the system is initially suspended | |
84 | (the state is stored in RAM). If not interrupted within the delay specified by | |
85 | <command>HibernateDelaySec=</command>, the system will be woken using an RTC | |
86 | alarm and hibernated (the state is then stored on disk). | |
87 | </para></listitem> | |
88 | </varlistentry> | |
89 | ||
19adb8a3 ZJS |
90 | </variablelist> |
91 | ||
778b6a3f | 92 | <para>Settings in these files determine what strings |
19adb8a3 ZJS |
93 | will be written to |
94 | <filename>/sys/power/disk</filename> and | |
95 | <filename>/sys/power/state</filename> by | |
96 | <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
97 | when | |
98 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
0f943ae4 ZJS |
99 | attempts to suspend or hibernate the machine. |
100 | See | |
101 | <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
102 | for a general description of the syntax.</para> | |
19adb8a3 ZJS |
103 | </refsect1> |
104 | ||
e93549ef | 105 | <xi:include href="standard-conf.xml" xpointer="main-conf" /> |
778b6a3f | 106 | |
19adb8a3 ZJS |
107 | <refsect1> |
108 | <title>Options</title> | |
109 | ||
110 | <para>The following options can be configured in the | |
111 | <literal>[Sleep]</literal> section of | |
12b42c76 | 112 | <filename>/etc/systemd/sleep.conf</filename> or a |
778b6a3f | 113 | <filename>sleep.conf.d</filename> file:</para> |
19adb8a3 ZJS |
114 | |
115 | <variablelist class='systemd-directives'> | |
116 | <varlistentry> | |
117 | <term><varname>SuspendMode=</varname></term> | |
118 | <term><varname>HibernateMode=</varname></term> | |
119 | <term><varname>HybridSleepMode=</varname></term> | |
120 | ||
121 | <listitem><para>The string to be written to | |
122 | <filename>/sys/power/disk</filename> by, | |
123 | respectively, | |
124 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
c58493c0 ML |
125 | <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
126 | <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or | |
e68c79db | 127 | <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. |
0c722554 | 128 | More than one value can be specified by separating |
252094eb | 129 | multiple values with whitespace. They will be tried |
19adb8a3 | 130 | in turn, until one is written without error. If |
0c722554 | 131 | neither succeeds, the operation will be aborted. |
19adb8a3 ZJS |
132 | </para></listitem> |
133 | </varlistentry> | |
134 | ||
135 | <varlistentry> | |
136 | <term><varname>SuspendState=</varname></term> | |
137 | <term><varname>HibernateState=</varname></term> | |
138 | <term><varname>HybridSleepState=</varname></term> | |
139 | ||
140 | <listitem><para>The string to be written to | |
141 | <filename>/sys/power/state</filename> by, | |
142 | respectively, | |
143 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
c58493c0 ML |
144 | <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
145 | <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or | |
e68c79db | 146 | <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. |
0c722554 | 147 | More than one value can be specified by separating |
252094eb | 148 | multiple values with whitespace. They will be tried |
19adb8a3 | 149 | in turn, until one is written without error. If |
0c722554 | 150 | neither succeeds, the operation will be aborted. |
19adb8a3 ZJS |
151 | </para></listitem> |
152 | </varlistentry> | |
c58493c0 ML |
153 | <varlistentry> |
154 | <term><varname>HibernateDelaySec=</varname></term> | |
155 | ||
156 | <listitem><para>The amount of time in seconds | |
157 | that will pass before the system is automatically | |
158 | put into hibernate when using | |
e68c79db | 159 | <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. |
c58493c0 ML |
160 | </para></listitem> |
161 | </varlistentry> | |
19adb8a3 ZJS |
162 | </variablelist> |
163 | </refsect1> | |
164 | ||
165 | <refsect1> | |
166 | <title>Example: freeze</title> | |
167 | ||
168 | <para>Example: to exploit the <quote>freeze</quote> mode added | |
169 | in Linux 3.9, one can use <command>systemctl suspend</command> | |
170 | with | |
9fccdb0f LP |
171 | <programlisting>[Sleep] |
172 | SuspendState=freeze</programlisting></para> | |
19adb8a3 ZJS |
173 | </refsect1> |
174 | ||
175 | <refsect1> | |
176 | <title>See Also</title> | |
177 | <para> | |
178 | <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
179 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
180 | <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
181 | <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
e68c79db | 182 | <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
19adb8a3 ZJS |
183 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
184 | <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
185 | </para> | |
186 | </refsect1> | |
187 | ||
188 | </refentry> |