How many watts does a sleeping laptop draw?
Created
Modified
Published
Back in February 2023 I had a bad experience where I left my Framework laptop in my backpack and found it had gotten very hot, to the point it was unusable for a while: it refused to boot and made alarming beeping noises if I tried pressing the power button. This overheating happened despite the power settings making it go to sleep when the lid is closed and it having successfully gone to sleep with a closed lid many times before. This was on Windows 11, and I never figured out why this happened, although I suspect either a misbehaving process kept waking up the CPU or the power manager failed to actually put the machine to sleep. (To be fair this can happen on Linux, too.)
Today I’m still using that Framework laptop with a different mainboard, and as I no longer need to use Windows-only applications on a daily basis I have been using Linux instead. I am still leery of leaving a closed laptop in a bag if it’s not fully shut off or in hibernation mode. However I don’t want to become superstitious or avoid using my laptop as the mobile device it is intended to be, so I decided to investigate its actual power usage.
Specs and configuration
My Framework laptop has a relatively old Intel CPU first released September 2020:
$ lscpu | grep 'Model name' Model name: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
and the kernel is running Linux 6.17.0.
$ uname -r 6.17.0-23-generic
The available sleep states are s2idle and deep.
$ cat /sys/power/mem_sleep [s2idle] deep
Reading /sys/power/mem_sleep shows the selected status in square brackets rather than the raw value. I guess it’s to make the other options easy to switch to, which makes sense as these options vary with machine and s2idle is not especially easy to remember. The lightest sleep s2idle is the default, so I want to see what happens when I change to deep sleep. To do this temporarily, I ran
$ echo deep | sudo tee /sys/power/mem_sleep
and then closed the lid. I used
$ echo s2idle | sudo tee /sys/power/mem_sleep
to get it back to the default.
To change to deep sleep permanently, I edited /etc/default/grub and change this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to this instead:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"
then I ran /sbin/update-grub. Some distros might do this instead:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Measurement methodology
To get accurate power measurements, I had to remove the battery and run directly from the AC power adapter as otherwise the power is going to charge the battery. (Even when the battery is full it is quickly toggling between charging and discharging, so any meaningful measurements must be done without the battery.) Removing the battery is relatively easy with a Framework laptop, but to get it boot without a battery I needed to enable the “Standalone operation” setting in BIOS.
The next question is where the power measurements come from. While powerstat -R can get the power in watts directly from the kernel, this obviously can’t run while the CPU is asleep: there muse be an external measuring device. I used a USB-C power meter (ATORCH AT085) to measure power, both instantaneously and over a long time period to get an average. Using the USB-C input directly instead of measuring the wall power going to the AC-to-DC adapter is beneficial because the power adapter is not perfectly efficient and loses some power. For example, I measured 59 W at the wall when the USB-C power meter measured 52 W, so while the adapter is efficient there are some conversion losses.
Results
| Power mode | Duration [h] | Avg. power draw [W] | Max. power draw [W] |
|---|---|---|---|
| s2idle | 0.9381 | 1.90 | 3.50 |
| deep | 3.7760 | 1.53 | 2.25 |
The ATORCH AT085 has a lot of functionality in a small package but is lacking on documentation. It has only a minimal spec sheet that lists its own power consumption as <0.15 W. As long as it doesn’t include its own power consumption in the reading this doesn’t actually matter for our use-case because we’re running from AC power. What I would really like to know is the sampling frequency. The screen updates rapidly, about 0.33 seconds (10 frames of a 29.9 FPS video), so the sampling rate must be at least 3 Hz but could be faster. However the 3 Hz gives some context to the maximum power draw value, i.e. presumably there must have been at least one 0.33 s interval where the laptop pulled 3.50 W in s2idle and 2.25 W in deep sleep.
Given a perfectly efficient fully-charged 55.0 Wh internal battery, we can estimate the nominal battery life of a closed laptop based on average power draw. We can also estimate the minimum lifetime based on the maximum power draw.
| Power mode | Power draw [W] | Nominal 55 Wh battery life [h] | Min. 55 Wh battery life [h] |
|---|---|---|---|
| s2idle | 1.90 | 29.0 | 15.7 |
| deep | 1.53 | 36.0 | 24.4 |
Obviously a real battery loses capacity over time and will not last this long. A call to upower --dump suggests this battery is now 44.583 Wh instead, so let’s use that to calculate more accurately how long it might last in a backpack or unplugged overnight starting with a full charge.
| Power mode | Power draw [W] | 44.6 Wh battery life [h] | Min. 44.6 Wh battery life [h] |
|---|---|---|---|
| s2idle | 1.90 | 23.5 | 12.7 |
| deep | 1.53 | 29.1 | 19.8 |
Actual use while the desktop is active varies wildly depending on screen brightness and CPU activity, but I think 15 W is typical and 30 W is a reasonable upper bound based on turning the screen brightness all the way up and running stress --cpu 8. (I saw a momentary 44 W power draw but after the fans kicked in and thermal throttling it settled down at 27 W, so 30 W seems about right.)
| Power mode | Power draw [W] | 44.6 Wh battery life [h] |
|---|---|---|
| active | 15 | 3.0 |
| high CPU | 30 | 1.5 |
This is pretty close to Intel’s rated thermal design power (TDP) range of 12 W to 28 W, with a few extra watts for the screen and other hardware. I believe these limits (12.1 W to 28.0 W) can be read from /sys/class/powercap:
$ cat /sys/class/powercap/intel-rapl:0/constraint_0_max_power_uw 28000000 $ cat /sys/class/powercap/intel-rapl:0/constraint_2_power_limit_uw 121000000
Incidentally for a 55 Wh battery a 15 W draw gives about 3-4 hours, which is about what Framework users reported on Linux in 2021:
Ran the same “test” again in powersave mode. lasted about 3h50m, so pretty dramatic.
[ … ]
I’m getting a bit longer on a newer kernel (5.13) with tuned set up, about 5-6 hours while browsing/watching videos with Firefox.
https://community.frame.work/t/battery-life/861/21
I’m sure it’s possible to turn down the max power limits but I almost always use my laptop within easy reach of a charging cable and I want to get the most out of my CPU, so I haven’t bothered trying this.
Conclusions
Overall I was surprised that deep sleep didn’t do much: power consumption while sleeping only dropped from 1.9 W to 1.5 W. I expected more than a 24% increase in battery life with the deeper sleep setting. It’s especially underwhelming considering the major drawback of deep sleep: the wake-up time.
| Power mode | Wake time [s] |
|---|---|
| s2idle | 2.4 |
| deep | 14.4 |
I measured this by hand with a stopwatch so the timing is not precise, but the difference is so stark that even half a second of reaction time is immaterial. During wake-up, the Framework power button LED light is on, but the screen is just black so it’s kind of concerning because it seems like the machine is unresponsive.
This was a fun experiment, but I’ll be sticking with s2idle for now. There is minimal risk of the laptop overheating in a backpack as long as the power manager does its job and puts the laptop to sleep when the lid is closed. On most Thinkpads there was an LED sleep sleep indicator on the lid and a beep that would give me some piece of mind that the machine had actually gone to sleep, but unfortunately Framework laptops do not have this feature.