Discussion:
High CPU temperature and high fans level
(too old to reply)
David Demelier
2016-07-16 22:06:07 UTC
Permalink
Hello,

I was trying FreeBSD 10.3 on my laptop (hp probook 4510s) and was surprised
to see high CPU temperature and fans running high.

No apps running, I get a temperature of 57C in dev.cpu.x.temperature and
fans run high (not able to get rpms).

On a 4.6.3 Linux distro I get an average of 48C and fans are quite low.

Both tests were kept in tty. No Xorg running just a boot and user login in
console.

Do you have any clue?

Regards

David.
Polytropon
2016-07-16 22:25:08 UTC
Permalink
Post by David Demelier
Hello,
I was trying FreeBSD 10.3 on my laptop (hp probook 4510s) and was surprised
to see high CPU temperature and fans running high.
No apps running, I get a temperature of 57C in dev.cpu.x.temperature and
fans run high (not able to get rpms).
On a 4.6.3 Linux distro I get an average of 48C and fans are quite low.
Both tests were kept in tty. No Xorg running just a boot and user login in
console.
Do you have any clue?
Did you enable powerd? It can slow down the CPU when the system
is idle, and increase the CPU speed when needed. This should have
an effect on CPU temperature and fan speed.
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
Yubin Ruan
2016-07-16 23:36:09 UTC
Permalink
Post by Polytropon
Post by David Demelier
Hello,
I was trying FreeBSD 10.3 on my laptop (hp probook 4510s) and was surprised
to see high CPU temperature and fans running high.
No apps running, I get a temperature of 57C in dev.cpu.x.temperature and
fans run high (not able to get rpms).
On a 4.6.3 Linux distro I get an average of 48C and fans are quite low.
Both tests were kept in tty. No Xorg running just a boot and user login in
console.
Do you have any clue?
Did you enable powerd? It can slow down the CPU when the system
is idle, and increase the CPU speed when needed. This should have
an effect on CPU temperature and fan speed.
How to check whether the powerd configuration is right ?

thanks,
Ruan.
Erich Dollansky
2016-07-17 03:07:56 UTC
Permalink
Hi,

On Sun, 17 Jul 2016 07:36:09 +0800
Post by Yubin Ruan
Post by Polytropon
Post by David Demelier
Hello,
I was trying FreeBSD 10.3 on my laptop (hp probook 4510s) and was
surprised to see high CPU temperature and fans running high.
No apps running, I get a temperature of 57C in
dev.cpu.x.temperature and fans run high (not able to get rpms).
On a 4.6.3 Linux distro I get an average of 48C and fans are quite
low.
Both tests were kept in tty. No Xorg running just a boot and user
login in console.
Do you have any clue?
Did you enable powerd? It can slow down the CPU when the system
is idle, and increase the CPU speed when needed. This should have
an effect on CPU temperature and fan speed.
How to check whether the powerd configuration is right ?
you need something like

powerd_enable="YES"
powerd_flags="-a hiadaptive -b hiadaptive" # set CPU frequency

in /etc/rc.conf

Check the manual for the possible flags. This are settings which do not
provide the best result on a typical desktop but are a good start.

Erich
David Demelier
2016-07-17 09:59:32 UTC
Permalink
Post by Polytropon
Post by David Demelier
Hello,
I was trying FreeBSD 10.3 on my laptop (hp probook 4510s) and was surprised
to see high CPU temperature and fans running high.
No apps running, I get a temperature of 57C in dev.cpu.x.temperature and
fans run high (not able to get rpms).
On a 4.6.3 Linux distro I get an average of 48C and fans are quite low.
Both tests were kept in tty. No Xorg running just a boot and user login in
console.
Do you have any clue?
Did you enable powerd? It can slow down the CPU when the system
is idle, and increase the CPU speed when needed. This should have
an effect on CPU temperature and fan speed.
Yes, I had powerd enabled, I tried -a adaptive, -a hiadaptive as
suggested by Erich but it seems that only -a min has some little
effect. I could get a temperature of 52C. I've tested back on Linux
and I got an average much lower (41C).

