Differences between revisions 28 and 29
Revision 28 as of 2023-08-30 06:24:47
Size: 4905
Editor: TobiasFrost
Comment: remove obsolete lenny section.
Revision 29 as of 2023-08-31 14:38:35
Size: 4983
Editor: PengouinPdt
Comment: change to HEADER TAG Translation
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: [[de/Hibernation|Deutsch]] - English - [[it/Hibernation|Italiano]] -~ ##TAG:TRANSLATION-HEADER-START
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: [[de/Hibernation|Deutsch]] - [[Hibernation|English]] - [[it/Hibernation|Italiano]] -~
##TAG:TRANSLATION-HEADER-END

Translation(s): Deutsch - English - Italiano


This page presents hibernation aka suspend to disk or STD aka S4 under Debian.

UEFI / Secure Boot

The Linux kernel disables the possibility of hibernation when Secure Boot is in use because it cannot guarantee that the swap file is unchanged. "Unencrypted hibernation/suspend to swap are disallowed as the kernel image is saved to a medium that can then be accessed."

Actually you can't use hibernate feature with a secure boot.

Is more or less work in progress. A first patch was refused and actually a second review looks in course.

Suspend and hibernate configuration in Debian Jessie

You may get hibernation working out of the box (even without uswsusp), provided that you have a swap partition big enough to hold an image of the system.

GNOME users might want to install the Hibernate Status Button extension.

It can sometimes be convenient to have a laptop first "Suspend" to RAM, for quick wake-up -- but then automatically save RAM to disk, and power off. This combination of suspend-then-hibernate has been dubbed "Suspend Sedation" by Microsoft. For information of how to enable such behaviour with systemd, see: SystemdSuspendSedation.

Uswsusp

uswsusp is the default hibernation tool in DebianEtch. It uses an existing swap partition to save the memory state (see /etc/uswsusp.conf).

  • You should invoke s2disk to hibernate the system (not hibernate, don't directly "echo" to /proc/acpi/sleep or /sys/power/disk )

  • Make sure you read /usr/share/doc/uswsusp/README.Debian.

Hibernate with hibernate command

$ sudo apt-get install hibernate
$ sudo hibernate

Hibernate without Swap Partition

How to Hibernate without Swap Partition.

Debugging hibernation

Kernel testing facility

Since linux 2.6.25, the kernel has a new Hibernation testing facility changelog.

Make it possible to test the hibernation core code with the help of the /sys/power/pm_test attribute introduced for suspend testing in the previous patch.

Writing an appropriate string to this file causes the hibernation code to work in one of the test modes defined as follows:

freezer
test the freezing of processes
devices
test the freezing of processes and suspending of devices
platform
test the freezing of processes, suspending of devices and platform global control methods(*)
processors
test the freezing of processes, suspending of devices, platform global control methods(*) and the disabling of nonboot CPUs
core
test the freezing of processes, suspending of devices, platform global control methods(*), the disabling of nonboot CPUs and suspending of platform/system devices

*) The platform global control methods are only available on ACPI systems and are only tested if the hibernation mode is set to "platform"

Then, if a hibernation is started by normal means, the hibernation core will perform its normal operations up to the point indicated by given test level. Next, it will wait for 5 seconds and carry out the resume operations needed to transition the system back to the fully functional state.

The actual message (for googlers) are hibernation debug: Waiting for 5 seconds and swsusp debug: Waiting for 5 seconds.

Remove old configuration

On previous configuration, was recommended to define device resume on grub configuration. You must remove these information. Check and clean your /etc/default/grub and GRUB_CMDLINE variable.

Changing or moving the swap partition

In case you need to change the swap partition, apart from updating /etc/fstab, you must also change /etc/initramfs-tools/conf.d/resume and execute

apt-get install --reinstall initramfs-tools

or

update-initramfs -u

Don't forget on resume file you can't provide UUID lvm, in this case dev mapper path must be provided

RESUME=/dev/mapper/vg0-swap



CategorySystemAdministration