[RESPONDED] How to configure thermald on Debian on 12th Gen

I have a 12th Gen, running Debian.

When even just a couple of the processors are running at 100% for about 15 seconds or more, the CPU package temp hits 100C and stays there.

I once on a video call had the system actually experience thermal shutdown.

Obviously, I’m not happy with the lappy being so hot, and I don’t need it to be.

I’ve been thinking about a solution for a little while and have slowly investigated and now have installed thermald, which does not work out of the box.

Firstly, the systemd service file has options passed to thermald which seem to stop it running, I suspect because some /proc interfaces thermald would like also are not yet present.

As such, systemctl start does not work, out of the box.

When you run it manually, from the command line, by using the “–no-daemon” option, you then fine it does not recognize the 12th Gen processor.

You can get thermald to actually run from the command line by passing in some arguments to ignore these issues, but then thermald for me has has effect; in my case, I still go to 100C just as before.

The upshot of this is that you need to create your own thermald configuration file, and then edit the systemd service file.

Creating your own thermald configuration file is not straightforward.

I looked into it, it’s a complex XML file, you have to learn quite a bit and figure out how to get detailed information from your system about what devices and cooling devices you have.

However, there is a third-party (open source) utility to create it for you.

Unfortunately, quite recently, it seems that utility has stopped being supported - but it still seemed to work just fine for me, and it created five different configuration files (this is normal - apparently sometimes this happens, I think you’re getting options about how much cooling you want) and the third of these files keeps my system at 70C.

The utility is called dpifxtract and is here;

I downloaded the zip file and simply ran it (as root, as it copies files into /etc/thermald), no arguments needed.

If you’re running on a 12th Gen, I expect you to get five config files;

. thermal-conf.xml.0
. thermal-conf.xml.1
. thermal-conf.xml.2
. thermal-conf.xml.3
. thermal-conf.xml.auto

These have also been placed in your /etc/thermald directory (and also dumped into the currency directory).

For me, only thermal-conf.xml.3 made a difference. I deleted the other files, and renamed it “thermal-conf.xml”, as this is the filename used by default by thermald.

Now, finally, we need to adjust the systemd service file for thermald, because as it was when I installed it, thermald would not start (I could run it from the command line only, with the “–no-daemon” option).

Now, I know little about systemd so there is a possibility I be going about this the wrong way.

The path to the file is /etc/systemd/system/thermald.service

Under “[Service]”, you need to edit “ExecStart”.

Mine is now as so;

ExecStart=/usr/sbin/thermald --systemd --dbus-enable --poll-interval=1

In particular, the argument “–adaptive” seems to stop thermald from starting, I suspect because of missing /proc stuff.

The default poll interval is four seconds, I’ve changed this to one, which is just my preference.

That’s it.

If you’ve done all that, on a 12th Gen running latest Debian, you should now max out at 70C.

1 Like

You know, this has helped me a lot. I have a 12th Gen i5-1240p Framework and the only thing I’m actually displeased of is the temperatures. They are just too high. After i did this exact thing i find that my temps if they go over 76C-80ish, they get dialed back a bit and preventing it from coming close to TJ Max which AFAIK is 100c for this chip. I don’t know where or how this issue will get resolved, but this definitely did it for me. I used tlp or auto-cpufreq (tlp works better for me) and thermald as somewhat of a cealing for the temps. I tested this playing countless of games with a 60fps cap and the temperatures are good, and the core frequencies seem to be stabilized around 1.50-2ghz but my games run well. I am curious to know if Framework is aware of this and if they will do some type of fix or correction.

This reply has led me to re-read my original post and there are a couple of typing errors - missing words in some cases, which significantly detract from, and render confusing, the post.

I’d like to correct all the errors, but I cannot see any way to edit the post?

1 Like

Hi @Xenophon , there should be a pencil icon at the bottom of your post, if it’s not showing click the three dotted icon to show more. :slight_smile:

1 Like

Reading this re-write i can say that in my case, using Tumbleweed, The temps (with the .3 xml that is) get around 70-86ish Celsius, More than likely due to my location, is very very hot here. As for the systemd unit file, which on TW is:
/usr/lib/systemd/system/thermald.service.
The adaptive option seems to not make the service stop so i left it as is and just added the polling option, even though i have no idea what it does but i suspect that for me personally i wont see much of a difference.

Anyways, I’m choosing to expand on this as well for anyone that may just experience this issue, and i suspect a lot of people are AFAIK, these alder lake chips are very hot. This may indeed be normal for the type of chip it is but i personally don’t feel comfortable with it being so hot on a laptop. I think something like this can be managed with some type of kernel patch? don’t know, but thank you for writing this post I really appreciate it! :smile:

PS: This heat issue is the same on Fedora