By the way the other sensors in hw.acpi.tz* are also much higher than
Linux (using lm_sensors). The highest value is my tz5 which is at 78C
almost 5 seconds after boot while the maximum tz value in Linux
sensors is 55.

I have no idea what's wrong. :(
--
Demelier David
William A. Mahaffey III
1970-01-01 00:00:00 UTC
Permalink
Post by David Demelier
Post by Polytropon
Post by David Demelier
Hello,
I was trying FreeBSD 10.3 on my laptop (hp probook 4510s) and was surprised
to see high CPU temperature and fans running high.
No apps running, I get a temperature of 57C in dev.cpu.x.temperature and
fans run high (not able to get rpms).
On a 4.6.3 Linux distro I get an average of 48C and fans are quite low.
Both tests were kept in tty. No Xorg running just a boot and user login in
console.
Do you have any clue?
Did you enable powerd? It can slow down the CPU when the system
is idle, and increase the CPU speed when needed. This should have
an effect on CPU temperature and fan speed.
Yes, I had powerd enabled, I tried -a adaptive, -a hiadaptive as
suggested by Erich but it seems that only -a min has some little
effect. I could get a temperature of 52C. I've tested back on Linux
and I got an average much lower (41C).
By the way the other sensors in hw.acpi.tz* are also much higher than
Linux (using lm_sensors). The highest value is my tz5 which is at 78C
almost 5 seconds after boot while the maximum tz value in Linux
sensors is 55.
I have no idea what's wrong. :(
I have had issues w/ FreeBSD apparently not reporting accurate temps on
this box, AMD jaguar desktop, FreeBSD 9.3R. YMMV & all that rot ....
--
William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.
Arthur Chance
2016-07-17 15:44:26 UTC
Permalink
Post by William A. Mahaffey III
Post by David Demelier
Post by Polytropon
Post by David Demelier
Hello,
I was trying FreeBSD 10.3 on my laptop (hp probook 4510s) and was
surprised
to see high CPU temperature and fans running high.
No apps running, I get a temperature of 57C in dev.cpu.x.temperature
and
fans run high (not able to get rpms).
On a 4.6.3 Linux distro I get an average of 48C and fans are quite low.
Both tests were kept in tty. No Xorg running just a boot and user
login in
console.
Do you have any clue?
Did you enable powerd? It can slow down the CPU when the system
is idle, and increase the CPU speed when needed. This should have
an effect on CPU temperature and fan speed.
Yes, I had powerd enabled, I tried -a adaptive, -a hiadaptive as
suggested by Erich but it seems that only -a min has some little
effect. I could get a temperature of 52C. I've tested back on Linux
and I got an average much lower (41C).
By the way the other sensors in hw.acpi.tz* are also much higher than
Linux (using lm_sensors). The highest value is my tz5 which is at 78C
almost 5 seconds after boot while the maximum tz value in Linux
sensors is 55.
I have no idea what's wrong. :(
I have had issues w/ FreeBSD apparently not reporting accurate temps on
this box, AMD jaguar desktop, FreeBSD 9.3R. YMMV & all that rot ....
Ditto. This is a small and old Atom based Zotac system running 10.2:

***@zotac:0# sysctl dev.cpu|grep temperature
dev.cpu.3.temperature: 24.0C
dev.cpu.2.temperature: 24.0C
dev.cpu.1.temperature: 27.0C
dev.cpu.0.temperature: 27.0C

