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