Quick Bit: Fix Vampire Battery Drain on Linux Laptop
I recently picked up a refurbished Lenovo Thinkpad L15 from Amazon. Given this laptop is a bit older put Linux Mint on it to maximize the resources available.
The install was seamless and I didn't need to tinker or troubleshoot beyond normal post-install configuration and setup. That was until I went to use it the next morning and realized the battery was drained.
Knowing this was a refurbished laptop that was preinstalled with Windows 11 I had a hunch what it could be. Similar to my previous Quick Bit regarding Fix Intermittent Wifi on Linux (Mint) due to PowerSave this post is more of a reference for me in the event I run into this again.
To quote Gemini, "The most likely culprit is how your laptop handles sleep states. Most modern laptops default to a feature called Modern Standby (S0ix / s2idle), which keeps the CPU semi-awake to fetch updates or stay connected. Windows handles this okay-ish, but Linux hates it, causing your laptop to run hot and drain the battery while the lid is closed. Linux thrives on the traditional Deep Sleep (S3) state, where almost everything powers down entirely."
To confirm this I ran the following command:
cat /sys/power/mem_sleep
Which output: [s2idle] which confirmed that the laptop was not set to use the deep sleep S3 state. This makes sense given the laptop was configured with Windows 11 preinstalled.
To fix this I:
- Rebooted and entered the Bios
- Clicked on the Advanced tab then Power.
- Found the setting named Sleep State and changed it from "Windows" to "Legacy S3".
I ran the command again which output the following and confirmed the fix:
[s2idle],deep