You are not logged in.

#1 2019-10-22 23:19:25

goosestepping
Member
Registered: 2019-09-25
Posts: 79

Cannot get hibernation to work.

Hello guys, I have followed the instructions here https://wiki.archlinux.org/index.php/Po … e_on_Btrfs and when i issue the command 'systemctl hibernate -i' my screen will just flash off and then on again and i will be presented with the lock screen. My journal says this about it: https://bpaste.net/raw/ELQR4,

Could somebody please help me work this out?

Thanks.

EDIT: Do I need the resume parameter as mentioned directly above in 'Hibernation into swap file'?

Last edited by goosestepping (2019-10-22 23:22:18)

Offline

#2 2019-10-22 23:27:58

loqs
Member
Registered: 2014-03-06
Posts: 19,098

Re: Cannot get hibernation to work.

Yes.  That is why you are asked to document the steps you have performed instead of simply stating you followed some instructions.

Offline

#3 2019-10-22 23:46:55

goosestepping
Member
Registered: 2019-09-25
Posts: 79

Re: Cannot get hibernation to work.

Okay it still isn't working... The journal says the same thing.

This is what my kernel command line looks like, https://bpaste.net/raw/7NDHM.

Offline

#4 2019-10-22 23:49:21

loqs
Member
Registered: 2014-03-06
Posts: 19,098

Re: Cannot get hibernation to work.

You checked those are the options being used by examining /proc/cmdline ?
You still have not documented what steps you actually performed including the contents of all files you modified and all commands you ran with their outputs.

Offline

#5 2019-10-23 00:04:25

goosestepping
Member
Registered: 2019-09-25
Posts: 79

Re: Cannot get hibernation to work.

Yes, they are the options being used...

Okay, well; I first put the resume parameter into my kernel command line (my kernel parameters are shown above) I then put the resume_offset parameter in using the value which I got from when I ran './btrfs_map_physical /.swap/swapfile'.

Now I am not too sure about what to do at the last part (regarding configuring the initramfs) because I am using dracut and not mkinitcpio.

Edit: I just rebuilt my dracut initramfs and noticed that it says this while making the file: dracut: *** Including module: resume ***

So I assume that everything is fine there.

Last edited by goosestepping (2019-10-23 00:09:56)

Offline

#6 2019-10-23 00:06:58

loqs
Member
Registered: 2014-03-06
Posts: 19,098

Re: Cannot get hibernation to work.

Did you try `man dracut` to see how to invoke it manually?
Edit:
Although I would have expected systemd to allow resume as long as the kernel options are present even if the initrd can not support it.

Last edited by loqs (2019-10-23 00:09:28)

Offline

#7 2019-10-23 00:08:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Cannot get hibernation to work.

man dracut.cmdline

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2019-10-23 00:21:30

loqs
Member
Registered: 2014-03-06
Posts: 19,098

Re: Cannot get hibernation to work.

If you enable debug level logging in systemd it will provide additional output on why hibernation is not allowed

# kill -s SIGRTMIN+22 1

See man 1 systemd for documentation on signals relating to systemd.
Edit:
Corrected signal to SIGRTMIN+22,  SIGRTMIN+23 resets log level.

https://github.com/systemd/systemd/blob … eep.c#L159 covers the possible failure causes

Last edited by loqs (2019-10-23 00:30:17)

Offline

#9 2019-10-23 00:34:52

goosestepping
Member
Registered: 2019-09-25
Posts: 79

Re: Cannot get hibernation to work.

I typed what you wrote above but it isn't giving me any additional information...

Offline

#10 2019-10-23 00:41:02

loqs
Member
Registered: 2014-03-06
Posts: 19,098

Re: Cannot get hibernation to work.

What is the output of the following

cat /sys/power/resume_offset /sys/power/resume

Offline

#11 2019-10-23 00:53:37

goosestepping
Member
Registered: 2019-09-25
Posts: 79

Re: Cannot get hibernation to work.

[frankenstein@coprinus ~]$ cat /sys/power/resume_offset /sys/power/resume
155735296
0:0

Should those last two digits reflect what is in here:

  └─cryptroot   254:0    0 953.4G  0 crypt /home

?

Last edited by goosestepping (2019-10-23 00:55:31)

Offline

#12 2019-10-23 01:05:57

goosestepping
Member
Registered: 2019-09-25
Posts: 79

Re: Cannot get hibernation to work.

Okay i edited the file the put '254:0' into there and now it hibernates but it won't resume from hibernate... It's just as if I have only powered on the machine, it commences a fresh boot...

Edit: And on reboot it has replaced the values '0:0' into that file... How can I get it so that it is persistent?

Thank you guys for your help so far...

I presume that it isn't resuming from hibernation because I have messed up the offset value.


Edit 2: Okay so I have not messed up the offset value but it will not resume from hibernation.

This  is my value: https://ibb.co/qnt9y5X

And that divided by 4096 is equal to 155735296 and:

[frankenstein@coprinus ~]$ cat /sys/power/resume_offset /sys/power/resume
155735296
0:0

Last edited by goosestepping (2019-10-23 01:28:05)

Offline

#13 2019-10-23 04:51:14

goosestepping
Member
Registered: 2019-09-25
Posts: 79

Re: Cannot get hibernation to work.

Okay, so I have got 'resume=/dev/mapper/cryptroot' in my kernel parameters but for some reason 'cat /sys/power/resume' brings back the MAJ:MIN values 0:0 when it should be 254:0 (as shown in lsblk.) does anybody know why? Please help...

Offline

Board footer

Powered by FluxBB