Manage Intel Turbo Boost with systemd

If you have a little laptop with an Intel CPU that supports turbo boost, you might find that it’s getting a little hot when you’re using it on your lap.

For example, taking a look at my CPU:
lscpu |egrep "Model name|MHz"

We can see that it’s a 2.7GHz CPU with turbo boost taking it up to 3.5GHz.

Model name: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
CPU MHz: 524.633
CPU max MHz: 3500.0000
CPU min MHz: 400.0000

Here’s a way that you can enable and disable turbo boost with a systemd service, which lets you hook it into other services or disable it on boot.

By default, turbo boost is on, so starting our service will disable it.

Create the service.
cat << EOF | sudo tee \
Description=Disable Turbo Boost on Intel CPU
ExecStart=/bin/sh -c "/usr/bin/echo 1 > \
ExecStop=/bin/sh -c "/usr/bin/echo 0 > \

Reload systemd manager configuration.
sudo systemctl daemon-reload

Test it by running something CPU intensive and watching the current running MHz.

cat /dev/urandom > /dev/null &
lscpu |grep "CPU MHz"

CPU MHz: 3499.859

Now disable turbo boost and check the CPU speed again.
sudo systemctl start disable-turbo-boost
lscpu |grep "CPU MHz"

CPU MHz: 2699.987

Don’t forget to kill the CPU intensive process ๐Ÿ™‚

kill %1

If you want to disable turbo boost on boot by default, just enable the service.

sudo systemctl enable disable-turbo-boost

As turbo boost is enabled on a Linux system by default, to turn it back on you just need to turn off the script which disables it.

sudo systemctl disable disable-turbo-boost

9 Responses to “Manage Intel Turbo Boost with systemd”

  • your script is incomplete, I am getting this error:

    @archlinux โžœ ~ ยป sudo systemctl enable disable-turbo-boost
    The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
    settings in the [Install] section, and DefaultInstance for template units).
    This means they are not meant to be enabled using systemctl.
    Possible reasons for having this kind of units are:
    1) A unit may be statically enabled by being symlinked from another unit’s
    .wants/ or .requires/ directory.
    2) A unit’s purpose may be to act as a helper for some other unit which has
    a requirement dependency on it.
    3) A unit may be started when needed via activation (socket, path, timer,
    D-Bus, udev, scripted systemctl call, …).
    4) In case of template units, the unit is meant to be enabled with some
    instance name specified.

  • Thank you, my bad. I’ve updated the post to include support for this. Thanks.

  • Thanks a lot, that was really helpful

  • Your showing people the longest route to do something. Make sure you read the manuals first before posting articles.

  • Thank you, very usefull !

  • so how would you renable turbo boost

  • Turbo boost is enabled on a Linux system by default, so to turn it back on, just turn off the script which disables it.

    sudo systemctl disable disable-turbo-boost

    Basically, disable the disable service.

Leave a Reply