I’m pretty happy with 8 hours battery life I’m getting out of my Lenovo T15 (Intel 10 Gen) laptop. Only problem that I’m getting 8 hours only when I’m not running MS Teams. For some reason it force “powersafe” governor to keep CPU clocks above 2GHz. At same time CPU utilisation is bellow 5%. Running CPU on higher clocks considerably reduces battery time. I can see 3 ways
- Use cgroup and do something with teams ( no sure what ) to prevent it from pushing CPU. Running Teams with nice does not help
- Use custom userspace governor. I may go that way one day.
- Just cap CPU clock globally using cpupower
Laptop is perfectly responsible with CPU capped to 1GHz. So I create udev rule to limit CPU to 1GHz when on battery and to lift limit when plugged to power.
Creating /etc/udev/rules.d/powersave.rules with content bellow did trick for me
# changing max CPU clock when run on battery
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/usr/bin/cpupower frequency-set --max 1Gh"
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/usr/bin/cpupower frequency-set --max 5Gh"
Credit goes to some guys in stackexchange, but unfortunately I lost the link to that post.