SkillAgentSearch skills...

PowerMonkey

UEFI Application for CPU Voltage/Frquency and Power Management adjustment. Great for undervolting.

Install / Use

/learn @psyq321/PowerMonkey
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Reduce CPU Power Waste and Gain Performance - Greener and Meaner

   ______                            ______                 _
  (_____ \                          |  ___ \               | |
   _____) )___   _ _ _   ____   ___ | | _ | |  ___   ____  | |  _  ____  _   _
  |  ____// _ \ | | | | / _  ) / __)| || || | / _ \ |  _ \ | | / )/ _  )| | | |
  | |    | |_| || | | |( (/ / | |   | || || || |_| || | | || |< (( (/ / | |_| |
  |_|     \___/  \____| \____)|_|   |_||_||_| \___/ |_| |_||_| \_)\____) \__  |
                                                                        (____/
  Copyright (C) 2021-2022 Ivan Dimkovic. All rights reserved.
  
  WARNING: This code is a proof of concept for educative purposes. It can
  modify internal computer configuration parameters and cause malfunctions or
  even permanent damage. It has been tested on a limited range of target CPUs
  and has minimal built-in failsafe mechanisms, thus making it unsuitable for
  recommended use by users not skilled in the art. Use it at your own risk.

What is PowerMonkey?

Background

By the 2020s, everybody knows what 'overclocking' is: bringing the system to its limits by increasing its working frequency, voltage or both. This process used to be very error-prone but it got perfected in the meantime, with even some big-name systems coming “factory overclocked” out of the box.

However, much fewer people have heard about its cousin: undervolting. Undervolting is, in a way, an opposite process from overclocking: reducing CPU voltage to the point, CPU consumes much less power and generates way less heat.

Intriguingly, doing this to the thermally limited system such as a notebook or SFF (small form factor) PC will both reduce heat AND improve performance! Magic? No, physics! There is only so much heat a notebook cooling system can evacuate, and once this route becomes exhausted, there is no other option but to throttle the CPU to prevent catastrophic failure. Reducing voltage at high frequencies significantly decreases power and heat output thus making the system cooler and faster.

Challenges

Sadly, it has become increasingly difficult to optimize a typical notebook. First, undervolting became mostly locked-by-default by OEMs. This problem can be mitigated by “unlocking” the firmware settings so that excellent applications like ThrottleStop can do their job (unless the platform is fully locked).

But new problems are in sight: Hypervisors such as Microsoft Hyper-V are now used even by end-user applications like WSL2 (Windows Subsystem for Linux). Because Hypervisor does not allow a Virtual Machine to modify most of the host hardware registers, applications like ThrottleStop or Intel’s XTU cannot adjust voltages.

When application attempts to write to a hardware register, Hypervisor traps this attempt and does not perform the actual writing. It is heoretically possible that Hypervisor vendor implements writing, but highly unlikely. This has created new barriers for undervolting and similar types of hardware tweaks.

Nothing above would be a problem if OEMs allowed customers to adjust the settings in the firmware setup. However, most notebooks come with minimal configuration options, locking the owner of being able to adjust their hardware. PowerMonkey POC intends to fix precisely this problem, and this repository is the first “proof-of-concept” showing viability of such an approach.

How does PowerMonkey work?

This proof-of-concept is using ability of UEFI firmwares to execute so-called "applications" before OS bootoader is invoked. At that moment (providing that the firmware did not lock) it is possible to (almost) fully adjust CPU frequency and voltages as well as power management configuration. This is later in the boot process (see below) as opposed to how OEM would do it, but since "advanced setup" is not an option, this is actually the second best place.

NOTE: PowerMonkey is fully usable only with systems using S0iX ("Connected Standby" / "Modern Standby" / "S0 Standby") modes. Systems using legacy S3 sleep will revert to the platform-hardcoded settings upon resuming from S3 sleep. Since UEFI DXE drivers/applications are not reloaded during S3 resume flow, no overrides could be applied before Hypervisor resumes.

Below picture explains where PowerMonkey.efi POC resides:

EfiGood

Who is the target user of PowerMonkey?

PowerMonkey.efi is currently proof-of-concept for expert users who have systems that do not allow Voltage/Frequency override configuration in their firmware setup modules, yet firmware is either OC/CFG unlocked or can be made so by some means (e.g. NVRAM EFI variable editing). Primary purpose of PowerMonkey.efi is to allow V/F overrides on such systems when usage of Hypervisor is also desired.

Enabled Features

NOTE: Alder Lake Support is BETA (P-Cores Only, spurious crashes discovered when E-Cores are enabled)

PowerMonkey is a POC and is not tested on anything other than few CML, RKL and ADL* systems. At this stage, usage is recommended only to developers and experts under precautions. There are no checks for CPU compatibility so crashes could occur. It can brick computers or cause them to fail in all kinds of ways!

| Feature | Configurable | | ------------------------------------------------------- | ------------------ | | Voltage / Frequency Overrides | | | Voltage Override for entire VF Curve | YES | | Targetted voltage mode | YES | | Interpolative voltage mode | YES | | Voltage offset | YES | | Voltage adjustment on individual VF Curve Points | YES | | IccMax | | | Programmable IccMax for all domains (OC Mailbox) | YES | | RKL/ICL/TGL/ADL Unlimited IccMax | YES | | Turbo Bins | | | Max. Turbo Ratio for all turbo configurations | YES | | Invididual (per # cores) turbo ratio configuration | TBD | | Power Limits | | | Enable/Disable/Lock PL1/PL2/PL3/PL4/PP0/... | YES | | Power and Time Limits adjustment (where possible) | YES | | Package and Platform (PSys) Domains | YES | | MSR and MMIO Control | YES | | Power Control | | | Race to Halt | YES | | Energy Efficient Turbo | YES | | Lockdown | | | Optional Overclocking Lockdown | YES | | Fine-grained Lockdown of different Power registers | YES | | Stability Testing | | | After-programming Stress Tester | TBD | | Debugging | | | Tracing (Compile-Time Option, see CONFIGURATION.h) | YES |

Getting Started

Configuration

All relevant configuration options are stored in these files: CONFIGURATION.c and CONFIGURATION.h where the entire configuration interface and options reside. Configuration process is exactly the same for all build methods and does not depend on the choice of build toolchain. Simply edit CONFIGURATION.c and CONFIGURATION.h with your overrides and build the PowerMonkey.efi executable afterwards!

Note: this guide is not 'Undervolting HowTo' - it is assumed you already know the optimal settings for your system. If not, please check some of the excellent guides like ThrottleStop guide or Guide on NotebookReview Forums

Build the binaries

Because PowerMonkey is in the "proof-of-concept" stage

View on GitHub
GitHub Stars242
CategoryDevelopment
Updated6d ago
Forks29

Languages

C

Security Score

95/100

Audited on Mar 23, 2026

No findings