You are not logged in.

#1 2021-12-15 20:47:22

Freccia
Member
Registered: 2021-12-15
Posts: 5

Arch can't restore from hibernation

Some days ago I installed, for the first time, a fully functional Arch with a DE. I did some more configuration to get the wifi, bluetooth and audio working on my machine. Today i wanted to set up the hibernation (I have swap partition for this purpose) so I followed the wiki page. With su privilege:

  1. /etc/default/grub
    GRUB_CMDLINE_LINUX_DEFAULT="resume=/path_to/swab_space"
  2. mkconfig-grub -o /boot/grub/grub.cfg
  3. echo maj:min >/sys/power/resume

    this change isn't consistent: after a reboot it return 0:0

  4. /etc/mkinitcpio.conf
    HOOKS=(base udev autodetect modconf block filesystems resume keyboard fsck)

    I also tried to put resume before filesystems, but nothing changed

  5. mkinitcpio -P

Except the file in /sys/power, everything seems fine to me. I ignored this also because systemctl hibernate works,  but when the computer awakes the state was not resumed. Everytime is like a fresh start.
I found this on the wiki:

Also problem may arise when using hardware watchdog timer (disabled by default, see RuntimeWatchdogSec= in systemd-system.conf(5) §OPTIONS). Bugged watchdog timer may reset the computer before the system finished creating the hibernation image.

The real problem would therefore not be the hibernation but the system that does not have time to write its status. How can I find out if this is my case and how can I fix it?

Last edited by Freccia (2021-12-15 21:25:35)

Offline

#2 2021-12-15 21:55:09

seth
Member
Registered: 2012-09-03
Posts: 31,003

Re: Arch can't restore from hibernation

Don't paraphrase.
Elaborate on the nature of the SWAP (file or partition) and don't use placeholders like "/path_to/swab_space" or "maj:min"

Offline

#3 2021-12-16 15:16:13

Freccia
Member
Registered: 2021-12-15
Posts: 5

Re: Arch can't restore from hibernation

I didn't understand what do you mean with "Don't paraphrase", but this is only a linguistic problem since I'm not english and my capable to understand it is limited, for now. However can I find out if the watchdog timer is really bugged?

Offline

#4 2021-12-16 15:18:53

seth
Member
Registered: 2012-09-03
Posts: 31,003

Re: Arch can't restore from hibernation

I didn't understand what do you mean with "Don't paraphrase"

If

GRUB_CMDLINE_LINUX_DEFAULT="resume=/path_to/swab_space"

is the literal line in the file, it's bogus.
If it's not, post the actual lines. Same goes for "echo maj:min >/sys/power/resume"

Offline

#5 2021-12-16 22:13:11

Freccia
Member
Registered: 2021-12-15
Posts: 5

Re: Arch can't restore from hibernation

ah ok

GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/nvme0n1p6"

and

echo 295:6 > /sys/power/resume

but after a reboot the content of the fire returs 0:0

Offline

#6 2022-01-03 16:13:23

Gepetto
Member
Registered: 2021-06-02
Posts: 3

Re: Arch can't restore from hibernation

From reading the wiki, it doesn't seem that step c is relevant:

The kernel parameters will only take effect after rebooting. To be able to hibernate right away, obtain the volume's major and minor device numbers from lsblk and echo them in format major:minor to /sys/power/resume

Setting up hibernation requires setting kernel parameters, which you did in steps a and b. However, the effects of step b only appear after the next reboot. Step c is there to allow you to hibernate before the next reboot. /sys/power/resume is supposed to reset after every boot and you don't need to fiddle with it every time you want to hibernate.

Offline

#7 2022-01-03 16:23:45

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 6,419

Re: Arch can't restore from hibernation

Disclaimer: I don't use hibernate so this post might just be noise but

Freccia wrote:
GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/nvme0n1p6"

It's better to specify the UUID or some other persistent block device name (as clearly stated on the wiki page) because if you have more than one NVMe device then the /dev/nvme0n1 assignment might change from one boot to the next.

Offline

Board footer

Powered by FluxBB