WARNING: the system temperature is too high, and the system shuts down!

It's amazing the difference between one hardware and another.
40 is the lowest I get and only on FreeBSD

In my case 52 ºC at a room temperature of 17 ºC only xon Xterm open, if you add YouTube it rises to 63 ºC maximum.

Linux distro tend to press more pressure on my CPU.

Here it's the opposite, 40 ºC and forcing with Chromium, videos or compiling a file, the maximum 55º C and only the fun/fan starts working as soon as it reaches 49/50 ºC

I hate summer too!

+1 → I hate summer :(
 
  • Like
Reactions: a6h
judd I forgot to mention: My windows manager is x11-wm/i3 and it's very low CPU usage.
On Linux temperature: I didn't test many Linux distros, but as far as I remember Arch Linux was as good as FreeBSD in term of CPU usage and temperature. I guess it has something to do with windows manager. On both of them I had i3 for windows manager and a few light-weight programs, mostly text-based. I should mention that my observations are completely anecdotal.
 
judd I forgot to mention: My windows manager is x11-wm/i3 and it's very low CPU usage.
On Linux temperature: I didn't test many Linux distros, but as far as I remember Arch Linux was as good as FreeBSD in term of CPU usage and temperature. I guess it has something to do with windows manager. On both of them I had i3 for windows manager and a few light-weight programs, mostly text-based. I should mention that my observations are completely anecdotal.

I agree, it's mostly about what WM/DE is used. I use Devuan (which is really just Debian without systemd) quite regularly and my setup is basically always idle unless some resource intensive process is involved (youtube and so on). If i was running Gnome/KDE/whatever things would likely look different.
 
Perhaps just instruct powerd to keep it at a lower clock speed. It will take longer to compile the ports but it will actually compile the ports rather than shutting down.
I have no idea, looking at the information you posted, what would be the procedure?

To control the CPU frequency on a capable hardware, you can use powerd(8).

First, get the supported frequencies at which your CPU can run.
sysctl -a | grep freq_levels

On my machine, it returns this.
dev.cpu.0.freq_levels: 2200/35000 1600/23000 1200/15000

The frequencies here are 2200, 1600 and 1200.

I can set the maximum frequency to 1200 MHz by this command.
powerd -M 1200

You can limit the CPU frequency on boot by running these commands which modifies /etc/rc.conf.
sysrc powerd_enable=YES
sysrc powerd_flags='-M 1200'
 
I like to have manual control over CPU clock. This is my procedure. The script part is very amateurish (it's even not a script IMHO!) and you should write a well-though one for yourself. I just wanted to present you the whole shebang.
Personal setting/script for my Intel64:

/boot/loader.conf
Code:
coretemp_load="YES"
[...]
In general, kernel modules not needed to boot the system should be loaded via rc.conf(5)'s kld_list, and not in loader.conf(8). Some modules refuse to be loaded after boot, but this one does load fine: sysrc kld_list+=" coretemp"
Why don't you let powerd(8) do the frequency scaling?
 
Why don't you let powerd(8) do the frequency scaling?
I've performed A/B test on powerd(8) and sysctl.conf(5). The powerd(8) provides good optimisation, but even when I set its flags/options to -a minimum or -f 800 I don't get a steady 800 GHz CPU frequency. When CPU works harder, frequency goes higher (of course not to the max). When I add dev.cpu.0.freq=800 to the sysctl.conf(5), or execute it manually in the terminal sysctl dev.cpu.0.freq=800 I get an exact 800 GHz frequency regardless of the CPU usage. I know it is inefficient but I have no choice but to steak to lowest frequency. Because any frequency, more than [800, 1200] GHZ causes [75, ∞) degrees CPU overheat!
 
CPU overheat (75, ∞) degrees!

Wasn't there some old Pentium/Celeron CPUs at some point where 100C was still within an acceptable range and actually seeing those temperatures wasn't even that uncommon? Not saying that would be something i'd tolerate in a laptop. My X220 gets hot enough as is and it's CPU won't even go near 100C. The idea of having a laptop sitting on my lap with it's CPU running at 100C doesn't seem all that comfortable.
 
  • Like
Reactions: a6h
I have sysrc -e powerd_flags: powerd_flags="-a adp -n adp -i 70 -r 95" and that's doing fine... In my /etc/csh.alias:
Code:
alias freq      sysctl dev.cpu.{{0,1,2,3}.cx_usage,0.freq}
alias temp      sysctl hw.acpi.thermal.tz0.temperature dev.cpu.{0,1,2,3}.temperature
EDIT The latter requires the coretemp(4) kernel module: kldload coretemp & sysrc kld_list+=" coretemp"
You could set sysctl hw.acpi.thermal.user_override and lower the thermal setpoints. Maybe echo hw.acpi.thermal.tz0.passive_cooling=\"1\" >>/boot/loader.conf is needed for that to work. RTFM acpi_thermal(4).
 
Last edited:
  • Like
Reactions: a6h
You could set sysctl hw.acpi.thermal.user_override and lower the thermal setpoints. Maybe echo hw.acpi.thermal.tz0.passive_cooling=\"1\" >>/boot/loader.conf is needed for that to work. RTFM acpi_thermal(4).
Thanks mjollnir I will try it.

Wasn't there some old Pentium/Celeron CPUs at some point where 100C was still within an acceptable range and actually seeing those temperatures wasn't even that uncommon?
I remember, Celeron was working at very high temperature. I saw laptops (Intel CPU), constantly working at 70-80 range for many years, and they are still doing fine. I'm too cautious to operate laptops! Frankly I decided to go back to PC (regular desktop).

I saw peculiar articles on the internet, talking about 30-40 degrees. They are all bogus IMHO! Even in the idle state. Intel CPUs have high tolerance to the high temperature. There's good information on thermal monitoring and protection, on intel site: refer to Vol. 3B / Section 14.8 of Intel arch/dev manual:


  • 14.8.1 Catastrophic Shutdown Detector:
    P6 family processors introduced a thermal sensor that acts as a catastrophic shutdown detector. [...] When processor core temperature reaches a factory preset level, the sensor trips and processor execution is halted until after the next reset cycle.
  • 14.8.5.2 Reading the Digital Sensor:
    When Critical Temperature Status bit is set, the processor is operating at a critical temperature and immediate shutdown of the system should occur.
 
To control the CPU frequency on a capable hardware, you can use powerd(8).

First, get the supported frequencies at which your CPU can run.
sysctl -a | grep freq_levels

On my machine, it returns this.
dev.cpu.0.freq_levels: 2200/35000 1600/23000 1200/15000

The frequencies here are 2200, 1600 and 1200.

I can set the maximum frequency to 1200 MHz by this command.
powerd -M 1200

You can limit the CPU frequency on boot by running these commands which modifies /etc/rc.conf.
sysrc powerd_enable=YES
sysrc powerd_flags='-M 1200'

Hello Nathan Whoa

Can you help me set a frequency and not burn out the CPU? Following what you say, the output frequency is:

$ sysctl -a | grep freq_levels
Code:
dev.cpu.0.freq_levels: 2534/25000 2533/25000 2399/23390 2266/21835 2133/20334 1999/18817 1866/17351 1733/15937 1599/14528 1466/13163 1333/11835 1199/10512
$
vogole said:
Intel CPUs have high tolerance to the high temperature.

Not so, you see how tolerant this CPU is from Intel and it goes up when it tries to compile at 100% automatically turning off the laptop without finishing the task, I think the ones with tolerance are the AMD Ryzen CPUs.
 
Not so, you see how tolerant this CPU is from Intel and it goes up when it tries to compile at 100% automatically turning off the laptop without finishing the task, I think the ones with tolerance are the AMD Ryzen CPUs.
I think there may still be a cooling issue with your hardware/CPU (from the start of this thread).

You might not be triggering the behaviour in Linux/Windows because you aren't pushing the CPU as hard with them as you have been with FreeBSD, or perhaps they have more aggressive default throttling to keep temperatures down - and what you are doing with the frequencies will help.

Or yes, there might be a FreeBSD bug.

If you can find something that accurately reports the actual CPU temperature (IPMI?) could you set that to log to a file every second (IPMI might be a bit too sluggish for that) and then try and port build into another console and see what sort of temperatures you are getting? You might encounter issues of the file not being updated fast enough (i.e. still buffered) if the shutdown happens quickly, but it might give some indications. I think your previous measurements have been more the ambient/case temperature rather than the CPU.

I've not encountered many thermal issues but when I have it's been down to cooling (lack of) or something I've missed.
 
I think there may still be a cooling issue with your hardware/CPU (from the start of this thread).

You might not be triggering the behaviour in Linux/Windows because you aren't pushing the CPU as hard with them as you have been with FreeBSD, or perhaps they have more aggressive default throttling to keep temperatures down - and what you are doing with the frequencies will help.

Or yes, there might be a FreeBSD bug.

If you can find something that accurately reports the actual CPU temperature (IPMI?) could you set that to log to a file every second (IPMI might be a bit too sluggish for that) and then try and port build into another console and see what sort of temperatures you are getting? You might encounter issues of the file not being updated fast enough (i.e. still buffered) if the shutdown happens quickly, but it might give some indications. I think your previous measurements have been more the ambient/case temperature rather than the CPU.

I've not encountered many thermal issues but when I have it's been down to cooling (lack of) or something I've missed.
The previous publications visualize the temperature outputs of both a CPU with no compiling activity and a CPU with compiling activity. I was amazed to see the temperature rise almost 100% while compiling and the reason why the laptop was automatically turned off. If I am not wrong, the frequency in FreeBSD is said to used the maxime, which does not happen the same with linux or windows.
 
Ah, yes, sorry, I skimmed past the screenshots - was looking in the text. Just under 100 deg C is rather toasty.

Hopefully the frequency tuning helps (and matches what Linux & Windows are doing to prevent thermal overload).

And maybe you are right to point the finger at Intel 🧐 Thought it was their performance-over-security causing issues these days but maybe also too reliant on the OS to handle load-versus-heat? That still seems a bit odd. But then the Raspberry Pi 4 can get itself in quite a bit of trouble with heat, too, but that's definitely going off-topic. 🤐
 
Can you help me set a frequency and not burn out the CPU? Following what you say, the output frequency is:

$ sysctl -a | grep freq_levels
Code:
dev.cpu.0.freq_levels: 2534/25000 2533/25000 2399/23390 2266/21835 2133/20334 1999/18817 1866/17351 1733/15937 1599/14528 1466/13163 1333/11835 1199/10512
$

It’s preferable to set the highest frequency at which the CPU can run without shutting down. Try setting the lowest first with the command.
powerd -M 1199 -v
Hit control-C to stop powerd(8).

You can run powerd(8) as a daemon if you want to. Just remove -v option.
powerd -M 1199
To try with a new frequency, kill the running powerd(8) first.

When powerd(8) is running, compile your port and check the temperature.

You can experiment with higher frequency values or you can set the lowest frequency if you are happy with it despite it taking longer time to compile your port. See if it goes to shut down.

When you get the desired frequency, you can set powerd(8) to run automatically at boot. Set the appropriate frequency there.
You can limit the CPU frequency on boot by running these commands which modifies /etc/rc.conf.
sysrc powerd_enable=YES
sysrc powerd_flags='-M 1200'

And then reboot.

I hope it will work. I have lenovo B450 and it is more than 7 years old. The thermal pads are old and some of them are gone. So I run it with the minimum frequency and it is cool at 50°C-70°C. It’s slow but usable.
 
Back
Top