This thread is meant to be a follow up of a previous support thread on the same issue, also authored by me, that was “solved” by updating the Linux kernel but now came back. The original thread is here, but you don’t need to see it as I will describe everything I know and what I have done so far.
The issue
On some circumstances I am unable to hibernate my machine. Usually it’s something like having Spotify open or having a lot of things opened. The error that systemd reports is always the same and looks like the following:
ago 28 13:05:15 UD-Legion systemd[1]: Starting Hibernate...
ago 28 13:05:15 UD-Legion systemd-sleep[91318]: [10] INFO: # Pre-suspend hook
ago 28 13:05:15 UD-Legion systemd-sleep[91318]: [10] INFO: Previous state was: {'type': 'done', 'switch_id': '20210826T112121', 'current_mode': 'integrated'}
ago 28 13:05:15 UD-Legion systemd-sleep[91318]: [11] INFO: Switching option: none
ago 28 13:05:15 UD-Legion systemd-sleep[91318]: [11] INFO: Turning Nvidia GPU back on
ago 28 13:05:15 UD-Legion systemd-sleep[91372]: modinfo: ERROR: Module bbswitch not found.
ago 28 13:05:15 UD-Legion systemd-sleep[91376]: modinfo: ERROR: Module acpi_call not found.
ago 28 13:05:16 UD-Legion systemd-sleep[91318]: [487] INFO: switching=none, nothing to do
ago 28 13:05:16 UD-Legion systemd-sleep[91318]: [487] INFO: Writing state {'type': 'pending_post_resume', 'switch_id': '20210826T112121', 'current_mode': 'integrated'}
ago 28 13:05:16 UD-Legion systemd-sleep[91318]: [487] INFO: Pre-suspend hook completed successfully.
ago 28 13:05:16 UD-Legion systemd-sleep[91315]: Suspending system...
ago 28 13:05:17 UD-Legion systemd-sleep[91315]: Failed to suspend system. System resumed again: Cannot allocate memory
ago 28 13:05:18 UD-Legion systemd-sleep[91469]: [15] INFO: # Post-resume hook
ago 28 13:05:18 UD-Legion systemd-sleep[91469]: [16] INFO: Previous state was: {'type': 'pending_post_resume', 'switch_id': '20210826T112121', 'current_mode': 'integrated'}
ago 28 13:05:18 UD-Legion systemd-sleep[91469]: [17] INFO: Turning Nvidia GPU off again
ago 28 13:05:18 UD-Legion systemd-sleep[91556]: modinfo: ERROR: Module bbswitch not found.
ago 28 13:05:18 UD-Legion systemd-sleep[91564]: modinfo: ERROR: Module acpi_call not found.
ago 28 13:05:18 UD-Legion systemd-sleep[91469]: [544] INFO: switching=none, nothing to do
ago 28 13:05:18 UD-Legion systemd-sleep[91469]: [544] INFO: Writing state {'type': 'done', 'switch_id': '20210826T112121', 'current_mode': 'integrated'}
ago 28 13:05:18 UD-Legion systemd-sleep[91469]: [544] INFO: Post-resume hook completed successfully.
ago 28 13:05:18 UD-Legion systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
ago 28 13:05:18 UD-Legion systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
ago 28 13:05:18 UD-Legion systemd[1]: Failed to start Hibernate.
ago 28 13:05:18 UD-Legion systemd[1]: systemd-hibernate.service: Consumed 2.515s CPU time.
In the previous thread, after updating the kernel, the problem was “solved”. Only Spotify would create this issue, but today, hibernation failed, with a few tabs open on Firefox as well as a few other programs running which I always use, showing me the same error. I was able to hibernate after closing a few tabs on Firefox, meaning that the issue isn’t with Spotify has it was pointed out in the previous thread.
Failed hibernation sequence
After the kernel update a failed hibernation does the following sequence:
- I issue a
sudo systemctl hibernate
; - The lockscreen shows up;
- What appears to be a TTY with several messages, usually 2 or 3, saying something similar to
[6200.052148] PM: hibernation: Image allocation is 156834 pages short
; - The lockscreen comes back up and I have to login again because the hibernation failed. The peripherals LEDs remain always on.
Successful hibernation sequence
After the kernel update a successful hibernation follows the following pattern (the first 3 steps are the same) (video available here):
- I issue a
sudo systemctl hibernate
; - The lockscreen shows up;
- What appears to be a TTY with several messages, usually 2 or 3, saying something similar to
[6200.052148] PM: hibernation: Image allocation is 156834 pages short
; - The screen darkens and peripherals lose their power;
- The TTY shows up again and peripherals get their power back;
- The system finally hibernates with a loud popping sound on my headset.
Systems specs
- OS: Manjaro (installed from the Architect installer)
- WM: i3
- Kernel: 5.10.59-1-MANJARO x86_64
- GPU: iGPU (Intel) + dGPU (NVIDIA 1050Ti)
- 8 GiB of RAM and 12 GiB of swap
- Swap is available on it’s own partition and mounted in
/etc/fstab
- rEFInd
- Dual boot with Windows 10
TL;DR: Unable to hibernate although I have more swap than RAM, and the fix seems to be shutting down programs.
EDIT: This post was originally created on another thread, because this one was locked, but now it was moved here!