The digital thermometer right next to it is reporting 33.9C in my office
(we're having a hot spell by our standards). There's no way the CPU can
be colder than the ambient temperature.
--
Moore's Law of Mad Science: Every eighteen months, the minimum IQ
necessary to destroy the world drops by one point.
William A. Mahaffey III
1970-01-01 00:00:00 UTC
Permalink
Post by Arthur Chance
Post by William A. Mahaffey III
Post by David Demelier
Post by Polytropon
Post by David Demelier
Hello,
I was trying FreeBSD 10.3 on my laptop (hp probook 4510s) and was
surprised
to see high CPU temperature and fans running high.
No apps running, I get a temperature of 57C in dev.cpu.x.temperature
and
fans run high (not able to get rpms).
On a 4.6.3 Linux distro I get an average of 48C and fans are quite low.
Both tests were kept in tty. No Xorg running just a boot and user
login in
console.
Do you have any clue?
Did you enable powerd? It can slow down the CPU when the system
is idle, and increase the CPU speed when needed. This should have
an effect on CPU temperature and fan speed.
Yes, I had powerd enabled, I tried -a adaptive, -a hiadaptive as
suggested by Erich but it seems that only -a min has some little
effect. I could get a temperature of 52C. I've tested back on Linux
and I got an average much lower (41C).
By the way the other sensors in hw.acpi.tz* are also much higher than
Linux (using lm_sensors). The highest value is my tz5 which is at 78C
almost 5 seconds after boot while the maximum tz value in Linux
sensors is 55.
I have no idea what's wrong. :(
I have had issues w/ FreeBSD apparently not reporting accurate temps on
this box, AMD jaguar desktop, FreeBSD 9.3R. YMMV & all that rot ....
dev.cpu.3.temperature: 24.0C
dev.cpu.2.temperature: 24.0C
dev.cpu.1.temperature: 27.0C
dev.cpu.0.temperature: 27.0C
The digital thermometer right next to it is reporting 33.9C in my office
(we're having a hot spell by our standards). There's no way the CPU can
be colder than the ambient temperature.
Word dat, my observations exactly ....
--
William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.
Ian Smith
2016-07-18 13:41:25 UTC
Permalink
In freebsd-questions Digest, Vol 632, Issue 8, Message: 21
Post by David Demelier
Post by Polytropon
Post by David Demelier
Hello,
I was trying FreeBSD 10.3 on my laptop (hp probook 4510s) and was surprised
to see high CPU temperature and fans running high.
No apps running, I get a temperature of 57C in dev.cpu.x.temperature and
fans run high (not able to get rpms).
On a 4.6.3 Linux distro I get an average of 48C and fans are quite low.
Both tests were kept in tty. No Xorg running just a boot and user login in
console.
Do you have any clue?
Did you enable powerd? It can slow down the CPU when the system
is idle, and increase the CPU speed when needed. This should have
an effect on CPU temperature and fan speed.
Yes, I had powerd enabled, I tried -a adaptive, -a hiadaptive as
suggested by Erich but it seems that only -a min has some little
effect. I could get a temperature of 52C. I've tested back on Linux
and I got an average much lower (41C).
We really need to see what speed the CPU is running at when idle.

I think the fans running high - presumably from the sound and airflow? -
rules out the sort of sensor errors Arthur reported (ie below ambient :)
and I assume the box actually feels warmer .. 57C suggests a busy CPU or
two .. but then it is summer there; what background ambient temp. range?
Post by David Demelier
By the way the other sensors in hw.acpi.tz* are also much higher than
Linux (using lm_sensors). The highest value is my tz5 which is at 78C
almost 5 seconds after boot while the maximum tz value in Linux
sensors is 55.
I have no idea what's wrong. :(
Normally I'd suggest posting this to freebsd-mobile@ as it's not been
such an uncommon issue, especially with some makes/models, but you could
try showing these to see if anyone spots something strange:

% sysctl hw.acpi
% sysctl debug.acpi
% sysctl dev.est # assuming intel? if not, maybe dev.hwpstate?
% sysctl dev.cpu # best while idle, maybe plus when busier

A small script you can run at times showing a few useful sysctls related
to CPU speed, load, states, and relevant temperatures can be handy. Here:

***@x200:/var/log % x200stat
Mon Jul 18 23:10:33 AEST 2016 dev.cpu.0.freq: 800
0.00% 0.61% 99.38% last 321us { 0.01 0.01 0.00 }
0.00% 0.94% 99.04% last 277us { HPET one-shot }
dev.acpi_ibm.0.thermal: 44 43 -1 44 34 -1 32 -1
hw.acpi.thermal.tz0.temperature: 44.0C tz1: 42.0C
dev.acpi_ibm.0.fan_level: 0 _speed: 3354
high capacity: 97% time: unknown
rate: 0 mW voltage: 12394 mV

but dev.cpu.0.freq, load averages and relevant TZ temps are the main
thing for watching what powerd is doing under different sort of loads.

The above, less longwinded parsing of acpiconf -i0 for battery data, is:

#!/bin/sh
# x200stat smithi freebsd 9+ 2 CPUs # last polished 7/12/15
SN="sysctl -n"; t=' ' # a tab # backtick haters need not apply
[ `$SN kern.eventtimer.periodic` -eq 1 ] && p=periodic || p=one-shot
echo -n "`date` "; sysctl dev.cpu.0.freq
echo "`$SN dev.cpu.0.cx_usage`${t}`$SN vm.loadavg`"
echo "`$SN dev.cpu.1.cx_usage`${t}{ `$SN kern.eventtimer.timer` $p }"
sysctl dev.acpi_ibm.0.thermal
echo -n "`sysctl hw.acpi.thermal.tz0.temperature`"
echo "${t}tz1: `$SN hw.acpi.thermal.tz1.temperature`"
echo -n "`sysctl dev.acpi_ibm.0.fan_level`"
echo "${t}_speed: `$SN dev.acpi_ibm.0.fan_speed`"
[..]

cheers, Ian
David Demelier
2016-07-20 10:46:32 UTC
Permalink
Post by Ian Smith
In freebsd-questions Digest, Vol 632, Issue 8, Message: 21
Post by David Demelier
Post by Polytropon
Post by David Demelier
Hello,
I was trying FreeBSD 10.3 on my laptop (hp probook 4510s) and was surprised
to see high CPU temperature and fans running high.
No apps running, I get a temperature of 57C in dev.cpu.x.temperature and
fans run high (not able to get rpms).
On a 4.6.3 Linux distro I get an average of 48C and fans are quite low.
Both tests were kept in tty. No Xorg running just a boot and user login in
console.
Do you have any clue?
Did you enable powerd? It can slow down the CPU when the system
is idle, and increase the CPU speed when needed. This should have
an effect on CPU temperature and fan speed.
Yes, I had powerd enabled, I tried -a adaptive, -a hiadaptive as
suggested by Erich but it seems that only -a min has some little
effect. I could get a temperature of 52C. I've tested back on Linux
and I got an average much lower (41C).
We really need to see what speed the CPU is running at when idle.
I think the fans running high - presumably from the sound and airflow? -
rules out the sort of sensor errors Arthur reported (ie below ambient :)
and I assume the box actually feels warmer .. 57C suggests a busy CPU or
two .. but then it is summer there; what background ambient temp. range?
We have air-conditioning at work so ambient temperature is normal,
somewhat between 24-28.
Post by Ian Smith
Post by David Demelier
By the way the other sensors in hw.acpi.tz* are also much higher than
Linux (using lm_sensors). The highest value is my tz5 which is at 78C
almost 5 seconds after boot while the maximum tz value in Linux
sensors is 55.
I have no idea what's wrong. :(
such an uncommon issue, especially with some makes/models, but you could
% sysctl hw.acpi
% sysctl debug.acpi
% sysctl dev.est # assuming intel? if not, maybe dev.hwpstate?
% sysctl dev.cpu # best while idle, maybe plus when busier
Thanks for your answer, here I posted the output of the sysctl variables
you asked for:

http://markand.fr/files/result.txt

I've ran them on a FreeBSD memstick, I needed to install a Linux distro
until I can find a solution because this drains my battery a lot.

The average temperature was 50C, a bit less than the installed version
on hard drive where I have seen higher values. This is interesting. I
will double check if something else makes the CPU more busy.

Regards,
--
David Demelier
Ian Smith
2016-07-20 13:20:11 UTC
Permalink
Post by Ian Smith
In freebsd-questions Digest, Vol 632, Issue 8, Message: 21
On Sun, 17 Jul 2016 11:59:32 +0200 David Demelier
Post by David Demelier
Post by Polytropon
Post by David Demelier
Hello,
I was trying FreeBSD 10.3 on my laptop (hp probook 4510s) and was surprised
to see high CPU temperature and fans running high.
No apps running, I get a temperature of 57C in dev.cpu.x.temperature and
fans run high (not able to get rpms).
On a 4.6.3 Linux distro I get an average of 48C and fans are quite low.
Both tests were kept in tty. No Xorg running just a boot and user login in
console.
Do you have any clue?
Did you enable powerd? It can slow down the CPU when the system
is idle, and increase the CPU speed when needed. This should have
an effect on CPU temperature and fan speed.
Yes, I had powerd enabled, I tried -a adaptive, -a hiadaptive as
suggested by Erich but it seems that only -a min has some little
effect. I could get a temperature of 52C. I've tested back on Linux
and I got an average much lower (41C).
We really need to see what speed the CPU is running at when idle.
I think the fans running high - presumably from the sound and airflow? -
rules out the sort of sensor errors Arthur reported (ie below ambient :)
and I assume the box actually feels warmer .. 57C suggests a busy CPU or
two .. but then it is summer there; what background ambient temp. range?
We have air-conditioning at work so ambient temperature is normal, somewhat
between 24-28.
Ok, just checking. So the temperatures are indeed obviously excessive.
Post by Ian Smith
Post by David Demelier
By the way the other sensors in hw.acpi.tz* are also much higher than
Linux (using lm_sensors). The highest value is my tz5 which is at 78C
Isn't that tz2? tz5 is only 55C in your listing (and not active), but
tz2 is indeed 78C and working the fan moderately hard.
Post by Ian Smith
Post by David Demelier
almost 5 seconds after boot while the maximum tz value in Linux
sensors is 55.
I have no idea what's wrong. :(
% sysctl hw.acpi
% sysctl debug.acpi
% sysctl dev.est # assuming intel? if not, maybe dev.hwpstate?
% sysctl dev.cpu # best while idle, maybe plus when busier
Thanks for your answer, here I posted the output of the sysctl variables you
http://markand.fr/files/result.txt
Thanks, that's a useful format. Well, a couple of things ..
I've ran them on a FreeBSD memstick, I needed to install a Linux distro until
I can find a solution because this drains my battery a lot.
But did you start powerd after the memstick boot? From the CPU speed,
assuming it was generally idle, I suspect not?

The big surprise is that CPU frequency (at least when you asked) is at
maximum (except for Turboboost mode) and that it's only using C1 state
when halted. C2 and C3 states provide a huge win for power consumption
- and so proportionally less heat. Alexander takes it to the limit at:
https://wiki.freebsd.org/TuningPowerConsumption

hw.acpi.cpu.cx_lowest: C1 # the 'master setting' for cx_lowest

# ==> sysctl dev.cpu
dev.cpu.1.cx_usage: 100.00% 0.00% 0.00% last 14427us
dev.cpu.1.cx_lowest: C1
dev.cpu.1.cx_supported: C1/1/1 C2/2/1 C3/3/162
[..]
dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 13756us
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_supported: C1/1/1 C2/2/1 C3/3/162
dev.cpu.0.freq_levels: 2101/35000 2100/35000 1600/23888 1200/15000
dev.cpu.0.freq: 2100

Also noted that it's running on battery (which is good for this purpose)
hw.acpi.acline: 0
hw.acpi.battery.info_expire: 5
hw.acpi.battery.units: 1
hw.acpi.battery.state: 1
hw.acpi.battery.time: 91 # can likely be doubled of better
hw.acpi.battery.life: 79
The average temperature was 50C, a bit less than the installed version on
hard drive where I have seen higher values. This is interesting. I will
double check if something else makes the CPU more busy.
Well you need to duplicate basic conditions when booted from memstick;
after boot, as root you should be able to:

# service powerd onestart
# sysctl hw.acpi.cpu.cx_lowest=Cmax

and then observe dev.cpu.0.freq and dev.cpu.0.cx_usage ..

Though whenever you plug it in, or unplug it, you'll have to set the
sysctl again, unless you update the settings in /etc/rc.conf (possible?)

Which should a) have it drop back to 1200 MHz and b) allow it to use C2
and probably C3 .. you might check dmesg for any mention of 'C2' or 'C3'
as certain combinations of chosen timecounter can limit C3 or even C2
use, and will say so (usually to do with use of the TSC as timecounter)

