I am using Manjaro, and out of the box hibernation was not working, so I made some changes to fstab, mkinitcpio and grub and it worked but after sometime it doesn't hibernate and instead locks the screen, even though after a restart it works fine and yes I have made the swap twice the size of my RAM. Please help I couldn't find this exact question anywhere online.
-
What are the changes you made to the files that you mention, that made it work?Kusalananda– Kusalananda ♦2021-07-25 10:14:00 +00:00Commented Jul 25, 2021 at 10:14
-
In /etc/fstab added: UUID=[UUID_of_the_swap_partition] none swap defaults 0 0 In /etc/default/grub added: resume=UUID=[UUID_of_the_swap_partition] to GRUB_CMDLINE_LINUX In /etc/mkinitcpio.conf added: resume to HOOKS (after udev) sudo mkinitcpio -P && sudo update-grubAnthony Stark– Anthony Stark2021-07-27 19:53:32 +00:00Commented Jul 27, 2021 at 19:53
-
You may want to add that to the question instead, as a clarification, using the formatting tools provided to make it readable.Kusalananda– Kusalananda ♦2021-07-27 19:55:19 +00:00Commented Jul 27, 2021 at 19:55
Add a comment
|
1 Answer
How you can fix it...
sudo swapoff -a
sudo /sbin/mkswap /dev/sd##(swap)
sudo swapon -a
In /etc/fstab add:
UUID=[UUID_of_the_swap_partition] none swap defaults 0 0
In /etc/default/grub add:
resume=UUID=[UUID_of_the_swap_partition] to GRUB_CMDLINE_LINUX
In /etc/mkinitcpio.conf add:
resume to HOOKS (after udev) sudo mkinitcpio -P && sudo update-grub