top | item 24856880

Linux Developers Discussing Possible Kernel Driver for Intel CPU Undervolting

144 points| varbhat | 5 years ago |phoronix.com | reply

76 comments

order
[+] errantspark|5 years ago|reply
Undervolting can work WONDERS. Especially if you get lucky with binning. I'm running the i7 in my little 13" convertible with a ~140mV undervolt, which is the difference between unplayable and 90 pegged in DCS and War Thunder (flight sims) in VR (w/ eGPU). It's also almost an extra hour of battery life when I'm just browsing the internet or whatnot.
[+] sleavey|5 years ago|reply
Wait, undervolting improves game performance for you?
[+] necheffa|5 years ago|reply
I replaced the thermal paste on my laptop and no longer thermal throttle. Didn't even get fancy with exotics, just regular Arctic MX-4.
[+] dataflow|5 years ago|reply
Did you use "lucky" here sarcastically, or do you actually need to be lucky with binning to be able to undervolt without issues? (I thought that was a concern with overclocking?)
[+] Maken|5 years ago|reply
Extra battery life would be nice. It has always been a problem with Linux on laptops.
[+] usr1106|5 years ago|reply
> There is a need for documentation concerning the relevant MSR(s) and thus waiting on Intel engineers to find such documentation internally and see if/what can be publicly released. Hopefully Intel's large open-source team will be able to provide some fruits soon

Well, i915 is certainly a completely different story than nouveau. Otherwise I would not be so optimistic. From the anecdotal evidence of listening to less than a handful of Intel colleagues I happen to have my hopes are not that high. According to them Intel is a horrible organization where high walls and secrecy making is more common than helping another part of the organization.