On 9.3 one still had to explicily set these:
!grep cx /etc/defaults/rc.conf
performance_cx_lowest="HIGH" # Online CPU idle state
economy_cx_lowest="HIGH" # Offline CPU idle state
!grep cx /etc/rc.conf
performance_cx_lowest=C3
economy_cx_lowest=C3

But on head sources from a couple of months ago:
!grep cx /usr/head/src/etc/defaults/rc.conf
performance_cx_lowest="C2" # Online CPU idle state
economy_cx_lowest="Cmax" # Offline CPU idle state

So you might want to check what is there for 10.3? Setting both 'Cmax'
(or at least to C2) should be safe, the head defaults above are likely
more conservative for a few boxes that aren't happy with C3 and higher.

If that works, with powerd running CPU at 1200 MHz, it should save lots
of power and run plenty cooler. Good luck!

Warner Losh has suggested disabling Turbo mode on these if having heat
problems, by adding (in your case) '-M 2100' to powerd_flags, but that
might be something for later. Meanwhile go for C2 and C3+ if possible.

As for fans, tz2 and tz0 are the only ones with 'active' cooling, though
tz2 is the only one also with passive cooling, so is most probably the
CPU/s - see acpi_thermal(4).

This one doesn't turn on passive cooling (ie slowing the CPU) until only
3C below critical shutdown temperature, which seems a bit close to me.

