I am using full disk encryption, through LinuxPBA and sedutil (https://github.com/Drive-Trust-Alliance/sedutil). In short, at boot, a BIOS-independent piece of code requests the disk passphrase. If correct, the disk is unlocked, system reboots without powering off the disk, I can see grub, the kernel proceeds and the distro starts.
Suspension is dangerous in this scenario, it's a known limitation [1] [2]. When it happens, data gets corrupted. The bad news is that I am experiencing random suspension events quite often.
I don't need suspension but I use hibernation. Is there a way to disable suspension (without affecting hibernation)? Perhaps recompiling the kernel, or via boot options...
[1] The suspend action triggers disk power off; this means that, at resume, the FS is encrypted. Linux tries to access sectors it had mapped before which are now encrypted, corrupting data. It soon detects the problem, remounts the FS in read-only and avoids further damage. Next reboot, fsck.ext4 usually repairs the damage. But as I am experiencing random suspension, not triggered by me, hard to debug/report, I would like to disable suspension completely as I figure out the root cause.
[2] Similar questions: suggestions like this https://wiki.debian.org/Suspend#Disable_suspend_and_hibernation are not enough. Also, it appears it is not possible to tell the kernel/ACPI "please do not turn of the disk at suspension" (Is it possible not to turn off an SSD in suspend/sleep/S3?).