Hey everyone. I recently installed OpenSUSE onto my HP Envy 15t-as100. After a couple of weeks of running this, however, I’ve run into an incredibly odd problem. As of a few days ago, the laptop has completely lost its ability to hibernate. The menu in the desktop environment (XFCE) where power options are located shows the option for hibernation, but it is now greyed out; the command ‘cat /sys/power/state’ only shows freeze and memory; the command ‘cat /sys/power/disk’ simply shows [disabled]; and if the laptop reaches critically low power and tries to hibernate, then it will only log me out and show a power manager error about ‘hibernate’ not being a supported verb. The weird bits about this, though, are that the kernel configuration shows hibernation enabled and that I know this laptop is capable of hibernation, as I’ve done it multiple times before both in OpenSUSE and the Gentoo install on this laptop prior to this. If I remember correctly, I did a system update right before all of this began, so my only possible guess as to what happened was that Dracut did something weird. Any advice on what the problem might be or how to fix it would be greatly appreciated.
UEFI or legacy BIOS? Is Secure Boot enabled in BIOS?
Need more info about hw.
The OS is currently being booted in UEFI with secure boot enabled.
What information do you need? I gave you the model number, and while I know this laptop could come with a ton of different hardware, I don’t really think that would change anything.
Check your SWAP partition
# swapon
NAME TYPE SIZE USED PRIO
/dev/sda4 partition 18.6G 0B -2
Disable UEFI Secure Boot. Check hibernation:
# systemctl hibernate
After reenable UEFI Secure Boot.
# dmesg |grep -i lockdown |grep -i hiber
[ 0.877273] Lockdown: swapper/0: hibernation is restricted; see man kernel_lockdown.7
[ 2.382758] Lockdown: systemd-hiberna: hibernation is restricted; see man kernel_lockdown.7
[ 2709.580806] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
[ 2709.595260] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
[ 2727.464592] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
read:
# man kernel_lockdown
and read the information about the secret key for hibernation:
Hibernation is not allowed in this case.
I appreciate the info (disabling Secure Boot does fix it), but what do I do with the patch file in that link? The kernel/power/hibernate.c file it points to doesn’t exist, and the kernel/power directory only contains the Makefile and Kconfig. That is, of course, assuming I’m looking at the correct directory (/usr/src/linux/kernel/power).
You and arvidjaar should read and learn from this links, that the official SUSE kernel (6.4 → openSUSE Leap 15.6) supports hibernation in UEFI Secure boot mode. There is a patch from SUSE for the linux kernel 6.4 which allow the usage of hibernation in UEFI Secure boot mode. Other linux kernel versions for openSUSE Leap 15.6 doesn’t support hibernation in UEFI Secure boot mode.
This patch works with a secret key. The storage place of this secret key is the NVRAM of the UEFI Firmware (BIOS).
The source of the numbers in the secret key is a hardware random number generator (hwrng). Linux kernel needs access to this hardware random number generator over the UEFI Firmware (BIOS) to create the secret key for hibernation in UEFI Secure boot mode.
Check your linux kernel version and keep an eye on dmesg output. Here an example from a machine (SLED15 SP6) which doesn’t support hibernation in UEFI Secure boot:
# uname -rsm
Linux 6.4.0-150600.23.38-default x86_64
# mokutil --sb-state
SecureBoot enabled
# systemctl hibernate
Call to Hibernate failed: Sleep verb "hibernate" not supported
# dmesg |grep -i hiber
[ 1845.711525] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
[ 1845.711530] PM: hibernation: the secret key is invalid
# echo 1 > /sys/firmware/efi/secret-key/regen
# reboot
# dmesg |grep -i hiber
[ 3.356348] EFI_RNG_PROTOCOL unavailable, hibernation will be lock-down.
[ 3.358724] Lockdown: swapper/0: hibernation is restricted; see man kernel_lockdown.7
[ 3.358726] PM: hibernation: the secret key is invalid
Dmesg output “EFI_RNG_PROTOCOL unavailable” informs me about a UEFI firmware (BIOS) which do not provide access to any hardware random number generator.
I greatly appreciate the better explanation. After doing the key regen, hibernation now works again.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.