systemd-sleep.conf.xml revision 252094eb05c58270a0bc35b14ad30a126ddbb3bb
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering<?xml version='1.0'?> <!--*-nxml-*-->
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering<!--
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringThis file is part of systemd.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringCopyright 2013 Zbigniew Jędrzejewski-Szmek
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poetteringsystemd is free software; you can redistribute it and/or modify it
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poetteringunder the terms of the GNU Lesser General Public License as published by
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poetteringthe Free Software Foundation; either version 2.1 of the License, or
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering(at your option) any later version.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poetteringsystemd is distributed in the hope that it will be useful, but
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringWITHOUT ANY WARRANTY; without even the implied warranty of
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringLesser General Public License for more details.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringYou should have received a copy of the GNU Lesser General Public License
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poetteringalong with systemd; If not, see <http://www.gnu.org/licenses/>.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering-->
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering<refentry id="systemd-sleep.conf">
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refentryinfo>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <title>systemd-sleep.conf</title>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <productname>systemd</productname>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <authorgroup>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <author>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <contrib>Developer</contrib>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <firstname>Zbigniew</firstname>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <surname>Jędrzejewski-Szmek</surname>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <email>zbyszek@in.waw.pl</email>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </author>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </authorgroup>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </refentryinfo>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refmeta>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refentrytitle>systemd-sleep.conf</refentrytitle>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <manvolnum>5</manvolnum>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </refmeta>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refnamediv>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refname>systemd-sleep.conf</refname>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refpurpose>Suspend and hibernation configuration file</refpurpose>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </refnamediv>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refsynopsisdiv>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <para><filename>/etc/systemd/sleep.conf</filename></para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </refsynopsisdiv>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refsect1>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <title>Description</title>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <para><command>systemd</command> supports three general
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering power-saving modes:</para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <variablelist>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term>suspend</term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <listitem><para>a low-power state
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering where execution of the OS is paused,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering and complete power loss might result
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering in lost data, and which is fast to
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering enter and exit. This corresponds to
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering suspend, standby, or freeze states as
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering understood by the kernel.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </para></listitem>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term>hibernate</term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <listitem><para>a low-power state
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering where execution of the OS is paused,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering and complete power loss does not
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering result in lost data, and which might
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering be slow to enter and exit. This
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering corresponds to the hibernation as
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering understood by the kernel.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </para></listitem>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term>hybrid-sleep</term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <listitem><para>a low-power state
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering where execution of the OS is paused,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering which might be slow to enter, and on
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering complete power loss does not result in
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering lost data but might be slower to exit
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering in that case. This mode is called
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering suspend-to-both by the kernel.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </para></listitem>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </variablelist>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <para>Settings in this file determine what strings
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering will be written to
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <filename>/sys/power/disk</filename> and
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <filename>/sys/power/state</filename> by
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering when
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering attempts to suspend or hibernate the machine.</para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </refsect1>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refsect1>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <title>Options</title>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <para>The following options can be configured in the
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <literal>[Sleep]</literal> section of
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <filename>/etc/systemd/sleep.conf</filename>:</para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <variablelist class='systemd-directives'>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>SuspendMode=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>HibernateMode=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>HybridSleepMode=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <listitem><para>The string to be written to
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <filename>/sys/power/disk</filename> by,
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek respectively,
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek More than one value can be specified by separating
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek multiple values with whitespace. They will be tried
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek in turn, until one is written without error. If
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek neither succeeds, the operation will be aborted.
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek </para></listitem>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>SuspendState=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>HibernateState=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>HybridSleepState=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <listitem><para>The string to be written to
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <filename>/sys/power/state</filename> by,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering respectively,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering More than one value can be specified by separating
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering multiple values with whitespace. They will be tried
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering in turn, until one is written without error. If
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering neither succeeds, the operation will be aborted.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </para></listitem>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </varlistentry>
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek </variablelist>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </refsect1>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refsect1>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <title>Example: freeze</title>
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek <para>Example: to exploit the <quote>freeze</quote> mode added
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering in Linux 3.9, one can use <command>systemctl suspend</command>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering with
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <programlisting>[Sleep]
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringSuspendState=freeze</programlisting></para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </refsect1>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refsect1>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <title>See Also</title>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </refsect1>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering</refentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering