Hibernate is not working for me. It awakes after a few seconds

Hibernate is not working for me, as it awakes after a few seconds.

I followed this steps but it did not work - How to fix Hibernation issues on Manjaro Linux (T14 Ryzen 7 Laptop) - YouTube

1. Look in /etc/fstab and make sure the following line is there:
UUID=[UUID_of_the_swap_partition] none swap defaults 0 0


Copy the [UUID_of_the_swap_partition] before moving on to the next step.
 

2. In /etc/default/grub add: resume=UUID=[UUID_of_the_swap_partition] to GRUB_CMDLINE_LINUX


3. In /etc/mkinitcpio.conf add resume to HOOKS (after udev)


Then :x to edit out of the vim editor. 


4. Reload the configurations by running: 

sudo mkinitcpio -P && sudo update-grub


5. Hibernate and log back in to see if that fixed the problems.

I continue to research on it. But if someone can chime in with something to try or a fix, please do.

Might be related to the recent updates.

Just to be on the safe side, you did put the actual UUID in there and not the literal placeholder with the brackets?

And how large is your swap partition?

--- grub ---

GRUB_CMDLINE_LINUX="resume=UUID=32v045s7-745r-3w8u-qn65-1n46dgrt86b3"



--- mkinitcpio.conf ---

##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev resume autodetect modconf block keyboard keymap consolefont resume filesystems fsck"

swap=2GB as per: [root tip] [How To] Dual boot Manjaro and Windows

I have 64GB ram. Should i add more with gparted?
Do i need to boot a Live CD and do it with manjaro shutdown?

I followed the exact recommendations as here:

image

Hibernate is shutting the system down but saving the current state from RAM to disk, so that your session can resume.
So at least for hibernation, your swap partition must be 64 GB in size (so that in all memory can fit into it).

I guess, you didn’t plan for this, so your best choice would be not a swap partition but a swap file. (You can find the instruction in the Arch wiki.)

Dear @mithrial,

I know you are not meant to give me things on a silver spoon.
But i am worried to mess things up with something so critical.
Although I don’t want to redo all over again, my files are all backed up, so i can re-install manjaro if really needed.
In this case i should give it 64GB swap partition size, correct?

I followed the recommendations from an official Manjaro thread.

Can you please give me the pointer to the Arch wiki article explaining this?
Are you sure i can’t just increase the swap size? Isn’t the swap file not the best workaround?

It is really simple, actually:

  • hibernate saves RAM content to swap
    your RAM is 64 GB

just think of it - how is that going to fit into 2 GB of swap?
… it’s just not happening

growing your swap partition can prove difficult

Creating a swap file (of any size) is always possible.
… swap file - not swap partition …

I’d have to go look and find it - but so can you :wink:


create an appropriately sized swap file
add it to /etc/fstab
remove your current swap partition from /etc/fstab (just comment it out for now)

once all is working, you can recycle the 2 GB swap partition if you want and add the space to one adjacent partition - or just leave the 2 GB be …

2 Likes