![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
A reader in Another Place asked something incisive:
> Does hibernation work with swapspace but without zRam?
I was compelled to answer:
That is a really good question. I don't know. I will try it and report back.
OK, after a little more experimentation, the quick answer is "no".
The longer answer:
Hoping that, in the immortal words of the Haynes manuals for many a vehicle, "assembly is the reverse of disassembly", I tried to uninstall zRam by just doing `apt-get remove zram-config`.
This didn't work. At the moment I did it, the extra swap space disappeared - I was watching the output of `top` in an xterm - but on reboot it reappeared.
Some Googling suggested an entry in /etc/init.d. There wasn't one. But I did find a config file, zram-config, in /etc/init/config. I removed that, rebooted, and zRam was gone.
Now, the system has just the slightly-under 0.5GB of swap currently provided by `swapspace`. (This does not seem to have shrunk, oddly, after quitting all my memory-hogging tasks and rebooting.)
However, as the VM now has less swap than RAM, it won't hibernate any more. Attempting results in the screen going black, then immediately resuming.
My conclusion is that the demand-based swap files provided by `swapspace` - being normally less than the amount of system RAM unless under heavy load - are insufficient for hibernation support and the system is not "smart" enough to quickly grow the swapfiles to the required size when hibernating.
Shame, but hibernation is not something I use on desktops, and my desktop machines these days all have lots of RAM as it's quite cheap now. (And they usually have multiple DIMM slots.)
Notebooks have less RAM expansion, the RAM is dearer, and hibernation is often useful on them, thus they have more use for permanent swap partitions and less need for swapspace.
I might make it my default config from now on for desktops, though.