Let's first enable hibernation. On Arch-based distros , we're going to use a script which automates setting up hibernation. Install the
hibernator package and run it as root.
Note: the hibernator script is pulled from the AUR (Arch User Repository) and is a user provided script to help in Arch hibernation setup.
You can see what this script is doing here https://github.com/Chrysostomus/hibernator/blob/master/hibernator
You'll also need an AUR helper (or to checkout the AUR hibernator package repo and install with makepkg etc.). In the example below we're using
yay -S hibernator sudo hibernator