gnome-shell-extension-hibernate-status
gnome-shell-extension-hibernate-status copied to clipboard
Ubuntu 22.04 resumes from hibernation instantly
@slaclau as you requested now I report the issue. "Sadly" it looks like it is not related directly with the extension itself because systemctl hibernate
does not work either. I have and AMD+NVIDIA laptop. The following happens:
- Hibernation starts
- Displays goes off
- Suddenly the system came back after 5-6 secs
I have to mention that I use my machine docked with external peripherals. I set the machine to do nothing when the lid is closed. The hibernation function and the extension works well on my other laptops except this one.
Can you post the output of this command please;
sudo journalctl -u systemd-hibernate.service
Sorry for the late reply:
Mar 27 19:47:09 PC systemd[1]: Starting Hibernate...
Mar 27 19:47:09 PC systemd-sleep[208467]: Entering sleep state 'hibernate'...
Mar 27 19:47:11 PC systemd-sleep[208467]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 19:47:12 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 19:47:12 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 19:47:12 PC systemd[1]: Failed to start Hibernate.
Mar 27 19:47:12 PC systemd[1]: systemd-hibernate.service: Consumed 3.716s CPU time.
Mar 27 19:47:51 PC systemd[1]: Starting Hibernate...
Mar 27 19:47:51 PC systemd-sleep[208852]: Entering sleep state 'hibernate'...
Mar 27 19:47:54 PC systemd-sleep[208852]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 19:47:55 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 19:47:55 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 19:47:55 PC systemd[1]: Failed to start Hibernate.
Mar 27 19:47:55 PC systemd[1]: systemd-hibernate.service: Consumed 3.095s CPU time.
Mar 27 19:50:24 PC systemd[1]: Starting Hibernate...
Mar 27 19:50:24 PC systemd-sleep[209607]: Entering sleep state 'hibernate'...
Mar 27 19:50:27 PC systemd-sleep[209607]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 19:50:27 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 19:50:27 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 19:50:27 PC systemd[1]: Failed to start Hibernate.
Mar 27 19:50:27 PC systemd[1]: systemd-hibernate.service: Consumed 3.090s CPU time.
Mar 27 19:50:45 PC systemd[1]: Starting Hibernate...
Mar 27 19:50:45 PC systemd-sleep[209971]: Entering sleep state 'hibernate'...
Mar 27 19:50:47 PC systemd-sleep[209971]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 19:50:48 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 19:50:48 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 19:50:48 PC systemd[1]: Failed to start Hibernate.
Mar 27 19:50:48 PC systemd[1]: systemd-hibernate.service: Consumed 2.859s CPU time.
Mar 27 19:53:38 PC systemd[1]: Starting Hibernate...
Mar 27 19:53:38 PC systemd-sleep[210609]: Entering sleep state 'hibernate'...
Mar 27 19:53:40 PC systemd-sleep[210609]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 19:53:41 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 19:53:41 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 19:53:41 PC systemd[1]: Failed to start Hibernate.
Mar 27 19:53:41 PC systemd[1]: systemd-hibernate.service: Consumed 2.922s CPU time.
Mar 27 20:06:12 PC systemd[1]: Starting Hibernate...
Mar 27 20:06:12 PC systemd-sleep[212791]: Entering sleep state 'hibernate'...
Mar 27 20:06:14 PC systemd-sleep[212791]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 20:06:15 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 20:06:15 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 20:06:15 PC systemd[1]: Failed to start Hibernate.
Mar 27 20:06:15 PC systemd[1]: systemd-hibernate.service: Consumed 3.122s CPU time.
Mar 27 20:06:35 PC systemd[1]: Starting Hibernate...
Mar 27 20:06:35 PC systemd-sleep[213164]: Entering sleep state 'hibernate'...
Mar 27 20:06:37 PC systemd-sleep[213164]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 20:06:38 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 20:06:38 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 20:06:38 PC systemd[1]: Failed to start Hibernate.
Mar 27 20:06:38 PC systemd[1]: systemd-hibernate.service: Consumed 2.917s CPU time.
Mar 27 20:06:59 PC systemd[1]: Starting Hibernate...
Mar 27 20:06:59 PC systemd-sleep[213553]: Entering sleep state 'hibernate'...
Mar 27 20:07:01 PC systemd-sleep[213553]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 20:07:02 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 20:07:02 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 20:07:02 PC systemd[1]: Failed to start Hibernate.
Mar 27 20:07:02 PC systemd[1]: systemd-hibernate.service: Consumed 2.882s CPU time.
Mar 27 20:28:23 PC systemd[1]: Starting Hibernate...
Mar 27 20:28:23 PC systemd-sleep[216356]: Entering sleep state 'hibernate'...
Mar 27 20:28:25 PC systemd-sleep[216356]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 20:28:26 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 20:28:26 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 20:28:26 PC systemd[1]: Failed to start Hibernate.
Mar 27 20:28:26 PC systemd[1]: systemd-hibernate.service: Consumed 2.724s CPU time.
Mar 27 20:28:42 PC systemd[1]: Starting Hibernate...
Mar 27 20:28:42 PC systemd-sleep[216734]: Entering sleep state 'hibernate'...
Mar 27 20:28:44 PC systemd-sleep[216734]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 20:28:45 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 20:28:45 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 20:28:45 PC systemd[1]: Failed to start Hibernate.
Mar 27 20:28:45 PC systemd[1]: systemd-hibernate.service: Consumed 2.685s CPU time.
Mar 27 20:29:02 PC systemd[1]: Starting Hibernate...
Mar 27 20:29:03 PC systemd-sleep[217103]: Entering sleep state 'hibernate'...
Mar 27 20:29:04 PC systemd-sleep[217103]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 20:29:05 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 20:29:05 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 20:29:05 PC systemd[1]: Failed to start Hibernate.
Mar 27 20:29:05 PC systemd[1]: systemd-hibernate.service: Consumed 2.719s CPU time.
Mar 27 20:33:04 PC systemd[1]: Starting Hibernate...
Mar 27 20:33:04 PC systemd-sleep[217960]: Entering sleep state 'hibernate'...
Mar 27 20:33:06 PC systemd-sleep[217960]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 20:33:06 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 20:33:06 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 20:33:06 PC systemd[1]: Failed to start Hibernate.
Mar 27 20:33:06 PC systemd[1]: systemd-hibernate.service: Consumed 2.705s CPU time.
Mar 27 20:37:09 PC systemd[1]: Starting Hibernate...
Mar 27 20:37:09 PC systemd-sleep[218673]: Entering sleep state 'hibernate'...
Mar 27 20:37:11 PC systemd-sleep[218673]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 20:37:12 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 20:37:12 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 20:37:12 PC systemd[1]: Failed to start Hibernate.
Mar 27 20:37:12 PC systemd[1]: systemd-hibernate.service: Consumed 2.730s CPU time.
Mar 27 20:43:26 PC systemd[1]: Starting Hibernate...
Mar 27 20:43:26 PC systemd-sleep[219763]: Entering sleep state 'hibernate'...
Mar 27 20:43:28 PC systemd-sleep[219763]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 20:43:29 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 20:43:29 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 20:43:29 PC systemd[1]: Failed to start Hibernate.
Mar 27 20:43:29 PC systemd[1]: systemd-hibernate.service: Consumed 2.769s CPU time.
Mar 27 20:43:47 PC systemd[1]: Starting Hibernate...
Mar 27 20:43:47 PC systemd-sleep[220123]: Entering sleep state 'hibernate'...
Mar 27 20:43:48 PC systemd-sleep[220123]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Mar 27 20:43:49 PC systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 20:43:49 PC systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Mar 27 20:43:49 PC systemd[1]: Failed to start Hibernate.
Mar 27 20:43:49 PC systemd[1]: systemd-hibernate.service: Consumed 2.623s CPU time.
-- Boot 73f847dfdaa1432c8f1b9028d883fe78 --
Mar 27 23:02:10 PC systemd[1]: Starting Hibernate...
Mar 27 23:02:10 PC systemd-sleep[4394]: Entering sleep state 'hibernate'...
Mar 27 23:07:25 PC systemd-sleep[4394]: System returned from sleep state.
Mar 27 23:07:25 PC systemd[1]: systemd-hibernate.service: Deactivated successfully.
Mar 27 23:07:25 PC systemd[1]: Finished Hibernate.
Mar 27 23:07:25 PC systemd[1]: systemd-hibernate.service: Consumed 2.244s CPU time.
Now seeing this log I must tell that the swap size should be enough. It is 29 GB. I always set the "With hibernation" size. I have 24 GB RAM in that machine and the system hardly ever (maybe never) swapped anything. Swappiness set to very low. I have a long term routine to fix hibernation on Ubuntu machines and I have actually 3 machines with Ubuntu 22.04 and one with 24.04. All configured the same way and all capable to hibernate itself by using your extension except that exact machine.