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