Sorry. I first understood, that you had a proper file as a swap file. However I now see that you are using a swap partition.
I think for hibernation a swap file is easier to install. You could follow this HowTo:
https://ubuntuforums.org/showthread.php?t=1042946
In what follows I try to explain how to increase the swap partition and use it for hibernation. But this process is more dangerous and you should be prepared to lose all you data. (Backup!)
First I have to say, that I could not figure out how to get initramfs to generate initial ramdisks that can resume from hibernation. Therefore, I switched from the default tool initramfs to dracut.
sudo apt install dracut
To configure dracut for hibernation add the file dracut.conf
and add the following lines:
add_dracutmodules=" resume "
add_device+=" /dev/mapper/vgubuntu-swap_1 "
Install the new initial ram disk:
sudo dracut -f
Now let’s deal with the logical volumes on the encrypted LVM.
The problem is, that the logical volume with the root partition has to be decreased to get space for the swap partition. This cannot be done as long as the root partition is active. Therefore we have to boot into a system that uses a different root partition. The Ubuntu installation ISO is well suited for this purpose. So boot from the Ubuntu installation ISO. Select «Try Ubuntu». After the desktop has appeared, click on the disk symbol with the lock at the left edge of the screen. You should be prompted for the password of your encrypted partition. Enter it. Then use the terminal to change the sizes of the logical volumes like this:
sudo lvresize -L-5G -r /dev/mapper/vgubuntu-root
sudo lvresize -l100%FREE /dev/mapper/vgubuntu-swap_1
sudo mkswap /dev/mapper/vgubuntu-swap_1
Adapt the size by which the root partition is decreased (5G in the example) to your needs. You also can enter it with other units, for example in megabytes with the M suffix.
Note, the -r is important. Without it the file system size remains unchanged and decreasing the logical volume would cut off a part leaving you with a corrupted file system.
After removing the installation ISO and rebooting, you should be able to start hibernation with this command:
sudo systemctl hibernate
It depends on which desktop environment you are using, how you can configure a more convenient way for this.