Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default CPU_ENERGY_PERF_POLICY_ON_BAT=power is too aggressive #460

Closed
fthx opened this issue Feb 2, 2020 · 8 comments
Closed

Default CPU_ENERGY_PERF_POLICY_ON_BAT=power is too aggressive #460

fthx opened this issue Feb 2, 2020 · 8 comments

Comments

@fthx
Copy link

fthx commented Feb 2, 2020

Hi,

In TLP 1.3beta4, running Ubuntu 20.04 kernel 5.4, Thinkpad T480s.

The default option CPU_ENERGY_PERF_POLICY_ON_BAT=power makes my i7 8550u cpu stay at 800 MHz. I suggest reverting to (1.2 default, right ? I don't remember that) CPU_ENERGY_PERF_POLICY_ON_BAT=balance_power.

Thanks for your work !

linrunner added a commit that referenced this issue Feb 2, 2020
Confirmed for:
* ThinkPad T480s, i7 8550U, Linux 5.4
* ThinkPad X1C6,  i7 8550U, Linux 5.5

Solution: change default to balance_power.

Reference:
* #460
@linrunner
Copy link
Owner

Fixed. Thanks.

@LinuxOnTheDesktop
Copy link

I do not think that my TLP 1.2 config even had a CPU_ENERGY_PERF_POLICY_ON_BAT. It did have a CPU_HWP_ON_BAT. I've made the necessary adjustments.

@linrunner
Copy link
Owner

It's explained in the changelog:

Processor:
- CPU_ENERGY_PERF_POLICY_ON_AC/BAT: backward compatible merge of
settings for Intel energy vs. performance policies
EPB (ENERGY_PERF_POLICY_ON_AC/BAT) and HWP.EPP (CPU_HWP_ON_AC/BAT);

1.2.2 had CPU_HWP_ON_BAT=balance_power

@linrunner
Copy link
Owner

note @self: FAQ?

@The-First-King
Copy link

There is a mistake in documentation at page: https://linrunner.de/en/tlp/docs/tlp-configuration.html#scaling

Hints:

  • Requires Intel Core i Gen. 5 (Skylake) or newer CPU and the intel_pstate scaling driver

On the i7-4510U processor i.e. Gen. 4 min/max P-states are working great the same as "turbo boost".

I didn't see e-mail for a feedback and post it here. Thanks!

@linrunner
Copy link
Owner

linrunner commented Feb 13, 2020

@The-First-King : the restriction to Gen. 5 refers to CPU_ENERGY_PERF_POLICY and CPU_HWP (e.g. HWP.EPP or EPB features) not to CPU_MIN/MAX_PERF and CPU_BOOST. May I see the output of

tlp-stat -p

please.

@The-First-King
Copy link

--- TLP 1.1 --------------------------------------------

+++ Processor
CPU model      = Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq  =  1900000 [kHz]

/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu1/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq  =  1900000 [kHz]

/sys/devices/system/cpu/cpu2/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu2/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq  =  1900000 [kHz]

/sys/devices/system/cpu/cpu3/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu3/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq  =  1900000 [kHz]

/sys/devices/system/cpu/intel_pstate/min_perf_pct      =  25 [%]
/sys/devices/system/cpu/intel_pstate/max_perf_pct      =  30 [%]
/sys/devices/system/cpu/intel_pstate/no_turbo          =   1
/sys/devices/system/cpu/intel_pstate/turbo_pct         =  50 [%]
/sys/devices/system/cpu/intel_pstate/num_pstates       =  24

x86_energy_perf_policy: program not installed.

/sys/module/workqueue/parameters/power_efficient       = Y
/proc/sys/kernel/nmi_watchdog                          = 0

+++ Undervolting
PHC kernel not available.

On battery - text reading

$ lscpu | grep MHz
CPU MHz:             988.219
CPU max MHz:         3100,0000
CPU min MHz:         800,0000

On battery - 720p video at youtube

$ lscpu | grep MHz
CPU MHz:             997.623
CPU max MHz:         3100,0000
CPU min MHz:         800,0000

@linrunner
Copy link
Owner

Better late than never: I see no evidence for your claim in the outputs. HWP.EPP would look like (TLP 1.3):

/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference = balance_performance [HWP.EPP]
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power

linrunner added a commit that referenced this issue Nov 17, 2020
Rationale: ENERGY_PERF_POLICY="power" in legacy configurations
from 1.1 (or older) may cause performance issues when applied to HWP.EPP.

Solution: remove compatibility with ENERGY_PERF_POLICY_ON_AC/BAT.

Bonus: implement CPU_HWP_ON_AC/BAT compatibility with /renaming/.

Reference:
* #460
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants