]>
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 ZJS |
6 | SPDX-License-Identifier: LGPL-2.1+ |
7 | ||
5de0ccff | 8 | This file is part of systemd. |
19adb8a3 | 9 | |
5de0ccff | 10 | Copyright 2013 Zbigniew Jędrzejewski-Szmek |
19adb8a3 | 11 | |
5de0ccff ZJS |
12 | systemd is free software; you can redistribute it and/or modify it |
13 | under the terms of the GNU Lesser General Public License as published by | |
14 | the Free Software Foundation; either version 2.1 of the License, or | |
15 | (at your option) any later version. | |
19adb8a3 | 16 | |
5de0ccff ZJS |
17 | systemd is distributed in the hope that it will be useful, but |
18 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
20 | Lesser General Public License for more details. | |
19adb8a3 | 21 | |
5de0ccff ZJS |
22 | You should have received a copy of the GNU Lesser General Public License |
23 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
19adb8a3 ZJS |
24 | --> |
25 | ||
778b6a3f JT |
26 | <refentry id="systemd-sleep.conf" |
27 | xmlns:xi="http://www.w3.org/2001/XInclude"> | |
19adb8a3 ZJS |
28 | <refentryinfo> |
29 | <title>systemd-sleep.conf</title> | |
30 | <productname>systemd</productname> | |
31 | ||
32 | <authorgroup> | |
33 | <author> | |
34 | <contrib>Developer</contrib> | |
35 | <firstname>Zbigniew</firstname> | |
36 | <surname>Jędrzejewski-Szmek</surname> | |
37 | <email>zbyszek@in.waw.pl</email> | |
38 | </author> | |
39 | </authorgroup> | |
40 | </refentryinfo> | |
41 | ||
42 | <refmeta> | |
43 | <refentrytitle>systemd-sleep.conf</refentrytitle> | |
44 | <manvolnum>5</manvolnum> | |
45 | </refmeta> | |
46 | ||
47 | <refnamediv> | |
48 | <refname>systemd-sleep.conf</refname> | |
778b6a3f | 49 | <refname>sleep.conf.d</refname> |
19adb8a3 ZJS |
50 | <refpurpose>Suspend and hibernation configuration file</refpurpose> |
51 | </refnamediv> | |
52 | ||
53 | <refsynopsisdiv> | |
12b42c76 TG |
54 | <para><filename>/etc/systemd/sleep.conf</filename></para> |
55 | <para><filename>/etc/systemd/sleep.conf.d/*.conf</filename></para> | |
778b6a3f | 56 | <para><filename>/run/systemd/sleep.conf.d/*.conf</filename></para> |
12b42c76 | 57 | <para><filename>/usr/lib/systemd/sleep.conf.d/*.conf</filename></para> |
19adb8a3 ZJS |
58 | </refsynopsisdiv> |
59 | ||
60 | <refsect1> | |
61 | <title>Description</title> | |
62 | ||
c58493c0 | 63 | <para><command>systemd</command> supports four general |
19adb8a3 ZJS |
64 | power-saving modes:</para> |
65 | ||
66 | <variablelist> | |
67 | <varlistentry> | |
68 | <term>suspend</term> | |
69 | ||
70 | <listitem><para>a low-power state | |
71 | where execution of the OS is paused, | |
72 | and complete power loss might result | |
73 | in lost data, and which is fast to | |
74 | enter and exit. This corresponds to | |
75 | suspend, standby, or freeze states as | |
76 | understood by the kernel. | |
77 | </para></listitem> | |
78 | </varlistentry> | |
79 | ||
80 | <varlistentry> | |
81 | <term>hibernate</term> | |
82 | ||
83 | <listitem><para>a low-power state | |
84 | where execution of the OS is paused, | |
85 | and complete power loss does not | |
86 | result in lost data, and which might | |
87 | be slow to enter and exit. This | |
88 | corresponds to the hibernation as | |
89 | understood by the kernel. | |
90 | </para></listitem> | |
91 | </varlistentry> | |
92 | ||
93 | <varlistentry> | |
94 | <term>hybrid-sleep</term> | |
95 | ||
96 | <listitem><para>a low-power state | |
97 | where execution of the OS is paused, | |
98 | which might be slow to enter, and on | |
99 | complete power loss does not result in | |
100 | lost data but might be slower to exit | |
101 | in that case. This mode is called | |
102 | suspend-to-both by the kernel. | |
103 | </para></listitem> | |
104 | </varlistentry> | |
c58493c0 ML |
105 | |
106 | <varlistentry> | |
107 | <term>suspend-to-hibernate</term> | |
108 | ||
109 | <listitem><para>A low power state where the system is initially suspended | |
110 | (the state is stored in RAM). If not interrupted within the delay specified by | |
111 | <command>HibernateDelaySec=</command>, the system will be woken using an RTC | |
112 | alarm and hibernated (the state is then stored on disk). | |
113 | </para></listitem> | |
114 | </varlistentry> | |
115 | ||
19adb8a3 ZJS |
116 | </variablelist> |
117 | ||
778b6a3f | 118 | <para>Settings in these files determine what strings |
19adb8a3 ZJS |
119 | will be written to |
120 | <filename>/sys/power/disk</filename> and | |
121 | <filename>/sys/power/state</filename> by | |
122 | <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
123 | when | |
124 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
125 | attempts to suspend or hibernate the machine.</para> | |
126 | </refsect1> | |
127 | ||
e93549ef | 128 | <xi:include href="standard-conf.xml" xpointer="main-conf" /> |
778b6a3f | 129 | |
19adb8a3 ZJS |
130 | <refsect1> |
131 | <title>Options</title> | |
132 | ||
133 | <para>The following options can be configured in the | |
134 | <literal>[Sleep]</literal> section of | |
12b42c76 | 135 | <filename>/etc/systemd/sleep.conf</filename> or a |
778b6a3f | 136 | <filename>sleep.conf.d</filename> file:</para> |
19adb8a3 ZJS |
137 | |
138 | <variablelist class='systemd-directives'> | |
139 | <varlistentry> | |
140 | <term><varname>SuspendMode=</varname></term> | |
141 | <term><varname>HibernateMode=</varname></term> | |
142 | <term><varname>HybridSleepMode=</varname></term> | |
143 | ||
144 | <listitem><para>The string to be written to | |
145 | <filename>/sys/power/disk</filename> by, | |
146 | respectively, | |
147 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
c58493c0 ML |
148 | <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
149 | <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or | |
150 | <citerefentry><refentrytitle>systemd-suspend-to-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
0c722554 | 151 | More than one value can be specified by separating |
252094eb | 152 | multiple values with whitespace. They will be tried |
19adb8a3 | 153 | in turn, until one is written without error. If |
0c722554 | 154 | neither succeeds, the operation will be aborted. |
19adb8a3 ZJS |
155 | </para></listitem> |
156 | </varlistentry> | |
157 | ||
158 | <varlistentry> | |
159 | <term><varname>SuspendState=</varname></term> | |
160 | <term><varname>HibernateState=</varname></term> | |
161 | <term><varname>HybridSleepState=</varname></term> | |
162 | ||
163 | <listitem><para>The string to be written to | |
164 | <filename>/sys/power/state</filename> by, | |
165 | respectively, | |
166 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
c58493c0 ML |
167 | <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
168 | <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or | |
169 | <citerefentry><refentrytitle>systemd-suspend-to-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
0c722554 | 170 | More than one value can be specified by separating |
252094eb | 171 | multiple values with whitespace. They will be tried |
19adb8a3 | 172 | in turn, until one is written without error. If |
0c722554 | 173 | neither succeeds, the operation will be aborted. |
19adb8a3 ZJS |
174 | </para></listitem> |
175 | </varlistentry> | |
c58493c0 ML |
176 | <varlistentry> |
177 | <term><varname>HibernateDelaySec=</varname></term> | |
178 | ||
179 | <listitem><para>The amount of time in seconds | |
180 | that will pass before the system is automatically | |
181 | put into hibernate when using | |
182 | <citerefentry><refentrytitle>systemd-suspend-to-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
183 | </para></listitem> | |
184 | </varlistentry> | |
19adb8a3 ZJS |
185 | </variablelist> |
186 | </refsect1> | |
187 | ||
188 | <refsect1> | |
189 | <title>Example: freeze</title> | |
190 | ||
191 | <para>Example: to exploit the <quote>freeze</quote> mode added | |
192 | in Linux 3.9, one can use <command>systemctl suspend</command> | |
193 | with | |
9fccdb0f LP |
194 | <programlisting>[Sleep] |
195 | SuspendState=freeze</programlisting></para> | |
19adb8a3 ZJS |
196 | </refsect1> |
197 | ||
198 | <refsect1> | |
199 | <title>See Also</title> | |
200 | <para> | |
201 | <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
202 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
203 | <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
204 | <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
c58493c0 | 205 | <citerefentry><refentrytitle>systemd-suspend-to-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
19adb8a3 ZJS |
206 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
207 | <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
208 | </para> | |
209 | </refsect1> | |
210 | ||
211 | </refentry> |