Unlocking Intel processors for CPU undervolting from Linux

Some context

Intel's workstation laptop processors run hot. In the past, one way to prevent constant throttling and heat soaking your cooling system used to be undervolting. Then people discovered undervolting could in some scenarios trigger errors in calculations, but nobody cared. Until researchers showed it could also be used to leak secrets from SGX security enclaves, which is used in some DRM solutions, and Intel responded by recommending all the firmware and laptop vendors locked down undervolting.

Most vendors followed Intels recommendation, and as a result on most 8th, 9th, 10th and 11th generation processors, undervolting is disabled by default.

But, in some cases this ability can be restored by changing two (typically hidden) UEFI settings, called CFG Lock and Overclocking Lock (despite the name, disabling the overclocking lock will not let you overclock non-K variants of Intels processors. Sorry to disappoint).

On this page, I'll provide step-by-step instructions to find and change this setting on your system using only open-source tools running on Linux (or UEFI). I've succesfully used this method on several laptops, mostly from Dell, running 8th, 9th and 11th gen processors. I've also run into some (mostly ThinkPads from Lenovo) which were locked down in a way I was unable to bypass, so your mileage may vary.

This method persists across BIOS updates, so you really should only have to do this whole song and dance once.

Step 0:

Maybe it just works for you? Try to undervolt your processor using intel-undervolt:

If this works, your firmware vendor has not locked undervolting on your system, and you can just not worry about all the other steps and enjoy your unlocked firmware.

Step 1: get your firmware image

Step 2: Extract the UEFI settings from the BIOS

Step 3: Find the relevant UEFI config flags

Next, we need to find out where our UEFI firmware stores the settings we're interested in changing. UEFI stores it's settings (and all the labels and descriptions for displaying them in menus) in UEFI Internal Form Representation, a binary format. We need to extract these forms from the file we created in step 2:

So VarStore 0x03 is named "CpuSetup" in this case.

Step 4: change the UEFI settings using setup_var.efi

To modify these hidden settings, we'll be booting into a UEFI shell and using setup_var.efi to modify the memory. Setting up a UEFI shell and adding extra executables can be somewhat of a hassle, so I've prepared a zip file for your convenience

This should disable both locks and allow you to undervolt your processor. Try step 0 again and you shouldn't have more luck!

The filesystem might be different, depending on the order in which your storage devices were scanned by the UEFI firmware. You'll see a list of filesystems at the top of your screen when starting the prompt.

Here's a screenshot of the whole thing on my computer, taken using a Soviet era potato:

UEFI shell screenshot

Note: if you run into an error with code 0x8 or GRUB_EFI_WRITE_PROTECTED, your firmware vendor has locked down these settings in way can't be circumvented by this method. Sorry.