]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-sleep.conf.xml
man: no paren in link
[thirdparty/systemd.git] / man / systemd-sleep.conf.xml
CommitLineData
3802a3d3 1<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
19adb8a3
ZJS
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<!--
6This file is part of systemd.
7
8Copyright 2013 Zbigniew Jędrzejewski-Szmek
9
10systemd is free software; you can redistribute it and/or modify it
11under the terms of the GNU Lesser General Public License as published by
12the Free Software Foundation; either version 2.1 of the License, or
13(at your option) any later version.
14
15systemd is distributed in the hope that it will be useful, but
16WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18Lesser General Public License for more details.
19
20You should have received a copy of the GNU Lesser General Public License
21along with systemd; If not, see <http://www.gnu.org/licenses/>.
22-->
23
778b6a3f
JT
24<refentry id="systemd-sleep.conf"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
19adb8a3
ZJS
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>
778b6a3f 47 <refname>sleep.conf.d</refname>
19adb8a3
ZJS
48 <refpurpose>Suspend and hibernation configuration file</refpurpose>
49 </refnamediv>
50
51 <refsynopsisdiv>
52 <para><filename>/etc/systemd/sleep.conf</filename></para>
778b6a3f
JT
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>
19adb8a3
ZJS
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
778b6a3f 105 <para>Settings in these files determine what strings
19adb8a3
ZJS
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
e93549ef 115 <xi:include href="standard-conf.xml" xpointer="main-conf" />
778b6a3f 116
19adb8a3
ZJS
117 <refsect1>
118 <title>Options</title>
119
120 <para>The following options can be configured in the
121 <literal>[Sleep]</literal> section of
778b6a3f
JT
122 <filename>/etc/systemd/sleep.conf</filename> or a
123 <filename>sleep.conf.d</filename> file:</para>
19adb8a3
ZJS
124
125 <variablelist class='systemd-directives'>
126 <varlistentry>
127 <term><varname>SuspendMode=</varname></term>
128 <term><varname>HibernateMode=</varname></term>
129 <term><varname>HybridSleepMode=</varname></term>
130
131 <listitem><para>The string to be written to
132 <filename>/sys/power/disk</filename> by,
133 respectively,
134 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
135 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
136 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
0c722554 137 More than one value can be specified by separating
252094eb 138 multiple values with whitespace. They will be tried
19adb8a3 139 in turn, until one is written without error. If
0c722554 140 neither succeeds, the operation will be aborted.
19adb8a3
ZJS
141 </para></listitem>
142 </varlistentry>
143
144 <varlistentry>
145 <term><varname>SuspendState=</varname></term>
146 <term><varname>HibernateState=</varname></term>
147 <term><varname>HybridSleepState=</varname></term>
148
149 <listitem><para>The string to be written to
150 <filename>/sys/power/state</filename> by,
151 respectively,
152 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
153 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
154 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
0c722554 155 More than one value can be specified by separating
252094eb 156 multiple values with whitespace. They will be tried
19adb8a3 157 in turn, until one is written without error. If
0c722554 158 neither succeeds, the operation will be aborted.
19adb8a3
ZJS
159 </para></listitem>
160 </varlistentry>
161 </variablelist>
162 </refsect1>
163
164 <refsect1>
165 <title>Example: freeze</title>
166
167 <para>Example: to exploit the <quote>freeze</quote> mode added
168 in Linux 3.9, one can use <command>systemctl suspend</command>
169 with
9fccdb0f
LP
170 <programlisting>[Sleep]
171SuspendState=freeze</programlisting></para>
19adb8a3
ZJS
172 </refsect1>
173
174 <refsect1>
175 <title>See Also</title>
176 <para>
177 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
178 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
179 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
180 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
181 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
182 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
183 </para>
184 </refsect1>
185
186</refentry>