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">
6 This file is part of systemd.
8 Copyright 2013 Zbigniew Jędrzejewski-Szmek
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="systemd-sleep.conf"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
27 <title>systemd-sleep.conf</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Zbigniew</firstname>
34 <surname>Jędrzejewski-Szmek</surname>
35 <email>zbyszek@in.waw.pl</email>
41 <refentrytitle>systemd-sleep.conf</refentrytitle>
42 <manvolnum>5</manvolnum>
46 <refname>systemd-sleep.conf</refname>
47 <refname>sleep.conf.d</refname>
48 <refpurpose>Suspend and hibernation configuration file</refpurpose>
52 <para><filename>/etc/systemd/sleep.conf</filename></para>
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>
59 <title>Description</title>
61 <para><command>systemd</command> supports three general
62 power-saving modes:</para>
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.
79 <term>hibernate</term>
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.
92 <term>hybrid-sleep</term>
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.
105 <para>Settings in these files determine what strings
107 <filename>/sys/power/disk</filename> and
108 <filename>/sys/power/state</filename> by
109 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>
111 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
112 attempts to suspend or hibernate the machine.</para>
115 <xi:include href="standard-conf.xml" xpointer="confd" />
116 <xi:include href="standard-conf.xml" xpointer="conf" />
119 <title>Options</title>
121 <para>The following options can be configured in the
122 <literal>[Sleep]</literal> section of
123 <filename>/etc/systemd/sleep.conf</filename> or a
124 <filename>sleep.conf.d</filename> file:</para>
126 <variablelist class='systemd-directives'>
128 <term><varname>SuspendMode=</varname></term>
129 <term><varname>HibernateMode=</varname></term>
130 <term><varname>HybridSleepMode=</varname></term>
132 <listitem><para>The string to be written to
133 <filename>/sys/power/disk</filename> by,
135 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
136 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
137 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
138 More than one value can be specified by separating
139 multiple values with whitespace. They will be tried
140 in turn, until one is written without error. If
141 neither succeeds, the operation will be aborted.
146 <term><varname>SuspendState=</varname></term>
147 <term><varname>HibernateState=</varname></term>
148 <term><varname>HybridSleepState=</varname></term>
150 <listitem><para>The string to be written to
151 <filename>/sys/power/state</filename> by,
153 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
154 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
155 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
156 More than one value can be specified by separating
157 multiple values with whitespace. They will be tried
158 in turn, until one is written without error. If
159 neither succeeds, the operation will be aborted.
166 <title>Example: freeze</title>
168 <para>Example: to exploit the <quote>freeze</quote> mode added
169 in Linux 3.9, one can use <command>systemctl suspend</command>
171 <programlisting>[Sleep]
172 SuspendState=freeze</programlisting></para>
176 <title>See Also</title>
178 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
179 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
180 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
181 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
182 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
183 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>