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