Package: undervolt
Warning! This program is untested (apart from by myself) and it may damage your hardware! Use at your own risk.undervoltundervoltis a program for undervolting Intel CPUs under Linux. It works in
a similar manner to the Windows programThrottleStop(i.e,MSR 0x150). You
can apply a fixed voltage offset to one of 5 voltage planes, override your
systems temperature target (CPU will throttle when this temperature is reached),
and adjust the system’s short and long power budgets (clocks and thus voltages
will be altered in order to keep total power usage in these periods under the
configured limits).For more information, readhere.InstallingFrom PyPi:$ pip install undervoltFrom source:$ pip install git+https://github.com/georgewhewell/undervolt.gitNote for custom kernel users: the module ‘msr’ (“CONFIG_X86_MSR”) must be enabled in the kernel options (Processor type & features -> Model-specific register support)ExamplesRead current offsets:$ undervolt --read
temperature target: -25 (75C)
core: -110.35 mV
gpu: -49.8 mV
cache: -110.35 mV
uncore: -59.57 mV
analogio: -59.57 mV
powerlimit: 35.0W (short: 1.0s - enabled) / 35.0W (long: 1.0s - enabled)
turbo: enabledApply -100mV offset to CPU Core and Cache:$ undervolt –core -100 –cache -100Apply -75mV offset to GPU, -100mV to all other planes:$ undervolt –gpu -75 –core -100 –cache -100 –uncore -100 –analogio -100Set temperature target to 97C:$ undervolt –temp 97Set powerlimit 1 to 35W, 10s:$ undervolt -p1 35 10Set Intel Turbo disabled:$ undervolt –turbo 1Generated the command to run to recreate your Throttlestop settings:$ undervolt --throttlestop ThrottleStop.ini --tsindex 3
undervolt --core -100.5859375
$ undervolt --throttlestop ThrottleStop.ini
undervolt --core -125.0 --gpu -125.0 --cache -125.0Usage$ undervolt -h
usage: undervolt.py [-h] [--version] [-v] [-f] [-r] [-t TEMP]
                    [--temp-bat TEMP_BAT] [--throttlestop THROTTLESTOP]
                    [--tsindex TSINDEX] [-p1 POWER_LIMIT TIME_WINDOW]
                    [-p2 POWER_LIMIT TIME_WINDOW] [--lock-power-limit]
                    [--core CORE] [--gpu GPU] [--cache CACHE]
                    [--uncore UNCORE] [--analogio ANALOGIO]

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -v, --verbose         print debug info
  -f, --force           allow setting positive offsets
  -r, --read            read existing values
  --turbo               Changes the Intel Turbo feature status (1 is disabled and 0 is enabled)
  -t TEMP, --temp TEMP  set temperature target on AC (and battery power if
                        --temp-bat is not used)
  --temp-bat TEMP_BAT   set temperature target on battery power
  --throttlestop THROTTLESTOP
                        extract values from ThrottleStop
  --tsindex TSINDEX     ThrottleStop profile index
  -p1 POWER_LIMIT TIME_WINDOW, --power-limit-long POWER_LIMIT TIME_WINDOW
                        P1 Power Limit (W) and Time Window (s)
  -p2 POWER_LIMIT TIME_WINDOW, --power-limit-short POWER_LIMIT TIME_WINDOW
                        P2 Power Limit (W) and Time Window (s)
  --lock-power-limit    Locks the set power limit. Once they are locked, they
                        can not be modified until next RESET (e.g., Reboot).
  --core CORE           offset (mV)
  --gpu GPU             offset (mV)
  --cache CACHE         offset (mV)
  --uncore UNCORE       offset (mV)
  --analogio ANALOGIO   offset (mV)Running automatically on boot (systemd)First, create a unit file/etc/systemd/system/undervolt.servicewith
following contents, replacing the arguments with your own offsets:[Unit]
Description=undervolt
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target

[Service]
Type=oneshot
# If you have installed undervolt globally (via sudo pip install):
ExecStart=/usr/local/bin/undervolt -v --core -150 --cache -150 --gpu -100
# If you want to run from source:
# ExecStart=/path/to/undervolt.py -v --core -150 --cache -150 --gpu -100

[Install]
WantedBy=multi-user.target
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.targetCheck that your script works:$ systemctl start undervoltNow you may enable undervolt service:$ systemctl enable undervoltOr, if you have issue with settings persistence, create a timer/etc/systemd/system/undervolt.timerto trigger the task periodically:[Unit]
Description=Apply undervolt settings

[Timer]
Unit=undervolt.service
# Wait 2 minutes after boot before first applying
OnBootSec=2min
# Run every 30 seconds
OnUnitActiveSec=30

[Install]
WantedBy=multi-user.targetNow enable and start the timer:$ systemctl enable undervolt.timer
$ systemctl start undervolt.timerBy including theOnBootSeccommand, settings will not be immediately applied.
If you have set overly-aggressive offsets, you will have a short period to
disable the timer before it crashes your system:$ systemctl stop undervolt.timerNow you can edit yourundervolt.servicebefore re-starting the timer.Running automatically on boot (runit)First, create a directory for the service:$ sudo mkdir -p /etc/sv/undervoltThen create a file named “run” in that directory and edit it to contain these contents:#!/bin/sh
undervolt --core -85 --uncore -85 --analogio -85 --cache -85 --gpu -85
sleep 60Replace the offsets with your own. Then mark the file as executable:$ sudo chmod a+x /etc/sv/undervolt/runThen enable the service:$ sudo ln -s /etc/sv/undervolt /var/services/Hardware supportUndervolting should work on any CPU later than Haswell.SystemCPUWorking?Acer Aspire 7 (A715-71G)i5-7300HQYesAcer Aspire E 15 (E5-575G)i5-7200UYesAcer Nitro 5i5-7300HQYesAcer Nitro 5  (An515-52)i5-8300HYesAcer Predator (PH315-51)i7-8750HYesAcer Swift 7 (SF714)i5-8200YYesAsus FX504GEi7-8750HYesAsus GL703GEi7-8750HYesDell G5i7-8750HYesDell G5 5590i7-9750HYesDell Inspiron 5577i7-7700HQYesDell Inspiron 7560i7-7500UYesDell Latitude 3301i5-8265UYesDell Latitude 5400i7-8665UYesDell Latitude 5480i5-6300UYesDell Latitude 7390i7-8650UYesDell Precision 5530i9-8950HKYesDell Precision 7530i9-8950HKYesDell Precision 7730E-2176MYesDell Precision 7740E-2286MYesDell Precision M3800i7-4712HQYesDell XPS 13 9343i5-5200UYesDell XPS 13 9350i7-6560UYesDell XPS 13 9360i7-7560UYesDell XPS 15 7590i7-9750HYesDell XPS 15 7590i9-9980HKYesDell XPS 15 9530i7-4712HQYesDell XPS 15 9550i7-6700HQYesDell XPS 15 9560i7-7700HQYesDell XPS 15 9570i9-8950HKYesDell XPS 15 9575i7-8705GYesHP Omen 17-an061uri7-7700HQYesHP Spectre X360i7-8809GYesHP Zbook Studio G5i7-8750HYesIntel NUC7i3BNKi3-7100UYesLenovo AIO Y910 27ISHi7-6700YesLenovo IdeaCentre Q1901017UNoLenovo Thinkpad T430i7-3610QMNoLenovo Thinkpad T440pi5-4300MYesLenovo Thinkpad T470pi7-7700HQYesLenovo Thinkpad T470pi7-7820HQYesLenovo Thinkpad T480si5-8250UYesLenovo Thinkpad T490i5-8265UYesLenovo Thinkpad X1 Carboni7-6600UYesLenovo Thinkpad X1 Extremei7-8750HYesLenovo Thinkpad X1 Extreme Gen 2i7-9750HYesLenovo Thinkpad x250i7-5600UYesLenovo X1 Gen 5i7-7500UYesLenovo X1 Yoga Gen 2i7-7600UYesLenovo Yoga 920i7-8550UYesMSI GE60 2QD Apachei7-4720HQYesMSI GP73 Leopard 8RFi7-8750HYesMacBook Air Late 2015i5-5250UYesMacBook Air Mid 2013i5-4250UYesToshiba Chromebook 2N2840NoTroubleshootingCore or Cache offsets have no effect.It is not possible to set different offsets for CPU Core and Cache. The CPU
will take the smaller of the two offsets, and apply that to both CPU and
Cache. A warning message will be displayed if you attempt to set different
offsets.OSError: [Errno 1] Operation not permittedFirst try running withsudo. If the error persists, your system is
probably booted in Secure Boot mode. In this case, the Linux kernel will
prevent userspace programs (even as root) from writing to the CPU’s
model-specific registers. Disable UEFI Secure Boot in your system’s BIOS
and the error should go away.Undervolt has no effect - Your device BIOS might be blocking it. Check the wiki (https://github.com/georgewhewell/undervolt/wiki) to find notes for your hardwareGUIThere is also a small gui written in Java avaiable here:https://github.com/zmalrobot/JavaLinuxUndervoltIt will allow you to set each value core, gpu, cache, uncore, analogio (temperature target isn’t implemented yet),save a profile, load a profile and reset the value.CreditThis project is a trivial wrapper around the work of others from the following resources:https://github.com/mihic/linux-intel-undervolthttp://forum.notebookreview.com/threads/undervolting-e-g-skylake-in-linux.807953https://forums.anandtech.com/threads/what-controls-turbo-core-in-xeons.2496647Many thanks to all who contributed.