I find the information in the wiki inconsistent across pages and it is unclear which is outdated.
In theory you can suspend to disk by issuing:
# systemctl hibernate
What systemd really does, is in the blue, as everything with systemd. But you can also try to do it directly via
# echo -n "disk" > /sys/power/state
Both work on my system and I can see the hard-drive flashing while the image is written. I also found in the syslog (journalctl) an entry when activating the swap along the lines of "swsusp header found, re-creating swap space".
The problem is that the system never resumes from that data (and then overwrites it when mounting the swap).
I tried two countermeasures:
- add "resume" hook in mkinitcpio before "fsck" (where should it be added actually?)
- add "resume=/dev/sda6" to kernel parameters via GRUB
Journalctl reveals that the kernel is indeed started with said parameter. However I don't find any other trails of "resume" or "suspend" in journalctl.
Does anybody have a running suspend-to-disk solution and what did you change to make it work?
Thanks in advance,
I got it to work with just the two changes you mentioned. But you should be aware that just changing the configuration files is not enough. For the mkinitcpio change to take affect you have to rebuild the initramfs image:
mkinitcpio -p linux
The resume hook has to be added to the HOOKS, see https://wiki.archlinux.org/index.php/Su … al_ramdisk
The resume kernel parameter in the GRUB configuration requires you to run the grub-mkconfig command (see https://wiki.archlinux.org/index.php/Su … arameters), but from your comments I assume you already did that. And double check whether /dev/sda6 is indeed the swap partition.
Could this perhaps be the same or similar problem as I have here?
What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...
... and who is general Failure and why is he reading my harddisk?
Thank you for the confirmation that it should work as described. Hibernation now works for me too. Yes, I had always rebuilt the initcpio.
The thing I changed was that I placed "resume" before "filesystems" in the HOOKS. From the data I gathered from the log files however I would have assumed this was not the cause of the problem. As the "swapon" message was always after the (previously missed) "Hibernation image not present or could not be loaded." message. So I don't know what the problem really was.
That will unfortunately not help mr.MikyMaus.
Last edited by ypnos (2013-09-24 06:15:39)
A shock today: Hibernation is not working any more! It worked perfectly fine the other day, what is happening?
Well simple solution: I was toying around with the new systemd hook. Turns out if you have it in your hookline
HOOKS="base systemd autodetect ... resume filesystems"
the resume hook is not being respected. So for now I stick to my old one.
HOOKS="base udev autodetect ... resume filesystems"
P. S. There is already a bug report to my problem: https://bugs.archlinux.org/task/37028
Last edited by wombalton (2013-09-28 09:19:32)