]>
Commit | Line | Data |
---|---|---|
f47781d8 | 1 | <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> |
663996b3 MS |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
4 | ||
5 | <!-- | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2013 Zbigniew Jędrzejewski-Szmek | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | --> | |
23 | ||
f47781d8 MP |
24 | <refentry id="systemd-sleep.conf" |
25 | xmlns:xi="http://www.w3.org/2001/XInclude"> | |
663996b3 MS |
26 | <refentryinfo> |
27 | <title>systemd-sleep.conf</title> | |
28 | <productname>systemd</productname> | |
29 | ||
30 | <authorgroup> | |
31 | <author> | |
32 | <contrib>Developer</contrib> | |
33 | <firstname>Zbigniew</firstname> | |
34 | <surname>Jędrzejewski-Szmek</surname> | |
35 | <email>zbyszek@in.waw.pl</email> | |
36 | </author> | |
37 | </authorgroup> | |
38 | </refentryinfo> | |
39 | ||
40 | <refmeta> | |
41 | <refentrytitle>systemd-sleep.conf</refentrytitle> | |
42 | <manvolnum>5</manvolnum> | |
43 | </refmeta> | |
44 | ||
45 | <refnamediv> | |
46 | <refname>systemd-sleep.conf</refname> | |
f47781d8 | 47 | <refname>sleep.conf.d</refname> |
663996b3 MS |
48 | <refpurpose>Suspend and hibernation configuration file</refpurpose> |
49 | </refnamediv> | |
50 | ||
51 | <refsynopsisdiv> | |
52 | <para><filename>/etc/systemd/sleep.conf</filename></para> | |
f47781d8 MP |
53 | <para><filename>/etc/systemd/sleep.conf.d/*.conf</filename></para> |
54 | <para><filename>/run/systemd/sleep.conf.d/*.conf</filename></para> | |
55 | <para><filename>/usr/lib/systemd/sleep.conf.d/*.conf</filename></para> | |
663996b3 MS |
56 | </refsynopsisdiv> |
57 | ||
58 | <refsect1> | |
59 | <title>Description</title> | |
60 | ||
61 | <para><command>systemd</command> supports three general | |
62 | power-saving modes:</para> | |
63 | ||
64 | <variablelist> | |
65 | <varlistentry> | |
66 | <term>suspend</term> | |
67 | ||
68 | <listitem><para>a low-power state | |
69 | where execution of the OS is paused, | |
70 | and complete power loss might result | |
71 | in lost data, and which is fast to | |
72 | enter and exit. This corresponds to | |
73 | suspend, standby, or freeze states as | |
74 | understood by the kernel. | |
75 | </para></listitem> | |
76 | </varlistentry> | |
77 | ||
78 | <varlistentry> | |
79 | <term>hibernate</term> | |
80 | ||
81 | <listitem><para>a low-power state | |
82 | where execution of the OS is paused, | |
83 | and complete power loss does not | |
84 | result in lost data, and which might | |
85 | be slow to enter and exit. This | |
86 | corresponds to the hibernation as | |
87 | understood by the kernel. | |
88 | </para></listitem> | |
89 | </varlistentry> | |
90 | ||
91 | <varlistentry> | |
92 | <term>hybrid-sleep</term> | |
93 | ||
94 | <listitem><para>a low-power state | |
95 | where execution of the OS is paused, | |
96 | which might be slow to enter, and on | |
97 | complete power loss does not result in | |
98 | lost data but might be slower to exit | |
99 | in that case. This mode is called | |
100 | suspend-to-both by the kernel. | |
101 | </para></listitem> | |
102 | </varlistentry> | |
103 | </variablelist> | |
104 | ||
f47781d8 | 105 | <para>Settings in these files determine what strings |
663996b3 MS |
106 | will be written to |
107 | <filename>/sys/power/disk</filename> and | |
108 | <filename>/sys/power/state</filename> by | |
109 | <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
110 | when | |
111 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
112 | attempts to suspend or hibernate the machine.</para> | |
113 | </refsect1> | |
114 | ||
f47781d8 MP |
115 | <xi:include href="standard-conf.xml" xpointer="confd" /> |
116 | <xi:include href="standard-conf.xml" xpointer="conf" /> | |
117 | ||
663996b3 MS |
118 | <refsect1> |
119 | <title>Options</title> | |
120 | ||
121 | <para>The following options can be configured in the | |
122 | <literal>[Sleep]</literal> section of | |
f47781d8 MP |
123 | <filename>/etc/systemd/sleep.conf</filename> or a |
124 | <filename>sleep.conf.d</filename> file:</para> | |
663996b3 MS |
125 | |
126 | <variablelist class='systemd-directives'> | |
127 | <varlistentry> | |
128 | <term><varname>SuspendMode=</varname></term> | |
129 | <term><varname>HibernateMode=</varname></term> | |
130 | <term><varname>HybridSleepMode=</varname></term> | |
131 | ||
132 | <listitem><para>The string to be written to | |
133 | <filename>/sys/power/disk</filename> by, | |
134 | respectively, | |
135 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
136 | <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or | |
137 | <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
60f067b4 JS |
138 | More than one value can be specified by separating |
139 | multiple values with whitespace. They will be tried | |
663996b3 | 140 | in turn, until one is written without error. If |
60f067b4 | 141 | neither succeeds, the operation will be aborted. |
663996b3 MS |
142 | </para></listitem> |
143 | </varlistentry> | |
144 | ||
145 | <varlistentry> | |
146 | <term><varname>SuspendState=</varname></term> | |
147 | <term><varname>HibernateState=</varname></term> | |
148 | <term><varname>HybridSleepState=</varname></term> | |
149 | ||
150 | <listitem><para>The string to be written to | |
151 | <filename>/sys/power/state</filename> by, | |
152 | respectively, | |
153 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
154 | <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or | |
155 | <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
60f067b4 JS |
156 | More than one value can be specified by separating |
157 | multiple values with whitespace. They will be tried | |
663996b3 | 158 | in turn, until one is written without error. If |
60f067b4 | 159 | neither succeeds, the operation will be aborted. |
663996b3 MS |
160 | </para></listitem> |
161 | </varlistentry> | |
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 | |
60f067b4 JS |
171 | <programlisting>[Sleep] |
172 | SuspendState=freeze</programlisting></para> | |
663996b3 MS |
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>, | |
182 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
183 | <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
184 | </para> | |
185 | </refsect1> | |
186 | ||
187 | </refentry> |