]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-sleep.conf.xml
tree-wide: drop license boilerplate
[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
5de0ccff 8 This file is part of systemd.
19adb8a3 9
5de0ccff 10 Copyright 2013 Zbigniew Jędrzejewski-Szmek
19adb8a3
ZJS
11-->
12
778b6a3f
JT
13<refentry id="systemd-sleep.conf"
14 xmlns:xi="http://www.w3.org/2001/XInclude">
19adb8a3
ZJS
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>
778b6a3f 36 <refname>sleep.conf.d</refname>
19adb8a3
ZJS
37 <refpurpose>Suspend and hibernation configuration file</refpurpose>
38 </refnamediv>
39
40 <refsynopsisdiv>
12b42c76
TG
41 <para><filename>/etc/systemd/sleep.conf</filename></para>
42 <para><filename>/etc/systemd/sleep.conf.d/*.conf</filename></para>
778b6a3f 43 <para><filename>/run/systemd/sleep.conf.d/*.conf</filename></para>
12b42c76 44 <para><filename>/usr/lib/systemd/sleep.conf.d/*.conf</filename></para>
19adb8a3
ZJS
45 </refsynopsisdiv>
46
47 <refsect1>
48 <title>Description</title>
49
c58493c0 50 <para><command>systemd</command> supports four general
19adb8a3
ZJS
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>
c58493c0
ML
92
93 <varlistentry>
e68c79db 94 <term>suspend-then-hibernate</term>
c58493c0
ML
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
19adb8a3
ZJS
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
12b42c76 122 <filename>/etc/systemd/sleep.conf</filename> or a
778b6a3f 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>,
c58493c0
ML
135 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
136 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
e68c79db 137 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
0c722554 138 More than one value can be specified by separating
252094eb 139 multiple values with whitespace. They will be tried
19adb8a3 140 in turn, until one is written without error. If
0c722554 141 neither succeeds, the operation will be aborted.
19adb8a3
ZJS
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>,
c58493c0
ML
154 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
155 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
e68c79db 156 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
0c722554 157 More than one value can be specified by separating
252094eb 158 multiple values with whitespace. They will be tried
19adb8a3 159 in turn, until one is written without error. If
0c722554 160 neither succeeds, the operation will be aborted.
19adb8a3
ZJS
161 </para></listitem>
162 </varlistentry>
c58493c0
ML
163 <varlistentry>
164 <term><varname>HibernateDelaySec=</varname></term>
165
166 <listitem><para>The amount of time in seconds
167 that will pass before the system is automatically
168 put into hibernate when using
e68c79db 169 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
c58493c0
ML
170 </para></listitem>
171 </varlistentry>
19adb8a3
ZJS
172 </variablelist>
173 </refsect1>
174
175 <refsect1>
176 <title>Example: freeze</title>
177
178 <para>Example: to exploit the <quote>freeze</quote> mode added
179 in Linux 3.9, one can use <command>systemctl suspend</command>
180 with
9fccdb0f
LP
181 <programlisting>[Sleep]
182SuspendState=freeze</programlisting></para>
19adb8a3
ZJS
183 </refsect1>
184
185 <refsect1>
186 <title>See Also</title>
187 <para>
188 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
189 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
190 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
191 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
e68c79db 192 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
19adb8a3
ZJS
193 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
194 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
195 </para>
196 </refsect1>
197
198</refentry>