systemd-sleep.conf.xml revision 3802a3d3d7af51ddff31943d5514382f01265770
97a9a944b5887e91042b019776c41d5dd74557aferikabele<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
97a9a944b5887e91042b019776c41d5dd74557aferikabele<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive<!--
5a58787efeb02a1c3f06569d019ad81fd2efa06endThis file is part of systemd.
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc
5a58787efeb02a1c3f06569d019ad81fd2efa06endCopyright 2013 Zbigniew Jędrzejewski-Szmek
5a58787efeb02a1c3f06569d019ad81fd2efa06end
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowensystemd is free software; you can redistribute it and/or modify it
2e545ce2450a9953665f701bb05350f0d3f26275ndunder the terms of the GNU Lesser General Public License as published by
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowenthe Free Software Foundation; either version 2.1 of the License, or
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen(at your option) any later version.
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06endsystemd is distributed in the hope that it will be useful, but
5a58787efeb02a1c3f06569d019ad81fd2efa06endWITHOUT ANY WARRANTY; without even the implied warranty of
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowenMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3f08db06526d6901aa08c110b5bc7dde6bc39905ndLesser General Public License for more details.
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06endYou should have received a copy of the GNU Lesser General Public License
5a58787efeb02a1c3f06569d019ad81fd2efa06endalong with systemd; If not, see <http://www.gnu.org/licenses/>.
3f08db06526d6901aa08c110b5bc7dde6bc39905nd-->
5a58787efeb02a1c3f06569d019ad81fd2efa06end
a63f0ab647ad2ab72efc9bea7a66e24e9ebc5cc2nd<refentry id="systemd-sleep.conf">
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd <refentryinfo>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd <title>systemd-sleep.conf</title>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd <productname>systemd</productname>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung <authorgroup>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd <author>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <contrib>Developer</contrib>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <firstname>Zbigniew</firstname>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <surname>Jędrzejewski-Szmek</surname>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <email>zbyszek@in.waw.pl</email>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </author>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </authorgroup>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </refentryinfo>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd <refmeta>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <refentrytitle>systemd-sleep.conf</refentrytitle>
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd <manvolnum>5</manvolnum>
b21197dc8e6b8c764fdcc24d4bae8b0eebb6bc4end </refmeta>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <refnamediv>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <refname>systemd-sleep.conf</refname>
97a9a944b5887e91042b019776c41d5dd74557aferikabele <refpurpose>Suspend and hibernation configuration file</refpurpose>
f8396ed8364b56ec8adeaa49cac35a929758a29eslive </refnamediv>
ffb01336be79c64046b636e59fa8ddca8ec029edsf
f8396ed8364b56ec8adeaa49cac35a929758a29eslive <refsynopsisdiv>
f8396ed8364b56ec8adeaa49cac35a929758a29eslive <para><filename>/etc/systemd/sleep.conf</filename></para>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </refsynopsisdiv>
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end <refsect1>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <title>Description</title>
deeee6bb6fd94c0ba5f3730b58abd9d299c89ccdnd
4db28ee269aa06f7c6232e11cd01f58c3349af23noodl <para><command>systemd</command> supports three general
117c1f888a14e73cdd821dc6c23eb0411144a41cnd power-saving modes:</para>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf <variablelist>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <varlistentry>
ffb01336be79c64046b636e59fa8ddca8ec029edsf <term>suspend</term>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <listitem><para>a low-power state
117c1f888a14e73cdd821dc6c23eb0411144a41cnd where execution of the OS is paused,
2bc7f1cf720973a67f8ff7a8d523e40569ae5b6cnd and complete power loss might result
117c1f888a14e73cdd821dc6c23eb0411144a41cnd in lost data, and which is fast to
117c1f888a14e73cdd821dc6c23eb0411144a41cnd enter and exit. This corresponds to
117c1f888a14e73cdd821dc6c23eb0411144a41cnd suspend, standby, or freeze states as
117c1f888a14e73cdd821dc6c23eb0411144a41cnd understood by the kernel.
117c1f888a14e73cdd821dc6c23eb0411144a41cnd </para></listitem>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd </varlistentry>
87ffb6e33f3cbef3b9bb406cc2d27039fa336eaatrawick
4db28ee269aa06f7c6232e11cd01f58c3349af23noodl <varlistentry>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <term>hibernate</term>
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end <listitem><para>a low-power state
5a58787efeb02a1c3f06569d019ad81fd2efa06end where execution of the OS is paused,
5a58787efeb02a1c3f06569d019ad81fd2efa06end and complete power loss does not
5a58787efeb02a1c3f06569d019ad81fd2efa06end result in lost data, and which might
654d8eb036bedc99e90e11910ee02d3421417697rbowen be slow to enter and exit. This
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh corresponds to the hibernation as
5a58787efeb02a1c3f06569d019ad81fd2efa06end understood by the kernel.
5a58787efeb02a1c3f06569d019ad81fd2efa06end </para></listitem>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </varlistentry>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term>hybrid-sleep</term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <listitem><para>a low-power state
06ba4a61654b3763ad65f52283832ebf058fdf1cslive where execution of the OS is paused,
654d8eb036bedc99e90e11910ee02d3421417697rbowen which might be slow to enter, and on
06ba4a61654b3763ad65f52283832ebf058fdf1cslive complete power loss does not result in
06ba4a61654b3763ad65f52283832ebf058fdf1cslive lost data but might be slower to exit
06ba4a61654b3763ad65f52283832ebf058fdf1cslive in that case. This mode is called
b1b0d8ff12f69d873f28a9bf79dfba6b67b45a4bigalic suspend-to-both by the kernel.
97a9a944b5887e91042b019776c41d5dd74557aferikabele </para></listitem>
654d8eb036bedc99e90e11910ee02d3421417697rbowen </varlistentry>
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive </variablelist>
97a9a944b5887e91042b019776c41d5dd74557aferikabele
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <para>Settings in this file determine what strings
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive will be written to
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <filename>/sys/power/disk</filename> and
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <filename>/sys/power/state</filename> by
ffb01336be79c64046b636e59fa8ddca8ec029edsf <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick when
ffb01336be79c64046b636e59fa8ddca8ec029edsf <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
b244bbf442a0aea3dc397b4d0d751f4716c5891dnd attempts to suspend or hibernate the machine.</para>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </refsect1>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <refsect1>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <title>Options</title>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
b244bbf442a0aea3dc397b4d0d751f4716c5891dnd <para>The following options can be configured in the
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <literal>[Sleep]</literal> section of
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <filename>/etc/systemd/sleep.conf</filename>:</para>
ffb01336be79c64046b636e59fa8ddca8ec029edsf
b244bbf442a0aea3dc397b4d0d751f4716c5891dnd <variablelist class='systemd-directives'>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term><varname>SuspendMode=</varname></term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term><varname>HibernateMode=</varname></term>
77c77cf89621f21c8e2bbad63058b5eaa5f88d4ajim <term><varname>HybridSleepMode=</varname></term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <listitem><para>The string to be written to
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd <filename>/sys/power/disk</filename> by,
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick respectively,
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd More than one value can be specified by separating
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick multiple values with whitespace. They will be tried
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick in turn, until one is written without error. If
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick neither succeeds, the operation will be aborted.
b244bbf442a0aea3dc397b4d0d751f4716c5891dnd </para></listitem>
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf </varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick
b244bbf442a0aea3dc397b4d0d751f4716c5891dnd <varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term><varname>SuspendState=</varname></term>
ffb01336be79c64046b636e59fa8ddca8ec029edsf <term><varname>HibernateState=</varname></term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term><varname>HybridSleepState=</varname></term>
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <listitem><para>The string to be written to
97a9a944b5887e91042b019776c41d5dd74557aferikabele <filename>/sys/power/state</filename> by,
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive respectively,
4aa603e6448b99f9371397d439795c91a93637eand <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic More than one value can be specified by separating
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic multiple values with whitespace. They will be tried
4aa603e6448b99f9371397d439795c91a93637eand in turn, until one is written without error. If
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic neither succeeds, the operation will be aborted.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive </para></listitem>
e8d485701957d5c6de870111c112e168a894d49and </varlistentry>
e8d485701957d5c6de870111c112e168a894d49and </variablelist>
654d8eb036bedc99e90e11910ee02d3421417697rbowen </refsect1>
654d8eb036bedc99e90e11910ee02d3421417697rbowen
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <refsect1>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <title>Example: freeze</title>
9bcfc3697a91b5215893a7d0206865b13fc72148nd
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <para>Example: to exploit the <quote>freeze</quote> mode added
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive in Linux 3.9, one can use <command>systemctl suspend</command>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive with
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf <programlisting>[Sleep]
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7sliveSuspendState=freeze</programlisting></para>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive </refsect1>
709e3a21ba73b8433462959cd56c773454b34441trawick
709e3a21ba73b8433462959cd56c773454b34441trawick <refsect1>
709e3a21ba73b8433462959cd56c773454b34441trawick <title>See Also</title>
709e3a21ba73b8433462959cd56c773454b34441trawick <para>
709e3a21ba73b8433462959cd56c773454b34441trawick <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
709e3a21ba73b8433462959cd56c773454b34441trawick <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
709e3a21ba73b8433462959cd56c773454b34441trawick <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
5a58787efeb02a1c3f06569d019ad81fd2efa06end <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
5a58787efeb02a1c3f06569d019ad81fd2efa06end <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd </para>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd </refsect1>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung</refentry>
727872d18412fc021f03969b8641810d8896820bhumbedooh