14 ms·
Linux Developers Discussing Possible Kernel Driver for Intel CPU Undervolting
- oneoffpost 6y agoHopefully the AMD MSR tool amdctl makes it as well: https://github.com/kevinlekiller/amdctl https://github.com/kevinlekiller/amdctl
- jeffbee 6y agoIf it's just an MSR write, what do you need a driver for?
- vii 6y agowell that's the subject of the Linux kernel thread as the original patch was just to remove a warning from the use of the Intel MSR https://lore.kernel.org/lkml/20200907094843.1949-1-Jason@zx2c4.com/T/#u https://lore.kernel.org/lkml/20200907094843.1949-1-Jason@zx2... I guess it's a question of whether you want drivers to be in the kernel source tree with supported interfaces, where interactions with other drivers can be mediated, or in userspace, where they can iterate without the kernel release process, which takes a long time to get to distros and end-users. As this Intel MSR is not well documented, I would not argue strongly either way.
- silon42 6y agoMaybe to handle things like suspend/resume, ...
- errantspark 6y agoUndervolting 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 6y agoWait, undervolting improves game performance for you?
- booi 6y agohmm maybe less thermal throttling?
- philjohn 6y agoAnd hitting higher clocks, for longer, as a result.
- Doxin 6y agoMight avoid hitting a thermal threshold and downclocking.
- freeqaz 6y agoYes, definitely! Your laptop is generally constrained by how much heat it can push through the heat sink. If you get "lucky" you have a CPU that can remain stable at lower voltages. So it's effectively the same as an "overclock" because your laptop can turbo the core speed up for longer (or forever). Your laptop rarely runs at maximum turbo all day. It can only do that for a few hundred ms usually. It'll basically just hold the clock speed at whatever it can before hitting some specific temp (85-95c). When you undervolt, the frequency that it can "hold" at that temp threshold is higher.
- neltnerb 6y agoYeah, even with my NUC that had a pretty decent fan running at top speed I literally put a block of metal I kept in the freezer on top of it to keep it from downthrottling due to overheating. It was ridiculous that it could let itself get that hot instead of doing something more graceful.
- copperx 6y ago
- usr1106 6y ago> 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 6y agoBelieve 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 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#Disabling_Turbo_Boost https://wiki.archlinux.org/index.php/CPU_frequency_scaling#D...) and the absolute temperature by using the "powersave" governor.
- ohazi 6y agoDo 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 6y agoI'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.
- bserge 6y agoForget XTU, use Throttlestop. It's amazing what functionality the developer baked into it by mostly trial and error with Intel's hidden MSRs. Linux also has utilities for this, using the same MSRs, although support for a lot of processors is lacking.
- bserge 6y agoWell, it sure would be great if all laptop BIOS had these options. The vast majority don't.
- magicalhippo 6y agoI 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.
- 6y ago
- Namidairo 6y agoIn somewhat related news, they just pulled undervolting on XTU for some people recently. Speculation being that it was just non-K cpu owners. :(
- bserge 6y agoMight 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.
- travisgriggs 6y agoIn case you too saw a new word in the title: https://en.m.wikipedia.org/wiki/Dynamic_voltage_scaling https://en.m.wikipedia.org/wiki/Dynamic_voltage_scaling
- acd 6y agoI 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 https://en.wikipedia.org/wiki/CPU_power_dissipation ps. You can also undervolt, lower frequency of AMD CPUs.
- bserge 6y agoNot 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.
- SomeoneFromCA 6y ago> Undervolting lowers voltage, but the processor will now stay at higher clocks for a longer time, hitting the same TDP/power limits. No,at the same power, but for shorter amount of time, because now it is able do a lot more work per unit of time. So no, you'll definitely use less energy, although dissipate same amount of power. Keeping in mind, that your will be idling 90% of time, if not more, your savings will be even bigger.
- bserge 6y agoYeah, definitely for normal workloads/usage. I'm talking only constant full core load, synthetic tests like Prime95, rendering, or even gaming.
- SomeoneFromCA 6y agoEven in that case, if your CPU cooler can deal with dissipating all the power (without throttling), consumed by the CPU in both cases (normal and undervolted), you'll still use less energy when undervolted.
- londons_explore 6y agoHow do the MSR's affect CPU core voltage? After all, the voltage regulators for the CPU core are off-chip on the motherboard...
- iforgotpassword 6y agoThe CPU is controlling them (under normal conditions).
- bserge 6y agoBut 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.
- SomeoneFromCA 6y agoThis must be the reason with used Haswell mobos are cheaper than used Ivy Bridge ones.
- kasabali 6y agoNo, flood of cheap and powerful used Xeons are the reason why Ivy Bridge motherboards are expensive.
- hansendc 6y agoMSRs 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.
- 6y ago
- PrinceKropotkin 6y agoVanilla discusses the merits of Strawberry. Let me know when there's room for actually changing things.
- eznzt 6y agoWhat is the difference between undervolting and just changing the processor governor?
- gravypod 6y agoI'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).
- aidenn0 6y agoPower 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.
- rektide 6y agoamdctl[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 https://github.com/kevinlekiller/amdctl [2] https://news.ycombinator.com/item?id=20795054 https://news.ycombinator.com/item?id=20795054 [3] http://apollo.backplane.com/DFlyMisc/threadripper.txt http://apollo.backplane.com/DFlyMisc/threadripper.txt
- secondcoming 6y agoLink to actual discussion: https://lore.kernel.org/lkml/20200907094843.1949-1-Jason@zx2c4.com/T/#u https://lore.kernel.org/lkml/20200907094843.1949-1-Jason@zx2...