The Definitive Guide To Undervolting On Ubuntu!


How To: Undervolt CPU and iGPU on Ubuntu 18.04LTS


Hi, in this blog post I will explain how to under-volt your Intel CPU or iGPU to increase battery life and decrease CPU temperatures. To do this we will install a CLI tool from GitHub called "Undervolt". To follow this guide you must have Sudo or Root privileges and understand the basics of how to use a Linux Bash Terminal. I have successfully undervolted my Dell E7450 with Ubuntu 18.04LTS.
___________________________________________________________________

The easiest way to install Undervolt is via the Python package manager, PIP.
<< $ pip install undervolt >>


Now that Undervolt is installed we can call it from the terminal. If you get error then make sure that Secure-Boot is disabled in your BIOS.
<< $ sudo undervolt --read >>


Issue the following command to see all options:
<<$ sudo undervolt --help>>
___________________________________________________________________

Undervolt is a powerful tool that can - if misused - permanently damage you computer rendering it unusable. Follow the next steps at your own risk!

Before you undervolt you computer, find out which CPU you have and find out the max that you can undervolt it. If you undervolt your CPU too far then you will be left with a slow system that can crash. For my CPU which is an i5 5300U I was able to successfully apply a -75mV undervolt to the core and cache and a -25mV undervolt to the iGPU without any issues
___________________________________________________________________

To undervolt your system use one of the following commands tweaking the values as needed for you setup:
<<  $ sudo undervolt --core -75 --cache -75 >>
<< $ sudo undervolt --core -75 --cache -75 --gpu -25 >>

Now if you run the first command again you will see the values that you input in the previous step. This means that your undervolt was successful! However this is not persistent. If you reboot your undervolt will be lost.
___________________________________________________________________

To undervolt at boot we must create a task via systemd:
<< $ sudo touch /etc/systemd/system/undervolt.service >>
<< $ sudo nano /etc/systemd/system/undervolt.service >>

Place the following script inside the file before saving and exiting:
<<
[Unit]
Description=undervolt

[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
>>


Now issue this command to ensure the script works:
<< $ systemctl start undervolt >>
___________________________________________________________________

Then we must create a timer to trigger task periodically:
<< $ sudo touch /etc/systemd/system/undervolt.timer >>
<< $ sudo nano /etc/systemd/system/undervolt.timer >>


Place this script inside:
<<
[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.target
>>

Save and exit again. Then start and enable the timer:
<< $ systemctl enable undervolt.timer >>
<< $ systemctl start undervolt.timer >>

The purpose of the timer is to apply the undervolt 2 minutes after the system has booted so that you have a chance to uninstall the software and remove the undervolt should your system become unstable. It also makes sure that after 2 minutes has elapsed the undervolt is always applied.
___________________________________________________________________

And there you have it. Hopefully you have successfully undervolted your computer, saving precious battery life and lowering your CPU temperatures at the same time while not loosing out on any performance!

Thanks for reading!

 ___________________________________________________________________
 This Guide is adapted from HERE. Many thanks to the Developer for this software.

Popular Posts