Debian on mac mini: Core temperature above threshold, cpu clock throttled

root's picture

Seeing this when running dmesg?

[521157.397833] CPU6: Core temperature above threshold, cpu clock throttled (total events = 27113)
[521157.397834] CPU2: Core temperature above threshold, cpu clock throttled (total events = 27113)
[521157.397836] CPU1: Package temperature above threshold, cpu clock throttled (total events = 27528)
[521157.397837] CPU5: Package temperature above threshold, cpu clock throttled (total events = 27528)
[521157.397839] CPU7: Package temperature above threshold, cpu clock throttled (total events = 27528)
[521157.397841] CPU0: Package temperature above threshold, cpu clock throttled (total events = 27528)
[521157.397842] CPU4: Package temperature above threshold, cpu clock throttled (total events = 27528)
[521157.397843] CPU3: Package temperature above threshold, cpu clock throttled (total events = 27528)
[521157.397844] CPU2: Package temperature above threshold, cpu clock throttled (total events = 27528)
[521157.397846] CPU6: Package temperature above threshold, cpu clock throttled (total events = 27528)
[521157.398864] CPU6: Core temperature/speed normal
[521157.398865] CPU2: Core temperature/speed normal
[521157.398866] CPU0: Package temperature/speed normal
[521157.398866] CPU7: Package temperature/speed normal
[521157.398867] CPU3: Package temperature/speed normal
[521157.398868] CPU4: Package temperature/speed normal
[521157.398869] CPU1: Package temperature/speed normal
[521157.398870] CPU5: Package temperature/speed normal
[521157.398870] CPU2: Package temperature/speed normal
[521157.398871] CPU6: Package temperature/speed normal

Well, If you know you computer is dust free and your fans are working correctly, probably your linux does not run the fan(s) at the correct speed while under load. At least this is what I have discovered on my mac mini with debian buster on it.

But before deciding on the "cure", you need to be able to reproduce the situation so must install first some stress testing tools and there are many available: stress, sysbench, etc.
You can try those or choose another one with a weird name: s-tui.

S-TUI

What is nice about this piece of software is that you have two things in one: a monitoring tool which shows you not only CPU speed and load but also the power usage, and a stress test mode. All this in one very nice text mode inteface. more to read on git page

Installation:

# apt install s-tui
Once installed, I reproduced the throttling. The software is pretty intuitive but if you can't figure out how to work with it, go to their website.

Next nice piece of software suitable for my needs is mbpfan.

MBPFan

This is a fan control daemon for Apple Macbooks but mac mini is a sort of laptop in a tiny box so it works the same.

Installed that one too:

# apt install mbpfan

As soon as installed, it started up and in my case already properly configured:

21:48:17 root@eeny:~# ps -ef|grep -i mbpfan
root     20404     1  0 21:48 ?        00:00:00 /usr/sbin/mbpfan -f

22:12:28 root@eeny:~# cat /etc/mbpfan.conf 
[general]
# see https://ineed.coffee/3838/a-beginners-tutorial-for-mbpfan-under-ubuntu for the values
min_fan_speed = 2000	# put the *lowest* value of "cat /sys/devices/platform/applesmc.768/fan*_min"
max_fan_speed = 6200	# put the *highest* value of "cat /sys/devices/platform/applesmc.768/fan*_max"
low_temp = 63			# try ranges 55-63, default is 63
high_temp = 66			# try ranges 58-66, default is 66
max_temp = 86			# take highest number returned by "cat /sys/devices/platform/coretemp.*/hwmon/hwmon*/temp*_max", divide by 1000
polling_interval = 7	# default is 7 seconds

This time, during the stress test, the throttling messages in dmesg were no more and the fan was speeding wild, as it should under load. Problem solved!

At the end

Forgot to mentioned: both packages rely on sensors and a well known software for that is lm-sensors:

lm-sensors/stable,now 1:3.5.0-3 amd64 [installed,automatic]
  utilities to read temperature/voltage/fan sensors

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root