How can I enable hibernation under Linux Mint 18.3?

3

I have Linux Mint 18.3 installed and it appears not to have hibernation enabled:

$ sudo systemctl hibernate
Failed to hibernate system via logind: Sleep verb not supported

Is this because my slightly obscure hardware does not have resources that Linux knows how to talk to, or is there a way that I can configure things so that I can, ultimately, hit the power button and have the computer hibernate?

Christos Hayward

Posted 2018-03-23T23:48:38.617

Reputation: 753

How large the swap space is? And does it use any secure boot and other stuff (BIOS settings)? I believe this is enabled by default in Mint. – Epoxy – 2018-03-24T01:34:20.423

@Epoxy "How large the swap space is?" Bingo, that's my problem. I need to repartition... Please restate your comment as a question so I can accept it. – Christos Hayward – 2018-03-25T12:08:46.050

Sounds good! I have posted this as the answer. Thank you! :) @Jonathan – Epoxy – 2018-03-28T12:42:02.100

A forwarded comment for toddg: See this guide to adding a hibernate swap file: https://forums.linuxmint.com/viewtopic.php?f=42&t=284100

– zx485 – 2019-09-12T21:16:22.803

Answers

4

The Hibernation depends on the swap file. In Linux Mint this is enabled by default but still, if the swap file is not adequate in size, you are still prohibited from enabling this service.

The important thing here is to calculate the swap space needed for the system operation Vs. the hibernate feature. As an example, one would own a system with a 4 GiB memory. The swap would normally (or a good size) be 9GiB.

Once this is set properly, you will be able to enable the hibernate option.

Epoxy

Posted 2018-03-23T23:48:38.617

Reputation: 395

1Just to enable hibernation, you only need swap to equal RAM... Actual size, so if you have 4GB of RAM your cache size must be at minimum 4294967296 bytes. although an additional 10% buffer is recommended, so for 4GB RAM you should have 4.5-5GB cache, if you have 8GB of RAM you should have ~9GB cache. Outside of the consideration of hibernation, cache space recommended varies by system use and application. – acejavelin – 2018-03-28T13:13:28.100