Skip to content

A small python script and a systemd service to check thermald for erratic behaviour and restart it if necessary

License

Notifications You must be signed in to change notification settings

BitWire/ThermaldChecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thermald Checker

I wrote this python script to fix an issue I had with my P14s Gen2i (equipped with an Intel i7 1165G7). After coldboots and sleep, thermald would run in erratic ways (throttling down to 0.4Ghz despite the temps being around 65C) which required me to restart thermald to return the clocks back to normal.

This script checks the temps and clocks of the cpu every 5 seconds. If the clocks are under 1GHz, and the temps under 70C, thermald will be restarted.

Prerequisites

Install the required dependencies by running:

sudo apt install libsystemd-dev
pip3 install -r requirements.txt

In case of the P14s, /etc/systemd/system/thermald.service.d/override.conf should look like this, so thermald runs despite lapmode:

[Service]
ExecStart=
ExecStart=/usr/sbin/thermald --systemd --dbus-enable --ignore-cpuid-check

Copy thermaldChecker.service to /etc/systemd/system/

Usage

Enable the service by typing this into a terminal:

sudo systemctl enable thermaldChecker.service
sudo systemctl start thermaldChecker.service

You can check the status by typing this into a terminal:

sudo systemctl status thermaldChecker.service
or
journalctl -xeu thermaldChecker

About

A small python script and a systemd service to check thermald for erratic behaviour and restart it if necessary

Resources

License

Stars

Watchers

Forks

Languages