5

Battery charege reduction during suspend mode (~20% in 8 hours)

OS: Ubuntu 18.04 Kernel: 5.4.0-104-generic

What I've tried:

echo deep > /sys/power/mem_sleep (as root).

Output:

cat /sys/power/mem_sleep

s2idle [deep]

1 Answer 1

8

There are different modes by which a system can be suspended, which are explained in the Linux Kernel documentation. You can see the method that is in use on your system with the command

cat /sys/power/mem_sleep

Suspend to idle (s2idle) uses the most power. "User space" is frozen, and I/O devices are put in low power state.

Standby (shallow) involves suspension of some more low level functions, with more power savings.

Suspend-to-RAM (deep) offers more significant savings: essentially only the RAM is kept powered to keep RAM contents and the state of the devices and CPU stored in RAM.

Then there is hibernation, Suspend-to-disk, where the state of the system is saved in swap space on disk, and the system essentially is fully powered off. On many hardware, this does not work reliably, and therefore this mode is disabled on Ubuntu by default. It is rather complicated to enable it. While previous modes allow a system to resume quickly, the time needed to start up a system that has been suspended to disk is comparable with the time needed for a cold start.

If your system is configured for the least energy saving option, then there probably will be a good reason. The configuration of your system is defined in files under /sys/power/. You could try changing the contents of sys/power/mem_sleep to [s2idle] deep instead, to test that mode on your system.

3
  • 1
    This isn't really a very helpful answer. OP already tried what you're suggesting in the last paragraph, and it didn't work - /sys/power/mem_sleep is stubbornly not changing.
    – Joel Cross
    Mar 13, 2023 at 7:00
  • @JoelCross The answer explains there are different energy modes, one requiring more energy than another. Moreover, not all these modes may work reliably on all machines as hinted to in the answer. If you have a more specific problem, feel free to ask. This answer just comments on the question, which is more like an observation: "there is a battery drain". Yes, that is possible.
    – vanadium
    Mar 14, 2023 at 11:25
  • On my laptop (ThinkPad / Lenovo) I initially had only s2idle mode available. But then in bios, Power option I found and changed susped mode from "Windows 10" to "Linux" so "deep" mode appeared and was selected automatically. Don't think that mem_sleep file can be freely edited. It represents only available options.
    – MilanG
    Jul 13, 2023 at 6:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .