Tuning Power Consumption on FreeBSD Laptops and Intel Speed Shift (6th Gen and L...
source link: https://www.neelc.org/posts/freebsd-speed-shift-laptop/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Tuning Power Consumption on FreeBSD Laptops and Intel Speed Shift (6th Gen and Later)
Oct 21, 2021
When running FreeBSD on laptops with a 6th Gen (Skylake) or later Intel CPU, for me these are HP Spectre x360s (sorry, I’m not a ThinkPad fan), one annoyance with the out of the box FreeBSD configuration is the fact that the fan is running most of the time.
In comparison, a HP Envy with an AMD Ryzen does not have this issue with an out-of-the-box FreeBSD.
One thing that Intel has done with these modern CPUs is include a technology called Speed Shift. While Windows and Linux may have configurations that automatically optimize for computers with batteries or without, FreeBSD’s default Speed Shift configuration is more optimized for computers without a battery. Meaning it attempts a “balance” between “performance” and “power consumption”, but this also means the Spectre’s fan is always running.
Fortunately, this can be tuned, as per the
hwpstate_intel
man page.
In short, what you need is this in your /etc/sysctl.conf
:
dev.hwpstate_intel.0.epp=100
dev.hwpstate_intel.1.epp=100
...
dev.hwpstate_intel.N.epp=100
Where N
is the number of threads minus one.
In case you were wondering, the 100
is actually a value between 0
(best
performance) or 100
(most power savings). The default is 50
which attempts
a balance, but I set it to 100
for laptops.
For me, I have a 4-core, 8-thread Intel Core i7-1165G7 in my Spectre x360 14",
and the respective /etc/sysctl.conf
entry is:
dev.hwpstate_intel.0.epp=100
dev.hwpstate_intel.1.epp=100
dev.hwpstate_intel.2.epp=100
dev.hwpstate_intel.3.epp=100
dev.hwpstate_intel.4.epp=100
dev.hwpstate_intel.5.epp=100
dev.hwpstate_intel.6.epp=100
dev.hwpstate_intel.7.epp=100
You can either “reboot” (easier for me), or do sysctl dev.hwpstate_intel.0-N.epp=100
manually if you want it done right away.
And enjoy the fan not running all the time! The fan will still run, but less frequently than it did earlier.
Recommend
-
9
Apple Silicon M1 Power Consumption Deep Dive Part 1: Safari vs Chrome April 2, 2021 · 8 min · Kay Singh Subscribe to stay in touch with the latest updates
-
3
Interview with Intel’s Dan Ragland, Head of Overclocking The topic of overclocking has been an interesting one to track over the years. Over a decade ago, when dealing with 2-4 core processors, an effective overclock gave a substantia...
-
8
Linux性能调优之用电调优(Power Usage Tuning) 傍晚时分,你坐在屋檐下,看着天慢慢地黑下去,心里寂寞而凄凉,感到自己的生命被剥夺了。当时我是个年轻人,但我害怕这样生活下去,衰老下去。在我看来,这是比死亡更可怕的事。——–王小波
-
2
arc fault — Intel details sort-of-annoying fix for high idle power consumption in Arc GPUs One of several teething issues for Intel's first stab at a dedicated GPU....
-
7
Intel posts advisory for high power consumption with idle Intel Arc GPUs...
-
4
Performance Tuning Table Visuals With Filters Applied In Power BI Do you have a Power BI report with a table or a matrix on it, where there is a filter on the rows of the table? It’s a very co...
-
6
-
8
New Intel Linux Graphics Driver Patches Allow Tuning For Up To 10~15% Better Performance Written by Michael Larabel in
-
5
-
5
Intel Graphics With Linux 6.6 Adds Tuning Knobs That Can Yield 10~15% Better Performance Written by Michael Larabel in
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK