Linux laptop sleep states

Still work in progress. Not tested with dm-crypt.

Using GRUB, not rEFInd, but same concept theoretically applies.

Goal is for lid close = suspend, keybinding = hibernate. Ran out of time tonight.

GRUB config

/etc/default/grub

kenel parameter: resume=/dev/<swap partition>

sudo grub-mkconfig - /boot/grub/grub.cfg

mkinitcpio

add "resume" hook

sudo mkinitcpio -p linux

elogind

/etc/elogind/logind.conf

HandleLidSwitch=hibernate
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore