High temperature and fan speed

powerdxx(8) comes with and is designed to work with loadrec(1) and loadplay(1); also compatible with powerd(8). Together with sysutils/stress you have a lot of tooling to setup testing with objective and reproduceable settings. Perhaps not immediately visible is /usr/local/share/doc/powerdxx/refman.pdf or refman.pdf that bundles all the powerdxx info and some more nicely together. For the programmatically inclined, it also comes with a nice overview of its modular internal structures.

On my very old laptop I could see the powerdxx control restraints immediately kicking in when starting a stress(1) session in one virtual console and a continuous output loop of powerdxx running in the foreground (instead of a daemon) in another virtual console.

[...] "Unlike powerd(8), powerd++ refuses to run if the frequency control driver is known not to allow user control of the CPU frequency (e.g. hwpstate_intel(4) )."
For 12.4-RELEASE there doesn't seem to be a hwpstate_intel(4), but hwpstate_intel(4) is available in 13.1-RELEASE.

When looking at C-states and Linux C-states for comparison, the following may be of interest (although I'm not quite sure how much has been superseded by power consumption mechanisms for modern intel CPUs):
  1. What is the C-State? by Dell
  2. C-States, P-States, S-States – Energieverwaltung erklärt
  3. Controlling Processor C State Usage in Linux - November 2013*
The german article can be comfortably viewed with for example google translate (C-States, P-States, S-States - power management explained). I find the two columns Latency to C0 (german: Latenz zu C0) and power consumption* (Leistungsaufnahme*) especially interesting and relevant, even if it may only serve as an indication for comparison with modern intel CPUs. The article is referenced at Processor P-states and C-states (I couldn't find the original intel article C-states, C-states and even more C-states).

If you didn't have it already, then the Inspiron 15 5510 - Service Manual might come in handy (no BIOS setting for disabling the power of the discrete Nvidia graphics card I'm afraid).

___
* from Test and Tune an RT Kernel
 
I am not so sure. Logging into various Linux and FreeBSD laptops around the house I find nobody in C7.

Tigerlake does (Fujitsu Lifebook):

Code:
 Intel(r) Performance Counter Monitor (2022-10-19 10:53:25 +0200 ID=2ae6316f)

Detected 11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz "Intel(r) microarchitecture codename Tiger Lake" stepping 1 microcode level 0x8a

 Instructions retired:   40 M ; Active cycles:  680 M ; Time (TSC): 3010 Mticks ; C0 (active,non-halted) core residency: 10.88 %

 C1 core residency: 13.09 %; C3 core residency: 0.00 %; C6 core residency: 0.00 %; C7 core residency: 76.03 %;
 C0 package residency: 35.26 %; C2 package residency: 14.08 %; C3 package residency: 50.66 %; C6 package residency: 0.00 %; C7 package residency: 0.00 %; C8 package residency: 0.00 %; C9 package residency: 0.00 %; C10 package residency: 0.00 %;

(from sysutils/intel-pcm)

13.2-STABLE #11[55c5b7b59666=09ae3fe85223+32]

hw.acpi.cpu.cx_lowest=C8


btw: why don't you folks use the intel tool that understands the cpu features?
 
Hello

Not sure if a cause was found in this thread or another one just yet but thought I'd add in my findings.

I have a couple of HP 8760w with Sandy Bridge Intel I7 quad core, 16GB of RAM, SSD etc. - powerd is running and according to i7z appears to be successfully modulating clock speed.

I've experimented running different operating systems on them.

Test: watching a 480p video on YouTube using Firefox.

Mac OS (Monterey) - smoothest - only occasionally turns the CPU fan on, case doesn't get warm at all, can multi-task with ease.
Windows 10 21H2 - still smooth, fan on slow, bit of heat blowing through but handles it fine
(Debian) Linux 12 Sid - perceptively working harder than the other two but still performance is fine
FreeBSD 13.1 Release - seems like it's flat out, moving other windows or using other applications causes the video to chug, eventually the metal laptop case becomes too hot to hold onto comfortably.

Attached (shortly) is a screenshot from the i7z command whilst the video is running on FreeBSD 13.1 after about two minutes of uptime on AC power. I don't understand the values enough to be able to say conclusively that the CPU is running harder than expected given what I consider to be a relatively modest load.

It doesn't personally bother me that FreeBSD runs this way but I thought I'd highlight my findings in case others find it useful.

The laptop uses a NVIDIA Quadro 3000M running the proprietary driver which shares a heatsink with the CPU via separate heat pipes, so it could also be that the graphics card is roasting the CPU a little bit.

Any other thoughts or questions, welcome and appreciated. Thanks
 

Attachments

  • Screenshot at 2023-05-04 20-09-42.png
    Screenshot at 2023-05-04 20-09-42.png
    92.4 KB · Views: 98
I have a Dell Inspiron 15 5510 Laptop and everytime I try a live USB with FreeBSD 13.1 or 14-CURRENT or after a bare metal installation I notice increased fan speed and overheating of my laptop. The cpu temperature rises to 55-65 Celcius at rest.
The same thing happens in Arch linux. Only in Manjaro the idle temperatures are at 30-35 and I am thinking the issue is my Nvidia MX450 GPU.. During the installation I also install the Nvidia driver or even I have this cpu frequency scaling service but the problem continues.
It is the only thing that keeps me from using FreeBSD as a daily driver :(
Your intel chip is running cool. Mine is running at 85C. My AMD gear is running significantly cooler (56C) but AMD places their temperature sensors differently so it's like comparing apples and oranges.

Regarding Manaro vs Arch vs FreeBSD, the raw number reported by the CPU temperature sensors are not the temperature but a value that is input to an algorithm which outputs the temperature. As a matter of fact there are two and sometimes three sensors at different spots on the CPU reporting different values.

Additionally, different models of CPU may require different calculations to convert the raw number to celsius.

BTW, 30-35C is terribly cold for a CPU. I've never seen a CPU run that cold. Could Manjaro be reporting the TZ0 or TZ1 temperature reported by the BIOS, some other value or may be bogus? It might be documented somewhere.
 
It is the only reason that keeps me from using FreeBSD as a daily driver :( :( :( and is really sad.
In Manjaro:
 

Attachments

  • Screenshot_05-10-2023_05:40:20.png
    Screenshot_05-10-2023_05:40:20.png
    246.7 KB · Views: 77
I am with cy@

I am running AMD and like he said
AMD places their temperature sensors differently so it's like comparing apples and oranges.

BTW, 30-35C is terribly cold for a CPU. I've never seen a CPU run that cold. Could Manjaro be reporting the TZ0 or TZ1 temperature reported by the BIOS, some other value or may be bogus? It might be documented somewhere.
I saw this and immediately thought something is off. Laptops NO WAY have that temp, I am in a water-cooled hardware system and my CPU is hitting those numbers like in Manjaro but for a laptop, those are delusional temps. So yes something is wrong with those measurements, to me 45-55C is what temp would be on laptops.

For example my Nvidia GPU (WATER-COOLED) are

Code:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.161.03   Driver Version: 470.161.03   CUDA Version: N/A      |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:08:00.0  On |                  N/A |
|  0%   32C    P0    57W / 250W |   1081MiB / 11178MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  NVIDIA GeForce ...  Off  | 00000000:43:00.0  On |                  N/A |
|  0%   30C    P8    18W / 225W |     96MiB /  7974MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                            
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+
 
Last edited:
Many months later and FreeBSD is not usable in a 11 Gen Intel CPU as it runs 30 degrees hoter in comparison to Linux ..
 
Many months later and FreeBSD is not usable in a 11 Gen Intel CPU as it runs 30 degrees hoter in comparison to Linux ..

Code:
%# freebsd-version 
13.2-RELEASE-p4
% sysctl hw.model
hw.model: 11th Gen Intel(R) Core(TM) i5-11600K @ 3.90GHz
% sysctl dev.cpu | grep temperature
dev.cpu.11.temperature: 36.0C
dev.cpu.9.temperature: 38.0C
dev.cpu.7.temperature: 40.0C
dev.cpu.5.temperature: 36.0C
dev.cpu.3.temperature: 39.0C
dev.cpu.1.temperature: 40.0C
dev.cpu.10.temperature: 38.0C
dev.cpu.8.temperature: 39.0C
dev.cpu.6.temperature: 40.0C
dev.cpu.4.temperature: 38.0C
dev.cpu.2.temperature: 39.0C
dev.cpu.0.temperature: 40.0C

Current load averages: 0.66, 0.70, 0.53


I highly doubt Linux can get the CPU temp under room temperature...
 
Code:
%# freebsd-version
13.2-RELEASE-p4
% sysctl hw.model
hw.model: 11th Gen Intel(R) Core(TM) i5-11600K @ 3.90GHz
% sysctl dev.cpu | grep temperature
dev.cpu.11.temperature: 36.0C
dev.cpu.9.temperature: 38.0C
dev.cpu.7.temperature: 40.0C
dev.cpu.5.temperature: 36.0C
dev.cpu.3.temperature: 39.0C
dev.cpu.1.temperature: 40.0C
dev.cpu.10.temperature: 38.0C
dev.cpu.8.temperature: 39.0C
dev.cpu.6.temperature: 40.0C
dev.cpu.4.temperature: 38.0C
dev.cpu.2.temperature: 39.0C
dev.cpu.0.temperature: 40.0C

Current load averages: 0.66, 0.70, 0.53


I highly doubt Linux can get the CPU temp under room temperature...
yeah but why is FreeBSD so much hot? Do you have any specific settings?
 
You can always go OS independent by booting the Hirens WinPE Boot image with hwmonitor installed.

HWmonitor is under constant development for the latest and greatest processors.
I've used it for many years on all my client machines because it provides a comprehensive analysis that I keep in their client records.
 
Back in post #45 in February:

I tried in /boot/loader.conf:
Code:
machdep.hwpstate_pkg_ctrl=0

and in /etc/sysctl.conf:
Code:
dev.hwpstate_intel.0.epp=100
dev.hwpstate_intel.1.epp=100
dev.hwpstate_intel.2.epp=100
dev.hwpstate_intel.3.epp=100
dev.hwpstate_intel.4.epp=100
dev.hwpstate_intel.5.epp=100
dev.hwpstate_intel.6.epp=100
dev.hwpstate_intel.7.epp=100

We still don't know what the default epp setting (0? 50?) was before modification, on your particular hardware. I think that may be a key to this puzzle.

Eventually I expect someone will write a utility to play with those *.epp settings according to load demand, analogous to how powerd[xx] works with EIST for earlier CPUs.

The temperature decreased 10-15 degrees Celcius in both AC and Battery while using cooling pad and was 45-49 but not exceeding 50.

That's a big win, and those are perfectly respectable idle temperatures, and should not feel unduly warm at all.

The fans were still very loud... But the positive thing is that the temp decreased noticeably.
By no means at Manjaro's level but I thing I am asking a lot at this point haha :)

I think Manjaro is misreporting temps, grossly. See your post #46; there's no way a running CPU could be at 24°C, or even 29° unless the room ambient temp was maybe 10°C or you'd only just turned it on from cold.

The way your laptop drives its fan/s seems perhaps not related to temperature directly, and may be a separate issue.

I should also try this in 13.2-Beta2.
What if I disable Intel Speed Shift in BIOS?

You could try, but that may just be a signal to Windows. The loader tunable seems all you need to enable or disable it - from what we read in hwpstate_intel(4)

You might also see what the per-package setting does?

Anyway, consider the real possibility that Manjaro is lying confused and that 45 to 50°C at idle is fine.

Next, see how it goes doing real work (e.g. building system or ports) or pretend work (like sysutils/stress).
 
Okay guys. So I have a "major" "unexpected" development. I think the issue was the nvidia driver. I have installed the package nvidia-driver but after installing the 470 driver my CPU rungs 5-7 degrees cooler.
I think this time it can be operable.
The reason that sysctl and i7z gave different temperatures could be the involvement of the GPU.
Haven't tested any DE yet, just in console mode ...
 
So the temp now is between 44-48 degrees which is relatively good but the fans are just too loud... In Arch Linux I can have my laptop open 24/7, but I don't think I can do it with FreeBSD

sko can you please provide your whole configuration? I am jealous of your temperatures... What graphic card do you have?
 
sko can you please provide your whole configuration? I am jealous of your temperatures... What graphic card do you have?
as mentioned in my previous post I only have the c-states set to 'Cmax'

No additional graphics card; and I never had one in a laptop, because it IMHO doesn't make any sense to put a power hungry space heater in a laptop. They are meant for mobile computing, i.e. having long battery time and low thermal output that can be handled in such a small/dense form factor...
 
Re post #22 above:

Code:
FreeBSD 12.4-RELEASE r372781 GENERIC amd64
CPU: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz (2594.17-MHz K8-class CPU)

------------------------- on AC power -------------------------

system power profile changed to 'performance'
acpi_acad0: On Line

hw.acpi.cpu.cx_lowest: C8
dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc
dev.cpu.0.cx_usage_counters: 176 27673
dev.cpu.0.cx_usage: 0.63% 99.36% last 11us
dev.cpu.0.cx_lowest: C8
dev.cpu.0.cx_supported: C1/1/1 C2/2/80

root@t430s:~ # i7z
Cpu speed from cpuinfo 2593.00Mhz
cpuinfo might be wrong if cpufreq is enabled. To guess correctly try estimating via tsc
Linux's inbuilt cpu_khz code emulated now
True Frequency (without accounting Turbo) 2593 MHz
  CPU Multiplier 26x || Bus clock frequency (BCLK) 99.73 MHz

Socket [0] - [physical cores=2, logical cores=4, max online cores ever=2]
  TURBO ENABLED on 2 Cores, Hyper Threading ON
  Max Frequency without considering Turbo 2692.73 MHz (99.73 x [27])
  Max TURBO Multiplier (if Enabled) with 1/2/3/4 Cores is  33x/31x/31x/31x
  Real Current Frequency 1209.57 MHz [99.73 x 12.13] (Max of below)
        Core [core-id]  :Actual Freq (Mult.)      C0%   Halt(C1)%  C3 %   C6 %   C7 %  Temp      VCo
        Core 1 [0]:       1209.57 (12.13x)         1    0.265      0    99.6       0    42      0.82
        Core 2 [1]:       1197.65 (12.01x)         1    0.302      0    99.6       0    42      0.82

C0 = Processor running without halting
C1 = Processor running with halts (States >C0 are power saver modes with cores idling)
C3 = Cores running with PLL turned off and core cache turned off
C6, C7 = Everything in C3 + core state saved to last level cache, C7 is deeper than C6
  Above values in table are in percentage over the last 1 sec
[core-id] refers to core-id number in /proc/cpuinfo
'Garbage Values' message printed when garbage values are read
  Ctrl+C to exit

root@t430s:~ # t430stat
Sun Feb 19 15:43:31 AEDT 2023  dev.cpu.0.freq: 1200
cpu0: 1.00% 98.99% last 2584us  41.0C  tz0: 40.1C
cpu1: 1.10% 98.89% last 28840us 40.0C  { 0.06 0.14 0.10 }
cpu2: 1.05% 98.94% last 5182us  48.0C  { LAPIC one-shot }
cpu3: 1.01% 98.98% last 5467us  47.0C  { t.cnt: TSC-low }
dev.acpi_ibm.0.fan: 1 (auto)  _level: 0  _speed: 65535
high            capacity: 94%   time: unknown
rate: 0 mW      voltage: 11975 mV
root@t430s:~ #


------------------------- on battery -------------------------

system power profile changed to 'economy'
acpi_acad0: Off Line

hw.acpi.cpu.cx_lowest: C8
dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.0.cx_usage_counters: 78 18 5640
dev.cpu.0.cx_usage: 1.35% 0.31% 98.32% last 90us
dev.cpu.0.cx_lowest: C8
dev.cpu.0.cx_supported: C1/1/1 C2/2/59 C3/3/87


Cpu speed from cpuinfo 2593.00Mhz
cpuinfo might be wrong if cpufreq is enabled. To guess correctly try estimating via tsc
Linux's inbuilt cpu_khz code emulated now
True Frequency (without accounting Turbo) 2593 MHz
  CPU Multiplier 26x || Bus clock frequency (BCLK) 99.73 MHz

Socket [0] - [physical cores=2, logical cores=4, max online cores ever=2]
  TURBO ENABLED on 2 Cores, Hyper Threading ON
  Max Frequency without considering Turbo 2692.73 MHz (99.73 x [27])
  Max TURBO Multiplier (if Enabled) with 1/2/3/4 Cores is  33x/31x/31x/31x
  Real Current Frequency 1196.72 MHz [99.73 x 12.00] (Max of below)
        Core [core-id]  :Actual Freq (Mult.)      C0%   Halt(C1)%  C3 %   C6 %   C7 %  Temp      VCo
        Core 1 [0]:       1196.72 (12.00x)      1.86    1.58       0       0    97.6    42      0.81
        Core 2 [1]:       1195.83 (11.99x)         1    2.27       0       0    97.6    42      0.81


root@t430s:~ # t430stat
Sun Feb 19 15:54:39 AEDT 2023  dev.cpu.0.freq: 1200
cpu0: 0.36% 0.32% 99.31% last 10416us   42.0C  tz0: 39.1C
cpu1: 0.48% 0.30% 99.20% last 771us     42.0C  { 0.14 0.13 0.09 }
cpu2: 0.37% 0.27% 99.35% last 1752us    45.0C  { LAPIC one-shot }
cpu3: 0.36% 0.22% 99.40% last 840us     45.0C  { t.cnt: TSC-low }
dev.acpi_ibm.0.fan: 1 (auto)  _level: 0  _speed: 65535
discharging     capacity: 91%   time: 2:32
rate: 10527 mW  voltage: 11658 mV
Just for interest, what is 't430stat'? Is that something you wrote?

It's a shame we don't have a port of powertop for freebsd. I know there is powermon, but it only supports sandybridge and later.
 
Just for interest, what is 't430stat'? Is that something you wrote?

Yes. You're welcome, but it's not pretty, and very specific to my T430s and my interests.

Code:
#!/bin/sh
# t430stat 25/7/22, upd 14/9/22, 26/8/23  From original t23 then:
# x200stat smithi freebsd 9+ 2 CPUs    # polished 16-18/11/15 & 7/12/15
# 18/9/15 debug occasional 'unexpected' parsing, dump whole acpiconf -i0
unexp=0
SN="sysctl -n"; s2='  '; t='    ' # a tab
[ `$SN kern.eventtimer.periodic` -eq 1 ] && p=periodic || p=one-shot

echo -n "`date` $t"; sysctl dev.cpu.0.freq
for N in 0 1 2 3; do        # assuming coretemp loaded
    echo -n "cpu${N}:" \
    "`$SN dev.cpu.${N}.cx_usage`${t}`$SN dev.cpu.${N}.temperature`"
    case $N in
        0) echo "${s2}tz0: `$SN hw.acpi.thermal.tz0.temperature`" ;;
        1) echo "${s2}`$SN vm.loadavg`" ;;
        2) echo "${s2}{ `$SN kern.eventtimer.timer` $p }" ;;
        *) echo "${s2}{ t.cnt: `$SN kern.timecounter.hardware` }" ;;
    esac
done

fan=`$SN dev.acpi_ibm.0.fan`
echo -n "dev.acpi_ibm.0.fan: $fan "
[ $fan -eq 1 ] && echo -n "(auto)" || echo -n "MANUAL"
echo -n "   _level: `$SN dev.acpi_ibm.0.fan_level`"
echo    "   _speed: `$SN dev.acpi_ibm.0.fan_speed`"

acpiconf -i0 | egrep 'State|Remain|Present' | xargs echo | \
    {    #(
    next=0; rem=0; pre=0
    for i in `cat -`; do        # working if kinda ugly parsing ..
        if [ $next -gt 0 ]; then
            [ "$i" = "high" ] && i="high$t" # else {,dis}charging
            [ "$i" = "voltage:" ] && echo -n "$t"
            [ $next -eq 2 ] && [ $pre -eq 0 ] && echo -n "$t"
            echo -n "$i "
            [ "$i" = "critical" ] || next=$((next-1))
            continue
        fi
        case $i in
            State:)
            next=1 ;;
            Remaining)
            [ $rem -eq 0 ] && rem=1 && echo -n " "
            next=2 ;;    # capacity: nn% then time: hh:mm
            Present)
            [ $pre -eq 0 ] && pre=1    && echo
            next=3 ;;    # rate: nnnnn mW then voltage: nn mV
            *)
            echo -n " unexpected!: $i " ; unexp=1 ;;
        esac
    done
    }    #) no longer a subshell, so unexp test can work

[ $unexp -eq 0 ] || acpiconf -i0    # debug: dump whole acpiconf
echo
exit 0
 
yeah but why is FreeBSD so much hot? Do you have any specific settings?
What I have found is this is usually ACPI bug. ACPI Thermal reads the wrong sensors or something...
Isn't there an IBM ACPI helper module? acpi_ibm(4)
 
FWIW, I did a bit of testing on my X201 the last couple of days. Its an i5 M250, the clock ranges between 1200 and 2400 MHz, 8 GB RAM, SSD. It idles around 38-40C with the fan hardly on. Under stress (continuous code compilation by parallelized make to show 100% C0 on all cpu's, while simultaneously playing fullscreen video) it goes up to a max of 85C as reported by i7z, and fan maintains that temperature, of course fan is louder then. In normal use fan is barely audible. That is running 14.0-RELEASE. The only settings I have in rc.conf are :-

performance_cx_lowest="Cmax"
economy_cx_lowest="Cmax"

I tried enabling powerdxx, it didn't make any major difference, I observed the same behaviour whether powerdxx is running or not. I used the standard args, ie
powerdxx_flags="-n adaptive -a adaptive -b adaptive -m 1200 -M 2400"

Don't know if that helps at all but might give you a point of comparison. I'm struggling to understand why your fans are so loud compared to when running linux.
 
Back
Top