I have an occasional hibernate issue with my laptop, specifically under the ‘SuspendThenHibernate’ setting, it fails to work on my Manjaro Gnome (under Wayland) installation on my Dell XPS. Most of the time, it works without issues…however recently (after the last update), it fails to hibernate properly. Even when I execute:
systemctl hibernate
The laptop will act like it is going to hibernate (screen goes dark), and then a few seconds later I am back at my login screen (GDM). If I restart my machine, and then try to execute the hibernate command again, it will work correctly without issue.
So, I am trying to troubleshoot this issue properly. Is there any log files or anything I can check to see why my machine FAILS to hibernate? As I said, I know I can perform a restart and I’m back in a good working state, but I want to see if I can solve this issue permanently.
If I can provide any additional information to assist in the troubleshooting process, please let me know. Thank you in advance for all of your time and help, it is greatly appreciated!
Grabbed my journalctl log, it definitely lists a few things around failed hibernation:
Output:
Feb 17 06:32:03 aahmad-xps systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Feb 17 06:32:02 aahmad-xps rtkit-daemon[727]: Successfully demoted thread 1015 of process 1005.
Feb 17 06:32:03 aahmad-xps systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Feb 17 06:32:02 aahmad-xps rtkit-daemon[727]: Successfully demoted thread 1005 of process 1005.
Feb 17 06:32:03 aahmad-xps systemd[1]: Failed to start Hibernate.
Feb 17 06:32:02 aahmad-xps rtkit-daemon[727]: Successfully demoted thread 1014 of process 1003.
Feb 17 06:32:03 aahmad-xps systemd[1]: Dependency failed for System Hibernation.
Feb 17 06:32:02 aahmad-xps rtkit-daemon[727]: Successfully demoted thread 1003 of process 1003.
Feb 17 06:32:03 aahmad-xps systemd[1]: hibernate.target: Job hibernate.target/start failed with result 'dependency'.
Feb 17 06:32:02 aahmad-xps rtkit-daemon[727]: Demoted 5 threads.
Feb 17 06:32:03 aahmad-xps systemd[1]: systemd-hibernate.service: Consumed 7.123s CPU time.
may you tell us a more detailed information. what dell xps for example ? please read the link and provide as minimum the requested basic infos. it’s a blame-game without them
Welcome to Manjaro!
Please read this: [HowTo] Provide System Information
and press the three dots … below your post and press the to give us more information so we can see what’s really going on.
Now we know the symptom of the disease, but we need some more probing to know where the origin lies…
An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information for us to be able to help you. (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)
Also, please copy-paste that output in-between 3 backticks ``` at the beginning and end of the code/text.
there are some useful links to your laptop that might help but will give you more information to your laptop. if you read them, there is support from dell and some hints. it’s important to update your firmware to the latest as described at the forum-links and the dell-support site.
Thank you @Olli, I appreciate the basic troubleshooting + Dell links for my specific laptop. I have updated my firmware / BIOS to the latest version, and have been running this specific instance (installation) of Manjaro for over a year now. I do not believe this is a Dell driver issue, since it is NOT consistent, and the problem fixes itself on a fresh boot (I am able to hibernate successfully).
Since this is an intermittent issue, and there are several ‘hibernate failed’ messages in the Journalctl log snippet I pasted above, I believe the ‘root-cause’ of the issue is there. I am trying to parse through it now and see what I can identify.
If you have any other ideas or need additional information / logs, please let me know. Thanks @Olli !
‘SuspendThenHibernate’ setting, it fails to work on my Manjaro Gnome (under Wayland) installation on my Dell XPS. Most of the time, it works without issues…however recently (after the last update), it fails to hibernate properly. Even when I execute:
Memory:
RAM: total: 7.63 GiB used: 4.34 GiB (56.9%)
Swap:
Kernel: swappiness: 10 (default 60) cache-pressure: 75 (default 100)
ID-1: swap-1 type: partition size: 3.84 GiB used: 2.03 GiB (52.8%)
Is it possible that your ratio of used RAM and needed SWAP is too close. If you check the payload it could be critical in some situations that hibernation is not able, because there is not enough swap-space. in this case hibernation disrupts and stop the hibernation process. that would explain that hibernation doesn’t work only in some situations (when ratio of needed swap to used Ram is too close)
Just a thought, you are using nvme’s and by the fact that the lifetime of them is limited by the write-cycles i would not recommend hibernation and recommend to use the sleep (suspend to RAM) option instead.
It looks like I am only using 10.39GB (13.3%) out of 78GB currently allocated. Similarly with the ‘raw-size’ partition it looks like I am only using 26% of the total space.
Possible SolutIon:
Currently, my swap partition is 3.84GB and as you correctly stated, it appears that is too small and there is not enough space to hibernate successfully (also explains why it works on a fresh boot when the swap partition is relatively fresh and empty). Is an easy way to fix the issue to increase the swap partition by reallocating some of the free GBs that I have from my home directory?
Follow-up Question:
If “stealing” some of my free GBs from my home partition is a valid solution, the next question is in terms of sizing. How large should I make the swap partition? 8GB total size (currently 3.84GB in total size) a good starting point?
Thanks @ishaan2479 and @olli, I super appreciate the help so far!
as already mentioned, the lifetime of the nvme’s is limited of their write-cycles. by using hibernation the lifetime of them drops down. the ram is powered even in hibernation/sleep. it’s a lot more effective to setup the sleep-mode (Suspend to RAM). in this case your nvme’s will be thankful and last much longer.
well, why are you still using a swap-partition ? this is a ancient way, nowadays there’s the possibility to use a swapfile and you don’t have to think over size of swap. https://wiki.archlinux.org/title/Swap#Swap_file
@A4orce84 If you want to increase the swap partition you can boot with a live usb and use a tool like gparted or kde disk manager to do so. As suggested above you can also create a swapfile as that is way easier than playing with partitions. Also see Swap - Manjaro.
Thanks everyone. I was able to increase my swap size by allocating some more GBs to it after shrinking my home partition slightly. I will give a swapfile a try the next time I do a full re-install of my system.
For now, a quick 5-minute partition change (to properly fix the issue in terms of space) was a lot easier to me to get things working properly again.
Thanks again @ishaan2479 and @Olli, I’ll do some reading regarding swapfiles and see how to set it up in the future.