0

I'm using Kubuntu 21.04 and trying to hibernate/suspend-to-disk my laptop. I'm not having much luck. The errors I'm getting seem to suggest a deeper issue than all the other Q&As I've seen about this - most other answers seem to suggest echo disk | sudo tee /sys/power/state is the solution, but I can't even get that far. I've tried several things and ultimately ended up at the system sleep states documentation for the kernel, which says to check /sys/power/state and /sys/power/disk to see if it's even supported.

$ sudo systemctl hibernate
Failed to hibernate system via logind: Sleep verb "hibernate" not supported
$ echo disk | sudo tee /sys/power/state
disk
tee: /sys/power/state: Operation not permitted
$ cat /sys/power/state
freeze mem
$ cat /sys/power/disk
[disabled]

So it looks to me like my kernel doesn't support hibernation...? The sleep states docs also say,

Hibernation is supported if the CONFIG_HIBERNATION kernel configuration option is set. However, this option can only be set if support for the given CPU architecture includes the low-level code for system resume.

  • Is there a reason Kubuntu doesn't have it enabled by default but ships with a "Hibernate" action?
  • How would I go about enabling this option on the kernel?
  • This is pedantic, but is it important that my /sys/power/disk exists and reports [disabled] even though the kernel docs say it's supposed to not exist if hibernation is unsupported? Are the docs wrong?

Copypasta from system information:

Operating System: Kubuntu 21.04
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-38-generic (64-bit)
Graphics Platform: X11
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics

3
  • Hibernation requires enough swap space to save RAM. Look at free. Read man free mkswap swapon pm-is-supported (pm is Power Management, read man -k pm). Find the tools, use the tools.
    – waltinator
    Oct 29, 2021 at 18:53
  • @waltinator I have sufficient swap: 16 GB of RAM in my system, only a few GB of which is being used, and slightly more than 16 GB of swap. pm-is-supported does not exist as a command or man page on my system, and man -k pm lists nothing related (man -k pm-, which might be more specifically what you're trying to point me to?, lists nothing). Google has not helped me find where to install that tool - can you point to any package that includes it?
    – eritbh
    Oct 31, 2021 at 1:13
  • I've found that pm-is-supported and friends come from the pm-utils apt package. pm-is-supported --hibernate gives a nonzero exit code, but doesn't give any additional information on why, and this doesn't tell me anything I didn't already know (hibernate is obviously not supported since /sys/power/disk reads [disabled]).
    – eritbh
    Oct 31, 2021 at 1:20

1 Answer 1

0

I got same problem and fixed it by following Ubuntu 18.04 can't resume after hibernate and https://unix.stackexchange.com/questions/114889/f20-unable-to-hibernate-sys-power-disk-disabled.

I disable Secure Boot in the bios and now got:

cat /sys/power/state 
freeze mem disk

cat /sys/power/disk 
[platform] shutdown reboot suspend test_resume 

And hibernation is working in my kubuntu 21.10 laptop now. I did some other things before disabling Secure Boot so likely some other steps are needed for full functioning. Disabling Secure Boot fix /sys/power/disk been disable for me.

1
  • I ended up giving up on hibernate on my Ubuntu install, but ran into similar issues under Debian later on. Wasn't until then that I read someone saying secure boot needed to be disabled; I didn't actually realize it was enabled on my machine, but disabling it caused hibernation stuff to start working again for me in Debian. It seems likely this would've fixed the issue in my Ubuntu install too so I'm accepting this answer.
    – eritbh
    May 16, 2022 at 5:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .