Skip to content

Instantly share code, notes, and snippets.

@Tharre
Last active March 18, 2024 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tharre/f0d12183bb77bc0f5d96dc8e3b9da816 to your computer and use it in GitHub Desktop.
Save Tharre/f0d12183bb77bc0f5d96dc8e3b9da816 to your computer and use it in GitHub Desktop.

Dell XPS 13 9360 undervolting on latest (2.21.0) BIOS

Disclaimer: changing hidden BIOS settings is inherently dangerous and could permanently brick your machine. Proceed with caution and at your own risk.

Starting with BIOS version `2.14.0` Dell removed the ability to undervolt the CPU by setting the Overclocking Lock in BIOS because of Plundervolt, see here.

Fortunately there are hidden BIOS options to undo this which can be accessed using `setup_var.efi` or similar tools. However the Overclocking Lock specifically is reset after a reboot so instead we’ll set the voltage offsets directly.

One can obtain the correct offsets for the variables we want to change by extracting them from the BIOS upgrade package provided by Dell, a python script to extract the actual BIOS files from it and software that can read the UEFI BIOS image. The resulting offsets are specific to both the exact model and BIOS version in use, and blindly using them on a different model or version is a VERY BAD IDEA as it can brick your machine. If this happens to you, you may be able to unbrick it by performing a CMOS reset, but if you accidentally set a wrong cpu offset voltage in this way your machine may be destroyed permanently.

Here’s are some relevant offsets obtain from this process, slightly edited for readability and clarity:

Overclocking Lock | VarStore: Setup | VarOffset: 0x58D | Size: 0x1
    Disabled: 0x0
    Enabled: 0x1

XTU Interface | VarStore: Setup | VarOffset: 0x64E | Size: 0x1
    Disabled: 0x0
    Enabled: 0x1

CFG Lock | VarStore: Setup | VarOffset: 0x4DE | Size: 0x1
    Disabled: 0x0
    Enabled: 0x1

Core Voltage Offset | VarStore: Setup | VarOffset: 0x653 | Size: 0x2
    Min: 0x0 | Max: 0x3E8 | Step: 0x1

Core Offset Prefix | VarStore: Setup | VarOffset: 0x655 | Size: 0x1
    +: 0x0
    -: 0x1

GPU Voltage Offset | VarStore: Setup | VarOffset: 0x85A | Size: 0x2
    Min: 0x0 | Max: 0x3E8 | Step: 0x1

GPU Offset Prefix | VarStore: Setup | VarOffset: 0x85C | Size: 0x1
    +: 0x0
    -: 0x1

As stated previously, the Overclocking Lock is reset after a reboot, but can is nontheless useful for finding stable voltage offsets before we set them in BIOS as it makes tools like intel-undervolt work again.

VariableOffsetSizeDefault ValueComment
Overclocking Lock0x58D0x10x1 (Enabled)Forbid (0x1) or Allow (0x0) OS-level overclocking
Core Voltage Offset0x6530x20x0 (0 mV)CPU offset voltage in mV in hexadecimal; 0x64 = 100mV
Core Offset Prefix0x6550x10x0 (Positive)Sign of the previous offset; we want negative for undervolting
GPU Voltage Offset0x85A0x20x0 (0 mV)Same as Core Voltage Offset but for the GPU
GPU Offset Prefix0x85C0x10x0 (Positive)Sign of the previous offset; we want negative for undervolting

Changing the hidden variables

To change the variables we’ll use something called setup_var.efi.

First try to read the values like so:

setup_var.efi Setup:0x58D(0x1)

Then we write to them for real:

setup_var.efi Setup:0x58D(0x1)=0x0

After testing we can permanently set the desired offset we got from testing earlier, in this example to -100mV:

setup_var.efi Setup:0x655(0x1)=0x1
setup_var.efi Setup:0x653(0x2)=0x64

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment