Prevent battery drain during suspend mode on Linux

Published on Author admin
cat /sys/power/mem_sleep

will return "s2idle" and "deep" values, value surrounded by square brackets will show which mode is currently activated.

Probably when you observer battery drain during suspend, you will see "s2idle" highlighted.

To change it do deep sleep mode use command:

echo deep > /sys/power/mem_sleep

To make change permanent add the following to your kernel cmdline in your bootloader, edit /etc/default/grub file and put mem_sleep_default=deep parameter at the end of line containing GRUB_CMDLINE_LINUX string.

mem_sleep_default=deep

Next thing is to rebuild GRUB2 config file.
For BIOS computers:

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

For UEFI computers:

sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

After reboot again verify using:

cat /sys/power/mem_sleep

For more information about System Sleep States please visit https://docs.kernel.org/admin-guide/pm/sleep-states.html