Manjaro Undervolt intel CPU

Undervolt intel CPU

From Manjaro
Revision as of 11:16, 1 April 2018 by imported>Yoy0

Introduction

Undervolt

Undervolting your CPU reduce its power consumption and heat without harming performance if well done.

If voltage is set too low it can lead to error, crash and reboot.

It's not a trivial thing to do, used software can physically harm your computer if wrong value are set.

Intel P-state vs cpufreq

"CPUfreq — also referred to as CPU speed scaling — is the infrastructure in the Linux kernel that enables to scale the CPU frequency in order to save power." Redhat.com docs.

"intel_pstate is a part of the CPU performance scaling subsystem in the Linux kernel (CPUFreq). It is a scaling driver for the Sandy Bridge and later generations of Intel processors." Kernel.org docs

Method to undervolt differ depending on which "scaling" is used by your processor, Intel PState start with 2nd gen Intel Core i3/5/7 (Sandy Bridge).

Method / Software / History

1. For CPUfreq, PHC is used and method is well documented on arch wiki (https://wiki.archlinux.org/index.php/PHC), I will not focus on it as I got no experience with it and no hardware to acquire it.

2. For PState, a method appeared in August 2017 (https://github.com/mihic/linux-intel-undervolt) and shortly after a python soft got written (https://github.com/xdever/linux-intel-undervolt-tool).

PState undervolt

Method description

I will take the example of a 0.175V decrease: - 0.175V.

To achieve that I will need two commands, one for CPU Core and the other for CPU Cache. (CPU Core and Cache share the voltage plane on my machine, that's why two commands instead of one).


Warning
These commands are shown for illustrative purpose.
sudo wrmsr 0x150 0x80000011E9A00000
sudo wrmsr 0x150 0x80000211E9A00000

explanation:

# wrmsr is a tool used for writing values to a CPU's machine specific registers (MSR).

# First value is the register number.
    # It's always 0x150

# Second value is where and what we write in it.
    # 0x mean hexadecimal.
    # 80000 is constant, meaning is unknown.
    # X <- It's the plane index, it can be (not exhaustive):
        # 0 CPU Core
        # 1 GPU
        # 2 CPU Cache
    # 1 is constant, meaning is unknown.
    # 1 write/read <- I don't know what that mean.
    # E9A00000 offset, it's -0.175V after some magic calculation.
        # -175*1.024 = -179.2 -> -179
        # 179  = 1011 0011
        # -179 = 0100 1101         # invert bits+1 to get negative value.

        # Bits tagged with "c" are constant value, bits tagged with "o" are the calculated offset.
        # ccco oooo oooc cccc cccc cccc cccc cccc
        # 1110 1001 1010 0000 0000 0000 0000 0000
        #    E    9    A    0    0    0    0    0

        # 0xE9A00000

Software

kernel module

You need to have module msr enabled for wrmsr to work

modprobe msr

wrmsr/rdmsr

wrmsr is provided by package msr-tools in AUR

The python soft I mentioned earlier

If you don't want to make the calculation yourself or want to automate undervolt at boot you can use: https://github.com/xdever/linux-intel-undervolt-tool

It's not heavily used and not available as a package for now it got forked https://github.com/hedgepigdaniel/linux-intel-undervolt-tool/ and is available in AUR as linux-intel-undervolt-tool.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.