Improving battery life, TLP and Intel pstate

UDEV in SUBSYTEM=power_supply shows various event, even usbc connect and disconnect.

So maybe it would be better if 90-on-battery.rules would monitor AC Mains not battery charged.
Your syslog shows that after successful setting parameters for AC it sets parameters for Battery at the end.

Another thing - with my test’s and some article on APM/ACPI it’s not too good to force CPU to low frequency because when it can’t bump frequency to do the job it stays longer in high power state and consume more energy.
Also forcing cpu to more higher power state with U intel cpu’s force TDP throttle too.
So, it’s best to do max frequency with balanced mode and for battery limit frequency to base frequency (2500MHz) and do little bit low power states bump:

So those are new best UDEV rules to use
/etc/udev/rules.d/90-on-ac.rules

SUBSYSTEM=="power_supply", \
   ENV{POWER_SUPPLY_TYPE}=="Mains", \
   ENV{POWER_SUPPLY_ONLINE}=="1", \
   RUN+="/usr/sbin/xenpm set-cpufreq-hwp min:1 max:255 energy-perf:128"

/etc/udev/rules.d/90-on-battery.rules

SUBSYSTEM=="power_supply", \
   ENV{POWER_SUPPLY_TYPE}=="Mains", \
   ENV{POWER_SUPPLY_ONLINE}=="0", \
   RUN+="/usr/sbin/xenpm set-cpufreq-hwp min:1 max:25 energy-perf:160"
2 Likes