Is it possible to hibernate from a swap file?
Hibernate with Swap file using uswusp. Although it is possible to hibernate to swap file and it supposedly works with systemd hibernate by setting kernel parameters.
How to go automatically from suspend into hibernate?
The solution to this is simple. First, upon suspend and resume, the pm-suspend program executes a series of scripts in /etc/pm/sleep.d and /usr/lib/pm-utils/sleep.d. So my solution is to add a script that does the following:
How to use suspend and hibernate in Arch Linux?
systemd provides native commands for suspend, hibernate and a hybrid suspend, see Power management#Power management with systemd for details. This is the default interface used in Arch Linux. See Power management#Sleep hooks for additional information on configuring suspend/hibernate hooks.
Do you need a password for Sudo s2both hibernate?
You must be able to execute sudo s2both, sudo s2ram and sudo systemctl hibernate without having to enter your password for the previous scripts to work. You could do that for example by creating a powerdev group, add your current user to it, and configure the following sudoers config (edit it with sudo visudo -f /etc/sudoers.d/powerdev ):
Are there snapshot messages on the screen on Hibernate and resume?
There should be snapshot messages on the screen on hibernate and resume. By default systemd will use it’s own hibernate commands so replace them with the uswusp commands by overriding the systemd-hibernate.service:
Is it possible to resume from a swap file?
Although it is possible to hibernate to swap file and it supposedly works with systemd hibernate by setting kernel parameters. However, I couldn’t get it to resume so instead switched to using uswsusp (userspace software suspend).
How to save a resume file in GRUB2?
With Grub2 is really simple, and your changes will be always preserved. You need to edit the /etc/default/grub file, specifically this line: GRUB_CMDLINE_LINUX=”resume=… resume_offset=…” After that, run sudo update-grub for the changes to take effect.