9

After I suspend my laptop for ~10 hours, the laptop dies with the entire battery drained. I use "cat /sys/power/mem_sleep" to check the suspend mode and it returns "[s2idle] deep". Doesn't it mean I have the advance suspend mode that drains very little power during suspension?

I tried "sudo journalctl | grep "PM: suspend" | tail -2" after I suspended and woke up the laptop. It returns

Feb 16 10:46:42 Zephyrus kernel: PM: suspend entry (s2idle)
Feb 16 10:46:53 Zephyrus kernel: PM: suspend exit

which means that it didn't go into the suspend to ram mode, instead it goes into the power-draining s2idle mode. How can I fix this? Thank you!

It's a ROG M16 with ubuntu 20.04.

EDIT: I followed this article and I can have "suspend entry (deep) " now. Whether the battery is still drained remains to be checked.

Gabriel Staples
  • 11,502
  • 14
  • 97
  • 142

2 Answers2

7

I basically followed this article and some other instructions.

First, just whether your device is in the "suspend to RAM" using:

cat /sys/power/mem_sleep

If it returns "s2idle [deep]", then it's supported. If it's not. First check whether your device supports this suspend mode, if so, run:

echo 'deep' > /sys/power/mem_sleep

and check again.

Now your device has the correct suspend mode, but it doesn't necessarily enter this mode when you suspend. To check, first suspend your device, then wake it up. Then open a terminal and run:

sudo journalctl | grep "PM: suspend" | tail -2

You can find the log of your suspension, which is something similar to below. Note that the log I attached shows that I correctly enter the "suspend to RAM" mode, in your case, it may appear "suspend entry (s2idle)" instead of "suspend entry (deep)".

$ sudo journalctl | grep "PM: suspend" | tail -2
Feb 16 21:35:05 Zephyrus kernel: PM: suspend entry (deep)
Feb 17 09:36:24 Zephyrus kernel: PM: suspend exit

If this is the case, you have to modify your bootloader. Here I use the gedit. Make sure it's installed first by:

sudo apt update
sudo apt upgrade
sudo apt install gedit

Then modify the bootloader file:

sudo -H gedit /etc/default/grub

Locate the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

in the file and replace it with:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"

To have these changes take effect you need to update the parts of GRUB that are responsible for booting by running:

sudo update-grub

and then restart your computer.

It should work now! Try to suspend and wake up your device and check the log using the command above again!

0

I think the power consumption depends on your compute hardware and system firmware. On my Gigabyte AERO laptop, the s2idle sleep consumes 3.6W, while deep sleep consumes about 2W on average.

The current implementation of Linux (up to today) is defective on deep sleep. When s2idle sleep is selected, laptop can sleep/wakeup without crashing, but power consumption is slightly higher; however, when deep sleep is selected, sleep/wakeup will crash when certain program is running (e.g., VSCode open on projects located on NFS, certain Steam game is running). Since the power save is not big, 2W vs 3.6W, it is okay to use s2idle sleep.