[Suggestion] Add support for suspend when swap is turned off, but the partition given in the kernel command line
Submitted by loc..@..il.com
Assigned to Ali Abdallah @ali
Description
Linux kernel typically has the following way to specify the "hiberfil.sys", the place to hibernate to and to wake up from: the kernel command line.
On my machine it is the following:
#:cat /proc/cmdline
BOOT_IMAGE=dev000:\EFI\Slackware\vmlinuz root=/dev/sda3 vga=normal ro quiet splash nvidia.modeset=1 resume=/dev/sda2 ro
Sometimes it would be pointing to a swap file rather than partition. (Something like resume offset= ).
This command line doesn't guarantee that swap will be on during the normal system operation. For example, I could manually do "swapoff -a". And if swap is off, XFCE would refuse to hibernate.
I would like to propose the following optional behaviour (decided by a checkbox in the settings):
If the kernel command line (/proc/cmdline) does have a "resume" member, and swap is off, first try to swapon (or swapon $swapfile), and hibernate like this, and correspondingly, swapoff after waking up.
Rationale: not always it is possible to use swap during the normal operation.
Version: 1.4.x