Article 5CE7Y Some notes about cpu governor and scaling on an Intel Skylake laptop

Some notes about cpu governor and scaling on an Intel Skylake laptop

by
giomat
from LinuxQuestions.org on (#5CE7Y)
So one thing that always bothered me since i purchased a thinkpad x260 and put slackware -current on it is that it has always been running using the max frequency of 3ghz.
Doing some research i found out that this behavior was due to the "performance" governor being set on boot, while i thought that for laptops usually the "ondemand" one is better, because it allow the cpu cores to scale their frequencies based on the workload.
So i tried switching to "ondemand" and the option wasn't there!!! only "performance" and "powersave" options were available consulting cpufreq-info. And this is a thing that i noticed in a couple of forum threads here in LQ of people tinkering with cpu frequencies.
I tried to solve this by installing the thermald package from SBo, this on the side also required the --ignore-cpuid-check flag to start with my cpu, but it didn't help getting the governors available.

Anyway after digging for a bit, I found some recent ubuntu bug reports which led me to this kernel doc page about intel_pstates, the power states of newer Intel CPUs.
It turns out that some CPUs use this "HWP feature" that gets enabled by default. Quoting the page: "If the HWP feature has been enabled, intel_pstate relies on the processor to select P-states by itself".
So to make the kernel take full control of the CPU scaling, HWP must be disabled,
by passing the boot argument "intel_pstate=no_hwp".

After putting this in my lilo.conf and rebooting, i was greeted by a line in the boot stating something like "setting CPU governor: ondemand", so it popped up in the available governors list!! cpufreq-info now displays the full list: conservative, ondemand, userspace, powersave, performance, schedutil.
And it seems to work very fine!! CPU now idles at around 1Ghz and scales up to 3Ghz when i run intensive stuff or watch unaccelerated videos on the web.
Best thing, reported battery life is like double what it was before!! And it was already pretty impressive with 5-6 hours of light work. Now it seems to have to potential to go up to 10.

I will keep an eye for performance regressions (i expect them to be present, since CPU is not running at full speed all the time anymore), but for now it seems pretty responsive, not "sensibly" slower than before.

So this was the little quirk I bumped into when dealing with my system power management. Hope it helps someone else.latest?d=yIl2AUoC8zA latest?i=39JgVUwyHtI:TyvIg3PCB2w:F7zBnMy latest?i=39JgVUwyHtI:TyvIg3PCB2w:V_sGLiP latest?d=qj6IDK7rITs latest?i=39JgVUwyHtI:TyvIg3PCB2w:gIN9vFw39JgVUwyHtI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments