You are not logged in.
Pages: 1
Hi
I want hibernate and suspend my system with systemd( systemctl hibernate and systemctl suspend). Suspend looks like work correctly, but hibernate isn't wokring.
I've added resume to my hooks in mkinitcpio.
I don't know where are any configuration files for this task, I never found it.
I would be grateful if someone wants help me configured this hibernation.
Offline
Do you have resume in your kernel line? It should be like this resume= (path to your swap such as /dev/sda2). This stuff is in the wiki by the way.
Last edited by quasifilmie (2012-09-12 18:04:00)
Offline
Yes, i have resume in my /etc/mkinitcpio.conf, but it didn't work with my path to swap(only resume working).
And is possibility to modify hibernate options?
Offline
You should have resume in HOOKS array in mkinitcpio.conf, and resume=/partition/to/resume (/dev/sda*) in your bootloader conf file.
Offline
Ok, it works now. Thanks.
But it still hibernate to swap partition? Can I change this partition to another?
Another question is: where is suspend? RAM or SWAP?
Offline
You can make it hibernate to a swap file. https://wiki.archlinux.org/index.php/Ma … bernate.29
Suspension leaves the RAM on and powers off the rest, hibernation writes the contents of RAM to the disk (swap partition or swap file) and powers off everything.
Last edited by lucke (2012-09-12 21:37:12)
Offline
lucke, that section is not about systemd hibernation, as per the OP's original question.
Offline
The OP asked if they could hibernate to a partition other than a swap partition. That sections explains how to make the regular (as opposed to uswsusp or tuxonice) hibernation work with a swap file. That way of hibernation can be triggered by systemd's "systemctl hibernate", pm-utils' "pm-hibernate" (with pm-utils set to use the regular hibernation) or "echo disk > /sys/power/state".
Offline
OK, apologies if I misunderstood you.
In that case, do you know how to make "systemctl hibernate" work with a swap file? I've tried it here, and it failed - the error message is
PM: Swap header not found!
Offline
Did you follow that wiki section and set the offset in the kernel line?
Offline
Correct me if I'm wrong, but that's a resume parameter - how does that help me if I can't hibernate in the first place?
Offline
I shall readily correct you, for you are wrong! That resume/resume_offset points to where to put (and find) the hibernation image. Please note that in case of a swap file resume= points to the partition holding the swap file.
Offline
So happy to be corrected
Thanks, lucke, works perfectly now.
Offline
lucke, that section is not about systemd hibernation, as per the OP's original question.
Configuring systemd hibernate is no different. You need the resume hook and to specify a resume partition or file. That's all I did and it hibernates fine with systemctl hiberante.
Last edited by bwat47 (2012-09-16 00:53:22)
Offline
Hi, i have the same issue.
In my mkinitcpio.conf i have:
HOOKS="base udev autodetect pata scsi sata resume filesystems usbinput fsck"
and in menu.lst i have:
kernel /vmlinuz-linux root=/dev/sda3 ro radeon.audio=1 init=/usr/lib/systemd/systemd resume=/dev/sda5 (where sda5 is my swap partition)
And when i do "systemctl hibernate", that tell me: "swap header not found"
Offline
@dionisos
If you check out the link provided by lucke in #6 you will notice that the resume info must be included before the ro part. Change it and check again.
\(o_X)/
'Cause I wanna be an Archy - An Archy in the UK // Sex Pistols
Offline
Thanks root.
I try to change the order, but that doesn’t change anything.
I have also a: "[drm] nouveau 0000:01:00.0: 0x7374: i2c rd fail: -6" message. (don’t know if there may be a link).
Offline
when i do "systemctl hibernate", that tell me: "swap header not found"
Are you sure your swap is setup correctly?
Offline
I think, and i can hibernate with uswsusp (i find that strange because i change uresume for resume in the hook list)
more /proc/swaps
Filename Type Size Used Priority
/swapfile file 2097148 0 10
/dev/sda5 partition 3903756 0 100
do I have something to configure for the swap ?
Offline
Try "swapoff /swapfile" before hibernating.
See if "cat /proc/cmdline" shows resume=/dev/sda5.
Last edited by lucke (2012-11-13 16:21:14)
Offline
I do swapoff/swapon, and then my computer shutdown but don’t resume when it turn on.
Then i do a "mkinitcpio -p linux", and then the resume work.(i read somewhere that i don’t have to)
And after one reboot everything seems to work.
Thanks !!
Offline
Pages: 1