You are not logged in.

#1 2020-08-09 12:41:34

Compizfox
Member
Registered: 2015-08-06
Posts: 20

Hibernation woes

Hi all,

I have some annoying problems with hibernation (suspend to disk) on my PC.

I followed the Arch wiki article for enabling hibernation into a swap file. I have 16 GB of RAM, and the same amount of swap.

First of all, suspend to disk often fails. From the logs it appears that it tries to suspend, but there is not enough swap space (?) and it wakes up again:

aug 09 14:22:09 Vigil kernel: PM: hibernation: Creating image:
aug 09 14:22:09 Vigil kernel: PM: hibernation: Need to copy 2097611 pages
aug 09 14:22:09 Vigil kernel: PM: hibernation: Normal pages needed: 2097611 + 1024, available pages: 2078622
aug 09 14:22:09 Vigil kernel: PM: hibernation: Not enough free memory
aug 09 14:22:09 Vigil kernel: PM: hibernation: Error -12 creating image

aug 09 14:22:06 Vigil rtkit-daemon[919]: The canary thread is apparently starving. Taking action.
aug 09 14:22:09 Vigil systemd-sleep[2088867]: Failed to suspend system. System resumed again: Cannot allocate memory
aug 09 14:22:06 Vigil rtkit-daemon[919]: Demoting known real-time threads.
aug 09 14:22:09 Vigil systemd[1]: NetworkManager-dispatcher.service: Succeeded.
aug 09 14:22:06 Vigil rtkit-daemon[919]: Successfully demoted thread 2085059 of process 2057685.
aug 09 14:22:09 Vigil systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
aug 09 14:22:06 Vigil rtkit-daemon[919]: Successfully demoted thread 2083594 of process 2057670.
aug 09 14:22:09 Vigil systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
aug 09 14:22:06 Vigil rtkit-daemon[919]: Successfully demoted thread 2071926 of process 2057678.
aug 09 14:22:09 Vigil systemd[1]: Failed to start Hibernate.
aug 09 14:22:06 Vigil rtkit-daemon[919]: Successfully demoted thread 2069761 of process 2057707.
aug 09 14:22:09 Vigil systemd[1]: Dependency failed for Hibernate.

The above situation happened when both the RAM and swap were about half full.

When suspend to disk does work, it is very slow: it takes about a minute, and the sequence is as follows:

- The system is shutting down
- The PC appears to power cycle (from the fans going 100% for a while, then spinning down again, like a normal boot cycle)
- My monitors come on again, but displaying a black screen
- Only my mouse cursor appears momentarily,
- And then the PC powers down finally.

It doesn't seem normal to me that the PC is 'rebooting' before finally powering down, right? I'm not sure what causes this. The journalctl log doesn't show anything between initiating suspend to disk, and waking up again.

Suspend to RAM (S3) works fine, and within 5 s or so.

Offline

#2 2020-08-10 07:29:44

andym
Member
From: France
Registered: 2019-01-16
Posts: 49

Re: Hibernation woes

I wonder why, when you have 16GB of RAM, your swap space usage is so high. What is using that swap space? Have you lookied into changing thw "swappiness" of the system?

Offline

#3 2020-08-10 12:43:17

Wild Penguin
Member
Registered: 2015-03-19
Posts: 319

Re: Hibernation woes

I concurr with andym. Unless you know you are running something RAM-intensive applications, you shouldn't be using that much swap (unless swappiness is high). However, I believe decreasing swappiness would not solve the issue, as all disk caches are discarded at hibernation (i.e. cached data is not included in the hibernation image). Unless I'm mistaken, swappiness will only effect how easily the Kernel will try to swap out pages so that more RAM can be used for disk cache (i.e. it will have no effect whatsoever on the actual memory usage or hibernation image size).

Either there is a memory leak, in which case, try to find out what is causing it. If there is no leak and you are intentionally and knowingly using a lot of RAM, then (preferentially) add more RAM, or increase the size of the SWAP(shared w/Hibernation) partition.

Last edited by Wild Penguin (2020-08-10 12:43:52)

Offline

Board footer

Powered by FluxBB