]>
Commit | Line | Data |
---|---|---|
19adb8a3 ZJS |
1 | <?xml version='1.0'?> <!--*-nxml-*--> |
2 | <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?> | |
3 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | |
4 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
5 | ||
6 | <!-- | |
7 | This file is part of systemd. | |
8 | ||
9 | Copyright 2013 Zbigniew Jędrzejewski-Szmek | |
10 | ||
11 | systemd is free software; you can redistribute it and/or modify it | |
12 | under the terms of the GNU Lesser General Public License as published by | |
13 | the Free Software Foundation; either version 2.1 of the License, or | |
14 | (at your option) any later version. | |
15 | ||
16 | systemd is distributed in the hope that it will be useful, but | |
17 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 | Lesser General Public License for more details. | |
20 | ||
21 | You should have received a copy of the GNU Lesser General Public License | |
22 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
23 | --> | |
24 | ||
25 | <refentry id="systemd-sleep.conf"> | |
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> | |
47 | <refpurpose>Suspend and hibernation configuration file</refpurpose> | |
48 | </refnamediv> | |
49 | ||
50 | <refsynopsisdiv> | |
51 | <para><filename>/etc/systemd/sleep.conf</filename></para> | |
52 | </refsynopsisdiv> | |
53 | ||
54 | <refsect1> | |
55 | <title>Description</title> | |
56 | ||
57 | <para><command>systemd</command> supports three general | |
58 | power-saving modes:</para> | |
59 | ||
60 | <variablelist> | |
61 | <varlistentry> | |
62 | <term>suspend</term> | |
63 | ||
64 | <listitem><para>a low-power state | |
65 | where execution of the OS is paused, | |
66 | and complete power loss might result | |
67 | in lost data, and which is fast to | |
68 | enter and exit. This corresponds to | |
69 | suspend, standby, or freeze states as | |
70 | understood by the kernel. | |
71 | </para></listitem> | |
72 | </varlistentry> | |
73 | ||
74 | <varlistentry> | |
75 | <term>hibernate</term> | |
76 | ||
77 | <listitem><para>a low-power state | |
78 | where execution of the OS is paused, | |
79 | and complete power loss does not | |
80 | result in lost data, and which might | |
81 | be slow to enter and exit. This | |
82 | corresponds to the hibernation as | |
83 | understood by the kernel. | |
84 | </para></listitem> | |
85 | </varlistentry> | |
86 | ||
87 | <varlistentry> | |
88 | <term>hybrid-sleep</term> | |
89 | ||
90 | <listitem><para>a low-power state | |
91 | where execution of the OS is paused, | |
92 | which might be slow to enter, and on | |
93 | complete power loss does not result in | |
94 | lost data but might be slower to exit | |
95 | in that case. This mode is called | |
96 | suspend-to-both by the kernel. | |
97 | </para></listitem> | |
98 | </varlistentry> | |
99 | </variablelist> | |
100 | ||
101 | <para>Settings in this file determine what strings | |
102 | will be written to | |
103 | <filename>/sys/power/disk</filename> and | |
104 | <filename>/sys/power/state</filename> by | |
105 | <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
106 | when | |
107 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
108 | attempts to suspend or hibernate the machine.</para> | |
109 | </refsect1> | |
110 | ||
111 | <refsect1> | |
112 | <title>Options</title> | |
113 | ||
114 | <para>The following options can be configured in the | |
115 | <literal>[Sleep]</literal> section of | |
116 | <filename>/etc/systemd/sleep.conf</filename>:</para> | |
117 | ||
118 | <variablelist class='systemd-directives'> | |
119 | <varlistentry> | |
120 | <term><varname>SuspendMode=</varname></term> | |
121 | <term><varname>HibernateMode=</varname></term> | |
122 | <term><varname>HybridSleepMode=</varname></term> | |
123 | ||
124 | <listitem><para>The string to be written to | |
125 | <filename>/sys/power/disk</filename> by, | |
126 | respectively, | |
127 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
128 | <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or | |
129 | <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
0c722554 | 130 | More than one value can be specified by separating |
252094eb | 131 | multiple values with whitespace. They will be tried |
19adb8a3 | 132 | in turn, until one is written without error. If |
0c722554 | 133 | neither succeeds, the operation will be aborted. |
19adb8a3 ZJS |
134 | </para></listitem> |
135 | </varlistentry> | |
136 | ||
137 | <varlistentry> | |
138 | <term><varname>SuspendState=</varname></term> | |
139 | <term><varname>HibernateState=</varname></term> | |
140 | <term><varname>HybridSleepState=</varname></term> | |
141 | ||
142 | <listitem><para>The string to be written to | |
143 | <filename>/sys/power/state</filename> by, | |
144 | respectively, | |
145 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
146 | <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or | |
147 | <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
0c722554 | 148 | More than one value can be specified by separating |
252094eb | 149 | multiple values with whitespace. They will be tried |
19adb8a3 | 150 | in turn, until one is written without error. If |
0c722554 | 151 | neither succeeds, the operation will be aborted. |
19adb8a3 ZJS |
152 | </para></listitem> |
153 | </varlistentry> | |
154 | </variablelist> | |
155 | </refsect1> | |
156 | ||
157 | <refsect1> | |
158 | <title>Example: freeze</title> | |
159 | ||
160 | <para>Example: to exploit the <quote>freeze</quote> mode added | |
161 | in Linux 3.9, one can use <command>systemctl suspend</command> | |
162 | with | |
9fccdb0f LP |
163 | <programlisting>[Sleep] |
164 | SuspendState=freeze</programlisting></para> | |
19adb8a3 ZJS |
165 | </refsect1> |
166 | ||
167 | <refsect1> | |
168 | <title>See Also</title> | |
169 | <para> | |
170 | <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
171 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
172 | <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
173 | <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
174 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
175 | <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
176 | </para> | |
177 | </refsect1> | |
178 | ||
179 | </refentry> |