2

So, I'm having some overheating problems with an HP Envy 15 that are driving me nuts. See this and this for reference.

Anyway, I did an Ubuntu 18.04 fresh install. Also installed tlp and cpufrequtils. So, if I do tlp stat -p ...

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

[....]

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

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

Now, since I want to use a powersave governor, as per this, I get to use it.

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

[....]

/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  =  3100000 [kHz]
/sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq  =  3100000 [kHz]

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

So far, so good.

Two things do call my attention:

  1. If I do start using my laptopt again, don't know why, but from time to time, the tlp stat -p shows again that the scaling_governor=performance.
  2. Why are scaling_min_freq and scaling_max_freq equal? I'd like to reduce both of them to see if I can somehow control the overheating problem that I'm facing.

How can I avoid the performance governor? How can I tune the min and max scaling?

thanks!

Lucas

Lucas Aimaretto
  • 423
  • 6
  • 18
  • Uninstall cpufrequtils If you really need it you can install it again. I suspect it is the culprit. – WinEunuuchs2Unix Aug 29 '18 at 00:06
  • But I need cpufrequtils to set the powersave governor. If I uninstall it, how do I change the governor then? – Lucas Aimaretto Aug 29 '18 at 00:12
  • powersave is the default governor. You have to force performance on. I suspect cpufrequtils is forcing it on. It is also probably responsible for setting min equal to max. – WinEunuuchs2Unix Aug 29 '18 at 00:16
  • Ok, I've done an apt purge cpufrequtils, rebooted the laptop and after a tlp stat -p I get to see performance again: no changes at all. Doing a cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor shows performance, so it's something else doing the dirty job ... :-( – Lucas Aimaretto Aug 29 '18 at 00:22
  • Did you change anything in tlp configuration file? – WinEunuuchs2Unix Aug 29 '18 at 00:26
  • No ... it's a fresh install of ubuntu 18.04. Don't even know where the config file for tlp is. Indeed, after your comment I was looking for it to see if there is something in there ... – Lucas Aimaretto Aug 29 '18 at 00:28
  • 1
    Well I've been using tlp for years and my laptop has always been at powersave. I haven't used cpufrequtils but I guess you can reinstall it if it wasn't the culprit. Hopefully someone else has experienced the same anomaly and will comment/answer. – WinEunuuchs2Unix Aug 29 '18 at 00:29
  • After boot the CPU frequency scaling governor will be set to performance for 1 minute, then it will change to powersave. Is it possible you have been looking too soon after boot? – Doug Smythies Aug 29 '18 at 18:17

2 Answers2

3

Force to powersave speed governor

You are using sudo tlp stat -p to find out when the speed governor is set at performance mode. When this happens reset it to powersave with this command:

$ echo "powersave" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
powersave

Run tlp statistics again and ensure minimum frequency is normalized and no longer set at maximum frequency.

Keep running tlp to find out how often the governor is being reset to performance mode.

Keep searching for the program that is reseting the speed governor.

As a last resort you could:

  1. Setup a sleeping procedure to reset to powersave every x seconds.
  2. Setup a procedure that monitors the speed governor every second and reset it when it changes.
  • So, after your comment on the previous comments, I dug into the config file for tlp in /etc/default/tlp and touched some parameters. The result: now overheating has lowered a lot (a lot!) and coolers are not spinning as much as before. However, from time to time, something is reverting this configuration (powersave -> performance) and I cannot find how to change the minimum frequency. I'll post an answer showing the parameters that I've changed in tlp. – Lucas Aimaretto Aug 29 '18 at 16:03
1

This answer is for your second question:

Why are scaling_min_freq and scaling_max_freq equal? I'd like to reduce both of them to see if I can somehow control the overheating problem that I'm facing.

I don't know how they got set to the same, but something must have done it. To limit your maximum CPU frequency, when using the intel_pstate CPU frequency scaling driver, one way is (to 70% for example):

$ echo 70 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct

Example:

doug@s15:~/temp$ grep . /sys/devices/system/cpu/intel_pstate/*
/sys/devices/system/cpu/intel_pstate/max_perf_pct:100
/sys/devices/system/cpu/intel_pstate/min_perf_pct:42
/sys/devices/system/cpu/intel_pstate/no_turbo:0
/sys/devices/system/cpu/intel_pstate/num_pstates:23
/sys/devices/system/cpu/intel_pstate/status:active
/sys/devices/system/cpu/intel_pstate/turbo_pct:18
doug@s15:~/temp$ echo 70 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct
70
doug@s15:~/temp$ grep . /sys/devices/system/cpu/intel_pstate/*
/sys/devices/system/cpu/intel_pstate/max_perf_pct:70
/sys/devices/system/cpu/intel_pstate/min_perf_pct:42
/sys/devices/system/cpu/intel_pstate/no_turbo:0
/sys/devices/system/cpu/intel_pstate/num_pstates:23
/sys/devices/system/cpu/intel_pstate/status:active
/sys/devices/system/cpu/intel_pstate/turbo_pct:18
Doug Smythies
  • 15,448
  • 5
  • 44
  • 61