2

My laptop's battery drains very quickly from time to time. I found out that it was due to the sleep mode that was set to s2idle instead of deep:

$ sudo cat /sys/power/mem_sleep
[s2idle] deep

I then use the following command to get it back into deep sleep mode:

sudo sh -c 'echo "deep" > /sys/power/mem_sleep'

However, after some time this setting is reverted to s2idle again. How can I make this change permanent?

I found this solution (sudo kernelstub -a "mem_sleep_default=deep") for Pop_OS, but I get a sudo: kernelstub: command not found.

My system:

➜ uname -a
Linux ro-XPS-13-9360 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Roald
  • 351

1 Answers1

3

You can make the change permanent as per these instructions:

  1. Edit your grub configuration: sudo nano /etc/default/grub
  2. Replace GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" with GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"
  3. Regenerate your grub configuration with sudo grub-mkconfig -o /boot/grub/grub.cfg.
Roald
  • 351