Skip to content

ShyVortex/intel-turbo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

intel-turbo

Linux script to disable Turbo Boost on Intel CPUs

Description

This simple script is used through a systemd service to disable the Intel Turbo Boost technology on any Linux distribution that supports the intel_pstate frequency driver. To check if your system supports it, open the terminal and run:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver

It should return intel_pstate for each CPU thread.

Installation

It is very easy to install this script. The intel folder in opt should be placed under the /opt/ folder of your Linux distribution, while the intel-noturbo service file should be placed under the system subfolder of the systemd directory, located in /etc/systemd/system/. I've also put it inside its correct destination folder right in the repository so you can quickly identify where it should be dropped. If you want to automatically disable Turbo Boost at startup, you can do so with with:

sudo systemctl enable --now intel-noturbo.service

Or, you can just disable turbo manually at your will and not automatically with:

sudo systemctl start intel-noturbo.service

While you can check the service status with:

sudo systemctl status intel-noturbo.service

You can also directly ask the system if Turbo Boost is enabled or disabled before and after applying the service with:

cat /sys/devices/system/cpu/intel_pstate/no_turbo

This returns:

  • 0 if turbo is enabled;

  • 1 if turbo is disabled.

Removal

If you want to uninstall the service, first you need to disable it from running and activating on startup. You can disable it with:

sudo systemctl disable --now intel-noturbo.service

Once the service is disabled, you can proceed to mask it so it cannot be started by any means. You can do so with:

sudo systemctl mask intel-noturbo.service

You can now proceed to permanently remove the files from your system. You need to delete both the intel folder from /opt/ and the added systemd file.

sudo rm -r /opt/intel/

sudo rm /etc/systemd/system/intel-noturbo.service

Reboot your system for the changes to take effect.

Usage outside of systemd

Not all Linux distributions come with the systemd daemon, but they may use other alternatives like OpenRC, runit or s6. In this case, you can still use the script but you can't enable it at startup with the method written above. What you can do instead is copy the intel folder in your system's /opt/ and follow one of the other methods listed here to enable its autoexecution at startup. If you only want to execute it manually at your own pace, you can do so by opening the terminal and writing this command.

sudo ./opt/intel/intel_noturbo.sh

As an example, we can use the Cron Job method to automatically run the script at startup on non-systemd distributions. To do so, you have to first make sure that cronie is installed on your system. Open the terminal, and do the following:

  • If you are on Debian or Ubuntu, type

    sudo apt install cronie
  • On Fedora or RHEL, type

    sudo yum install cronie
  • On Arch Linux and its derivatives, type

    sudo pacman -S cronie

You can check if the installation was successful with:

crond -V

Now we need to edit the cron table to add our task which runs the custom script on startup. Type:

crontab -e

Then add said task using the @reboot expression, which executes the code once at startup:

@reboot sh /opt/intel/intel_noturbo.sh

If you want to remove the script in the future, first you need to delete its task from the cron table, typing again crontab -e and removing the line previously added. You can then proceed to delete all files from your system, following the same method as in Removal:

sudo rm -r /opt/intel/

sudo rm /etc/systemd/system/intel-noturbo.service

License

About

Linux script to disable Turbo Boost on Intel CPUs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages