You're welcome, @coffeeguy,
S2disk works perfectly, but I have a couple remaining issues. The hibernate option is still on the shutdown dialog box; can it be reprogrammed to call s2disk?
Like I wrote on my previous post, I don't know how to fix that and failed to do so on my own Linux Mint installations. I would like to but I just can't help you our on this one, sorry.
Maybe if you open your own topic about this someone who knows better than I do can help you out. Please post the link for it here so I can also follow it as I'm also interested on this. Thanks!
Also, what is optimal for the swap file? Since it's not being used for hibernation, I assume it can be smaller.
More info here:
viewtopic.php?t=297353
I come from the Microsoft world (and dropped it) and there the rule of thumb would be to have a swap 1,5 times your RAM.
It all depends on how much RAM do you have on your system, how much RAM do you need on your daily driving and how much RAM do you need peak usage - and here I would consider hibernating.
Do you have a slow but lasting spinning HDD or a faster but wearable SSD or NVME (specially if it is soldered onboard and therefore irreplaceable)?
The thing with hibernation is a
black or white thing: Either you don't use it at all, or if you want to use it ever you need to satisfy its swap needs in order for it not to fail on you, rendering it useless with potential data loss.
The thing with RAM is we should have enough of it for our regular usage. But if you can't afford, can't add to the hardware or simply don't want to, swapping may become an inevitability.
I'll present you with my 3 use cases:
1) This PC. It has 6GB of available RAM with an onboard NMVE I don't want to wear out with swapping.
Hibernation is disabled, no virtual machines here but Firefox is caching to RAM.
I have ZRAM installed (more on it later) and swappiness configured to zero (I do it in all my installations, more on it later) with a 512MB swap in compressed RAM.
2) Another laptop with 8GB of RAM with an old slow cheap Chinese 64GB SSD (but fast enough for Linux!) and a spinning HDD for VMs and a 4.3GB swap.
It uses s2disk and it compresses swap while hibernating (I don't know if the regular method for hibernating does it but I don't think so because it is slower, I assume it writes more to the disk so it takes more time). If I want to hibernate, I must be sure loaded RAM can't go above it or it may fail on me.
I believe it has ZRAM on it too with it's swap having priority, meaning it only swaps to the HDD after the ZRAM swap is full.
3) An old desktop computer with 2GB of RAM, with MATE installed and stuffed with 7 old 320GB HDDs for a Samba server. (I just love the sound of that
rattle snake nest!
)
It has ZRAM and HDD swap (can't remember values). But when I ran tests I got impressed and amazed that I could not bring that system to a halt by opening a megaton of programs at the same time. Sure it stuttered a little bit but for a 2 thread CPU and just 2GB of RAM that system can actually be perfectly usable for some regular everyday usage if I ever need it! (gooooood luck using Windows there!)
So as you can see, it depends on how much RAM you have and what is the purpose and use of that PC, there's no quick answer for you particular use and case.
Unless this is your production machine you need to work every day,
make a backup and do it like in the old times with car toys: learn by breaking them!
Have a bootable USB ISO at hand as it can be always useful.
There's not much to break here, worst chances you change some power button function on hibernation (like in your 1st question) in a way you can't revert back (like in my case), or fail to hibernate due to a bad configuration or insufficient swap (and lose unsaved data).
Don't forget to make a backup copy of every single configuration file you'll be editing, just in case.
So quick explanations:
Swappiness. It's the load at which the OS decides when to start swapping. On servers it should be earlier than in desktops and Ubuntu and it's derivatives (like Mint) according to some, starts swapping too soon, specially if you have a lot of RAM.
More here:
https://www.howtoforge.com/tutorial/linux-swappiness/
ZRAM. It's a compressed swap that is located on your RAM, faster than anything else, at the expense of some CPU use for compression / deflation (it can use all cores). It can be used along with swapping to a HDD / SSD and configured to use ZRAM first until it is full.
It seems contradictory but using some RAM to compress swapping can in fact improve performance, like in my own 2GB RAM Samba server. How much RAM should you dedicate to it? There again, your own case, your own needs, your own tests...
More here:
viewtopic.php?t=301915
viewtopic.php?t=335132
viewtopic.php?t=322567
viewtopic.php?t=331447
There again, if you need more help on your specific case after reading the links above (for keeping on-topic sake), you can open your own new topic and post the link here so we can follow and chime in.