Score:0

Kubuntu 21.04 - how to get hibernate working when it appears disabled from kernel?

cn flag

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

cn flag
@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?
cn flag
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]`).
waltinator avatar
it flag
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.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.