]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-sleep.conf.xml
Merge pull request #6918 from ssahani/issue-5625
[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 systemd is free software; you can redistribute it and/or modify it
13 under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
16
17 systemd is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
21
22 You should have received a copy of the GNU Lesser General Public License
23 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 -->
25
26 <refentry id="systemd-sleep.conf"
27 xmlns:xi="http://www.w3.org/2001/XInclude">
28 <refentryinfo>
29 <title>systemd-sleep.conf</title>
30 <productname>systemd</productname>
31
32 <authorgroup>
33 <author>
34 <contrib>Developer</contrib>
35 <firstname>Zbigniew</firstname>
36 <surname>Jędrzejewski-Szmek</surname>
37 <email>zbyszek@in.waw.pl</email>
38 </author>
39 </authorgroup>
40 </refentryinfo>
41
42 <refmeta>
43 <refentrytitle>systemd-sleep.conf</refentrytitle>
44 <manvolnum>5</manvolnum>
45 </refmeta>
46
47 <refnamediv>
48 <refname>systemd-sleep.conf</refname>
49 <refname>sleep.conf.d</refname>
50 <refpurpose>Suspend and hibernation configuration file</refpurpose>
51 </refnamediv>
52
53 <refsynopsisdiv>
54 <para><filename>/etc/systemd/sleep.conf</filename></para>
55 <para><filename>/etc/systemd/sleep.conf.d/*.conf</filename></para>
56 <para><filename>/run/systemd/sleep.conf.d/*.conf</filename></para>
57 <para><filename>/usr/lib/systemd/sleep.conf.d/*.conf</filename></para>
58 </refsynopsisdiv>
59
60 <refsect1>
61 <title>Description</title>
62
63 <para><command>systemd</command> supports three general
64 power-saving modes:</para>
65
66 <variablelist>
67 <varlistentry>
68 <term>suspend</term>
69
70 <listitem><para>a low-power state
71 where execution of the OS is paused,
72 and complete power loss might result
73 in lost data, and which is fast to
74 enter and exit. This corresponds to
75 suspend, standby, or freeze states as
76 understood by the kernel.
77 </para></listitem>
78 </varlistentry>
79
80 <varlistentry>
81 <term>hibernate</term>
82
83 <listitem><para>a low-power state
84 where execution of the OS is paused,
85 and complete power loss does not
86 result in lost data, and which might
87 be slow to enter and exit. This
88 corresponds to the hibernation as
89 understood by the kernel.
90 </para></listitem>
91 </varlistentry>
92
93 <varlistentry>
94 <term>hybrid-sleep</term>
95
96 <listitem><para>a low-power state
97 where execution of the OS is paused,
98 which might be slow to enter, and on
99 complete power loss does not result in
100 lost data but might be slower to exit
101 in that case. This mode is called
102 suspend-to-both by the kernel.
103 </para></listitem>
104 </varlistentry>
105 </variablelist>
106
107 <para>Settings in these files determine what strings
108 will be written to
109 <filename>/sys/power/disk</filename> and
110 <filename>/sys/power/state</filename> by
111 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>
112 when
113 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
114 attempts to suspend or hibernate the machine.</para>
115 </refsect1>
116
117 <xi:include href="standard-conf.xml" xpointer="main-conf" />
118
119 <refsect1>
120 <title>Options</title>
121
122 <para>The following options can be configured in the
123 <literal>[Sleep]</literal> section of
124 <filename>/etc/systemd/sleep.conf</filename> or a
125 <filename>sleep.conf.d</filename> file:</para>
126
127 <variablelist class='systemd-directives'>
128 <varlistentry>
129 <term><varname>SuspendMode=</varname></term>
130 <term><varname>HibernateMode=</varname></term>
131 <term><varname>HybridSleepMode=</varname></term>
132
133 <listitem><para>The string to be written to
134 <filename>/sys/power/disk</filename> by,
135 respectively,
136 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
137 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
138 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
139 More than one value can be specified by separating
140 multiple values with whitespace. They will be tried
141 in turn, until one is written without error. If
142 neither succeeds, the operation will be aborted.
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>,
155 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
156 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
157 More than one value can be specified by separating
158 multiple values with whitespace. They will be tried
159 in turn, until one is written without error. If
160 neither succeeds, the operation will be aborted.
161 </para></listitem>
162 </varlistentry>
163 </variablelist>
164 </refsect1>
165
166 <refsect1>
167 <title>Example: freeze</title>
168
169 <para>Example: to exploit the <quote>freeze</quote> mode added
170 in Linux 3.9, one can use <command>systemctl suspend</command>
171 with
172 <programlisting>[Sleep]
173 SuspendState=freeze</programlisting></para>
174 </refsect1>
175
176 <refsect1>
177 <title>See Also</title>
178 <para>
179 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
180 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
181 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
182 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
183 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
184 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
185 </para>
186 </refsect1>
187
188 </refentry>