At that moment it was above 45C and below 62C, so running at level 3.

hw.acpi.thermal.tz2._TSP: 300
hw.acpi.thermal.tz2._TC2: 2
hw.acpi.thermal.tz2._TC1: 1
hw.acpi.thermal.tz2._ACx: 84.0C 74.0C 62.0C 45.0C 38.0C 30.0C -1 -1 -1 -1
hw.acpi.thermal.tz2._CRT: 108.0C
hw.acpi.thermal.tz2._HOT: -1
hw.acpi.thermal.tz2._PSV: 105.0C
hw.acpi.thermal.tz2.thermal_flags: 0
hw.acpi.thermal.tz2.passive_cooling: 1
hw.acpi.thermal.tz2.active: 3
hw.acpi.thermal.tz2.temperature: 53.0C

This fan is also active at level 3 (0-based, so above 72C, with 3 higher
speeds to go). It can be hard to tell what TZ matches what 'device'.

hw.acpi.thermal.tz0._TSP: -1
hw.acpi.thermal.tz0._TC2: -1
hw.acpi.thermal.tz0._TC1: -1
hw.acpi.thermal.tz0._ACx: 105.0C 96.0C 87.0C 72.0C 64.0C 57.0C 30.0C -1 -1 -1
hw.acpi.thermal.tz0._CRT: 108.0C
hw.acpi.thermal.tz0._HOT: -1
hw.acpi.thermal.tz0._PSV: -1
hw.acpi.thermal.tz0.thermal_flags: 0
hw.acpi.thermal.tz0.passive_cooling: 0
hw.acpi.thermal.tz0.active: 3
hw.acpi.thermal.tz0.temperature: 78.0C

That one seems pretty high. I'd suspect the GPU(/s?) but you're not
running X, so hmmm .. definitely not CPU though.

cheers, Ian

Loading...