Hi, does the framework laptop support deep sleep on linux? Specifically, would someone at framework be willing to run cat /sys/power/mem_sleep on a framework laptop running linux?
Ideally, the output will be s2idle [deep], indicating that deep sleep is available and enabled. On a Dell XPS 9310, which uses the same intel 11th gen CPU platform, I get [s2idle], which indicates that only the battery-draining idle mode is available.
For those interested running linux on a framework laptop, it will be important that leaving the laptop unplugged overnight wonāt result in an empty battery in the morning.
Whether it does or not, there is still hibernation. I know it is a pain to get working under Linux, but it does. (Ubuntu 20.04 on my laptop hibernates all the time. (encrypted))
I still donāt understand why Linux distros arbitrarily dropped hibernation support from the default configurations. Probably because Luks is a freaking mess, but I digress.
On Ubuntu 20.04 running 5.11
$ cat /sys/power/mem_sleep
[s2idle] deep
Tigerlake does not support S3 sleep.
However Anecdotally battery drain is around 40% over about a 20 hour period in S0ix when I run Ubuntu. Not great but not the end of the world if you plug in once a day.
Windows deals with this by hibernating as part of modern standby.
Thatās about 2% per hour (1.1W), which is unfortunate to say the least (assuming that drain is linearā¦, 0.02/h * 55Wh = 1.1W).
However, digging into this a little, it looks highly dependent on configuration, bios, kernel, firmware, etc.
The X1 Nano (also Tigerlake but with an even smaller battery) has a thread on this (English Community-Lenovo Community). OP, is seeing 5% (2.4W) power drain, staff sees 0.8% (0.4W) power drain (the nano has a 48Wh battery).
So, pulling random ideas out of a hat because Iām way out of my depth hereā¦ explicitly powering down USB/networking devices (possibly powering down the SSD?) before suspending may help? At the very least, it looks like there may be room for improvement in software.
How baffling and frustrating: itās like Intel wants people to use ARM Macs, despite the Macsā inadequate repairability. So weāre stuck between choosing what should be a simple and straightforward feature, in the form of functional sleep/hibernate that doesnāt impose a serious battery drain, and a laptop that can be repaired.
To be more accurate, you can force the activation of S2idle deep sleep on Linux, BUT the hardware does directly support it. This means while the laptop appears to be sleeping, and āisā Iāve observed it using ridiculous amounts of power. Something like 15% in a 5 hour period.
As the Mandolorian say, hibernation is the way. At least for now.
s2idle and deep are different things. s2idle is the ālightā sleep, deep is the power-saving one.
How did you determine that the hardware doesnāt support deep sleep? When I enable deep sleep (which the hardware at least claims to support), resumption takes significantly longer so something is happening.
I have it enabled on mine, but I have no way of knowing if it is in fact using deep sleep or not. Mine is not taking long to resume from sleep at all. Near instant.
Edit: I have verified using the below command that deep is reported. What I mean is that I have no way of knowing when I close the lid that deep sleep has actually been entered.
@Kevin_Wilson In theory, echo deep | sudo tee /sys/power/mem_sleep will switch to ādeepā sleep. But @2disbetter is right that the laptop is still drawing power (I havenāt tested how much of a difference it makes).
Iām not sure of the context so I just want to possibly clarify the meaning of that output. It means that s2idle is enabled, and deep is not. These two posts may be helpful:
hey there guys iįøæ running the framework laptop on Ubuntu 21.04 and so far so good the only problem iāve had is Deep Sleep: I have enabled and had to disable deep sleep about 3 times now, whenever i enable it and go to sleep the laptop just freezes and i can do nothing, i need to power off, reboot, and rollback the change, else it freezes again. any clues?
These numbers are very unscientific but I use Solus with the 5.14 kernel and deep sleep works for me.
The battery drain when in sleep mode however, is not very good. I did a few tests when I was asleep where Iād charge fully and put the laptop to sleep in both s2idle and deep sleep. Deep sleep drained about 35% of the battery in 7 hours where s2idle usually either died or had only 10% battery or so remaining.
s2idle also came with the issue of the system no entering the higher idle states such as c8-c10 whenever it woke up where only a reboot seems to fix it. Deep sleep didnāt have that issue.