Difference between revisions of "Undervolt intel CPU"

Marked this version for translation
m (added languages and translate tags)
(Marked this version for translation)
 
Line 2: Line 2:
__TOC__
__TOC__
<translate>
<translate>
= Introduction =
= Introduction = <!--T:1-->


== Undervolt ==
== Undervolt == <!--T:2-->
Undervolting your CPU reduce its power consumption and heat without harming performance if well done.
Undervolting your CPU reduce its power consumption and heat without harming performance if well done.


<!--T:3-->
If voltage is set too low it can lead to error, crash and reboot.
If voltage is set too low it can lead to error, crash and reboot.


<!--T:4-->
{{warning|It's not a trivial thing to do, used software can physically harm your computer if wrong value are set.}}
{{warning|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 ==
== Intel P-state vs cpufreq == <!--T:5-->


<!--T:6-->
"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.''
"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.''


<!--T:7-->
"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''
"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''


<!--T:8-->
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 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 ==
== Method / Software / History == <!--T:9-->


<!--T:10-->
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.
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.


<!--T:11-->
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).
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 =
= PState undervolt = <!--T:12-->


== Method description ==
== Method description == <!--T:13-->


<!--T:14-->
I will take the example of a 0.175V '''decrease''': '''- '''0.175V.
I will take the example of a 0.175V '''decrease''': '''- '''0.175V.


<!--T:15-->
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).
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).


<!--T:16-->
{{warning|These commands are shown for illustrative purpose.}}
{{warning|These commands are shown for illustrative purpose.}}
  sudo wrmsr 0x150 0x80000011E9A00000
  sudo wrmsr 0x150 0x80000011E9A00000
  sudo wrmsr 0x150 0x80000211E9A00000
  sudo wrmsr 0x150 0x80000211E9A00000


<!--T:17-->
explanation:
explanation:
  # wrmsr is a tool used for writing values to a CPU's machine specific registers (MSR).
  # wrmsr is a tool used for writing values to a CPU's machine specific registers (MSR).
Line 64: Line 75:
         # 0xE9A00000
         # 0xE9A00000


== Software ==
== Software == <!--T:18-->


=== kernel module ===
=== kernel module === <!--T:19-->
You need to have module '''msr''' enabled for '''wrmsr''' to work
You need to have module '''msr''' enabled for '''wrmsr''' to work
  modprobe msr
  modprobe msr


=== wrmsr/rdmsr ===
=== wrmsr/rdmsr === <!--T:20-->
wrmsr is provided by package '''msr-tools''' in '''AUR'''
wrmsr is provided by package '''msr-tools''' in '''AUR'''


=== The python soft I mentioned earlier ===
=== The python soft I mentioned earlier === <!--T:21-->
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
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


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


<!--T:23-->
My quick look at '''linux-intel-undervolt-tool''' files and behaviour:
My quick look at '''linux-intel-undervolt-tool''' files and behaviour:
  /usr/bin/undervolt
  /usr/bin/undervolt
Line 93: Line 106:
   # load msr module at startup
   # load msr module at startup


== Hardware known to work ==
== Hardware known to work == <!--T:24-->
{| class="wikitable centre" width="100%"
{| class="wikitable centre" width="100%"
|-
|-