[+] danuker|5 years ago|reply
Believe it or not, reducing your temperatures by 10 degrees Celsius would increase the life of your CPU by roughly [79%](https://danuker.go.ro/caring-for-your-hardware.html).

Perhaps this digs into sales of new chips, which is why it's so hard to do.

I made a different sacrifice - that of frequency. I vastly reduce temperature cycling by [disabling TurboBoost](https://wiki.archlinux.org/index.php/CPU_frequency_scaling#D...) and the absolute temperature by using the "powersave" governor.

[+] acd|5 years ago|reply
I think undervolting is good for the environment to lower the carbon footprint of CPUs. Some never multicore CPUs has TDP of +100W, it would probably be much better if we lowered the voltage and frequency for a small CPU performance hit. Thankful to the developers of the driver!

"The dynamic power consumed by a CPU is approximately proportional to the CPU frequency, and to the square of the CPU voltage:" https://en.wikipedia.org/wiki/CPU_power_dissipation

ps. You can also undervolt, lower frequency of AMD CPUs.

[+] bserge|5 years ago|reply
Not on newer processors, at least Intel, due to TurboBoost.

Undervolting lowers voltage, but the processor will now stay at higher clocks for a longer time, hitting the same TDP/power limits.

You'd need to undervolt and either reduce Turbo Power Limit or cap the clocks at something lower.

[+] nspattak|5 years ago|reply
I haven't made any estimates to how much energy is wasted like this but I "feel" that it is negligible. Max power consumption will not change in power demanding cases as cpu will still throttle up to the TDP limits. I think it will only consume less power when idling but I think that this is in the range of Watts.
[+] ohazi|5 years ago|reply
Do people who like to play with the voltage and clock speed settings of their CPU/GPU/memory typically do so with one of these utilities? Or in the EFI/BIOS config pages?

I've never done this, but lately it sounds like there's sometimes quite a lot left on the table, even after part binning. Performance is so high now that I wouldn't bother doing this for an extra 5-10%, but for an extra hour of battery life, it's certainly tempting...

[+] powersnail|5 years ago|reply
I've tried undervolting, which did very little for my desktop, but prolonged the battery life and reduce heat noticeably for my Surface Pro. Especially since the Surface was fan-less, the reduction in heat actually helps with performance as well. The only quirk is the BIOS of Surface provides no such options and I have to use intel extreme tuning utility, which crashes sometimes.

If Linux gets undervolting support, that will help a bunch of laptops without highly configurable BIOSes.

[+] qubex|5 years ago|reply
> Performance is so high now that I wouldn’t bother doing this for an extra 5-10%

I’m an economist and I’m fascinated by this statement.

Surely if something (‘performance’, in this case) is ‘high’ then getting a 5-10% proportion of it is better than getting the same proportion increase in performance on a lesser level (the bigger the baseline, the bigger that 5-10% extra performance is). So it’s apparently irrational: being willing to incur effort (cost) to get something that is worth a smaller amount and being unwilling to do it when the same effort/cost gets you more isn’t what one would expect.

But maybe it’s satisficing: maybe formerly the experience was endurable only when running at 110% of maximum, but now there’s no need to redline to get a decent experience?

Or maybe it’s the law of diminishing returns, utility approaching some kind of asymptote.

[+] magicalhippo|5 years ago|reply
I used to. I found on my AMD 5870 GPU that cutting RAM speed in half had no measurable effect on desktop use, but considerably lowered the temperature of the GPU as a whole, like over 10 C. The GPU itself already did dynamic frequency switching, so not much gain there.

So I had a couple of profiles made that I could switch between when gaming and not, which would adjust the RAM speed.

[+] bserge|5 years ago|reply
Well, it sure would be great if all laptop BIOS had these options. The vast majority don't.
[+] eznzt|5 years ago|reply
What is the difference between undervolting and just changing the processor governor?
[+] aidenn0|5 years ago|reply
Power used is roughly proportional to the clock times the square of the voltage. Changing the processor governor affects the clock, undervolting affects the voltage.

If you use a more conservative governor you lower performance and power consumption both linearly; this means that e.g. the total energy used for running a long batch job is roughly constant. If you lower the voltage, you don't decrease performance at all, but still lower the power consumption. It's a free lunch, right up until your CPU starts silently generating the wrong results and possibly corrupting your entire system.

On top of this, CPUs now often will (internally, or with the help of the motherboard chipset) dynamically alter their clock based on the temperature. So undervolting reduces the power consumed at a given temperature, which will increase the speed your CPU runs at, if you are thermally limited. This means a setup with poor cooling will use the same amount of power before but run faster.

[+] gravypod|5 years ago|reply
I'm a laymen so don't take this as definitive but my understanding is Power = Volts * Amps. The amount of Amps going into something is the amount of electrons moving into it (water in a pipe). Volts is how hard you're pushing the electrons through a circuit (pressure in a pipe). Because of magic I don't understand amps is ~constant while how much force is behind those electrons have is changeable (how wide you open your faucet).

Processor governors change the clock speed of the CPU (how many dishes you're washing). Dynamic voltage control is changing how hard you're pushing electrons through the CPU to let it stably operate at a given frequency (opening/closing the faucet as your scrubbing your dishes).

By doing this we can lower the amount of Power (water) we use while getting the same amount of work done (dishes washed).

[+] rektide|5 years ago|reply
amdctl[1] might be useful to look at to learn a little here, as it meddles with these things.

the CPU has different ACPI P-States, different power level modes that the governor will switch between.

but each of those states has an assigned voltage to it. you can tell a governor to keep using lower power states, but those states may still be supplying more voltage/power than the CPU requires to run.

under-volting is about adjusting the power level for a given state. there's a very broad ranging article on AMD Zen architecture[1] that i love, from Matt Dillon, creator of DragonflyBSD, and it talks some to undervolting & how it can be useful for their big build-servers & others. [edit: wait no, wrong link: it was THIS other huge thread from Dillon[3] that included low power musings, but still no explicit undervolting, just setting the thermal limit lower].

[1] https://github.com/kevinlekiller/amdctl

[2] https://news.ycombinator.com/item?id=20795054

[3] http://apollo.backplane.com/DFlyMisc/threadripper.txt

[+] londons_explore|5 years ago|reply
How do the MSR's affect CPU core voltage?

After all, the voltage regulators for the CPU core are off-chip on the motherboard...

[+] bserge|5 years ago|reply
But it's tightly integrated with the CPU itself. The VRM dos nothing without the CPU saying so. Whatever voltage it requests, the VRM will comply.

For a glorious short time with Haswell, the VRM was fully integrated onto the processor die. It led to increased heat, obviously, but if you properly cooled the processor, you could stop worrying about your VRM failing.

[+] ngneer|5 years ago|reply
VRs can be off chip (MBVR stands for motherboard VR) versus on chip (FIVR stands for fully integrated VR). In both cases, there exists a protocol called SVID that allows the processor to send voltage control commands. The MSR is merely the interface or proxy for these commands.
[+] hansendc|5 years ago|reply
MSRs can do anything, really. They're also not universally "registers" in any meaningful way. Basically, instead of adding new instructions for everything, CPU designers just add a new MSR. Its kinda like how the kernel assigns a new major/minor for every new device driver instead of a new syscall.

MSRs can also be added by microcode update as we saw with MSR_IA32_SPEC_CTRL, which was used to mitigate Spectre (among other things).

Disclaimer: I work on Linux at Intel, and I was one of the ones posting in that LKML thread quoted in the article.

[+] Namidairo|5 years ago|reply
In somewhat related news, they just pulled undervolting on XTU for some people recently.

Speculation being that it was just non-K cpu owners.

:(

[+] bserge|5 years ago|reply
Might be related to Plundervolt, many manufacturers issued BIOS updates to disable undervolting.

And if you didn't want that, well surprise, Windows 10 did it for you anyway! At least it's not permanent, it just loads on boot.