I made the big mistake of “hibernating” my Kubuntu laptop.
Didn’t notice any problems (well, other than the fact that it completely failed to work and spewed out error messages all over the place), but today the performance seemed groaningly bad. I didn’t put 2-and-2 together at that point, and played with a bunch of different options to try to figure out why things seemed markedly slower than usual.
Mid afternoon, and things went bad to worse. A couple of crashes.
I -never- have crashes…
That’s for Windows people!
Finally the laptop wouldn’t start up at all. Got part-way into the boot process before falling over in a quivering heap.
Tried booting with the Kubuntu Live CD — even that crashed.
Which really got me worried: Visions of catastrophic hardware failures. Flaming CPU’s in the distance. Motherboards weeping over broken RAM modules.
A bit of investigation finally uncovered swap as the probably cause of the problem. This bug report was very helpful. I think the Live CD failure was unrelated (possibly media failure).
A recovery mode boot managed to get me to a prompt where I could try to reformat (mkswap) and remount (swapon -va) swap. Rather than using UUID, I changed fstab to use the device (/dev/hda2) instead, as suggested here. That seemed to briefly fix the problem — but only briefly. Shortly afterwards, another crash.
For a few moments, entertained the thought of casting borked laptop off the top of the building. Feel deep sympathy for the guy in that video which went round in the late 90’s — the one who attacked his computer with the keyboard…
Brainwave while walking home from work. Boot with Knoppix (thank [your-deity-here] for Knoppix). Wiped swap clean with dd if=/dev/zero of=/dev/hda2 (where /dev/hda2 is my swap partition), then reformated using mkswap. Rebooted, and things seem to be back to normal.
I don’t know why mkswap on its own didn’t fix the problem, but it appears a full wipe has made the difference.
What a waste of an afternoon.