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 :(
 
What makes you think 55-65°C is 'overheating'? Especially laptop-CPUs usually have a TDP of ~100°C, so anything below that is still fine for the CPU.

this will give you the TJmax of you specific CPU:
Code:
# kldload coretemp
# sysctl dev.cpu.0.coretemp.tjmax

High fan speeds however are another story - with most cases of "my laptop got so lout and hot, can you take a look?" I had to deal with over the years, it was just lots (and LOTS) of dust accumulated in the device. So first advice would be to open up the case and clean out the dust.

There still might be headroom to improve things, e.g. adjusting GPU frequencies or just completely disable the nvidia GPU and use the CPU integrated one. This usually also increases battery runtime by 30%+ and solves most cooling problems.
Tuning powerd(8) and cpufreq(4) can further reduce power usage and hence temperatures.
 
In Manjaro the system runs in 28 degrees Celcius so I think dust is not an issue. Yes I know that TDP is at 100+ but after a point the fans and the heat are counterproductive and annoying. I can not even concentrate with all that noise. And it is constant, there is no point of silence or decreasing temperature. My laptop is always connected to AC so battery life is not a problem. I tried cpufreq many times with no result.

The above mentioned temperatures are with the use of a cooling pad
 

Attachments

  • D83sFa8.jpeg
    D83sFa8.jpeg
    930.1 KB · Views: 201
According to Dell Inspiron 15 5510 you could have either:
  1. i3-1125G4 with iGPU: Intel UHD Graphics
  2. i5-11300H with iGPU: Intel Iris Xe Graphics
  3. i7-11370H with iGPU: Intel Iris Xe Graphics
I don't know which one you have; don't know if graphics/drm-510-kmod supports the Iris Xe graphics, but I think UHD is supported.

You have an iGPU and an Nvidia discrete GPU. "[..] and I am thinking the issue is my Nvidia MX450 GPU": I'd try to eleminate the power & heat build up from the Nvidia by shutting that off, hopefully a BIOS option lets yo do that; next best option is to not load and use the Nvidia driver and use the iGPU i915 driver in graphics/drm-510-kmod. Investigate the results and powerd/powerdxx settings.

When using Nvidia graphics. You've mentioned that you're on AC; it could be that there are BIOS settings for GPU (and probably also CPU) to distinguish between AC and battery operation, usually when on AC, the AC options give the graphics & CPU hardware much more latitude as to power consumption and therefore heat generation.

You've mentioned that with Manjaro all seems to work well temperature wise. FreeBSD isn't perhaps optimally suited for a latop's battery/AC/temperature management right out of the box, you'll have to do some (more) experimenting and tuning. Besides powerd(8), there is sysutils/powerdxx. The article The Power to Serve – FreeBSD Power Management by vermaden contains a lot of info about powerd and powerdxx and their various settings and strengths.
 
11th gen *should* handle most (all?) of the downclocking and deactivation of cores via firmware IIRC. So it *should* not make any difference if you run powerd or not.

You could check for heavy interrupt load that prevents the cores to drop their clockrates via vmstat -i. If there is some interrupt source with excess numbers (i.e. 4+ digit rate at idle), check dmesg for errors/warnings about that device. Maybe you have to override a faulty ASL.
 
What makes you think 55-65°C is 'overheating'? Especially laptop-CPUs usually have a TDP of ~100°C, so anything below that is still fine for the CPU.

I must disagree with you here; 55-65°C at idle is too hot by ~20°C if 30-35°C is available in Manjaro. It's too new for dust as an issue.

It's not just about junction temperatures; heat is the enemy of many electronic and non-e components, plus discomfort and noise.

55-65°C is fine while actually working of course, but most laptops spend most of their time waiting for the next click or keystroke ...

I must admit ignorance of the latest CPUs and their handling of P- and C-states etc, and whether 'traditional' tools like powerd{,++} still make sense in this context.

Here to learn more ...
 
Did you manage to do that? I noted specific instructions in Vermaden's post linked to above about that, but don't know if it works with yours?
I followed these instructions:
Code:
# mkdir /root/bin

# cd /root/bin

# fetch https://people.freebsd.org/~xmj/turn_off_gpu.sh

# pkg install acpi_call

# kldload acpi_call

# chmod +x /root/bin/turn_off_gpu.sh

# /root/bin/turn_off_gpu.sh

I also edited the file /etc/rc.local in order to contain this:

Code:
# DISABLE NVIDIA CARD

  /root/bin/turn_off_gpu.sh

I noticed no difference and I think the script failed. I attach the output (Sorry, could not copy the text output so took a photo instead):
https://i.imgur.com/KnoTikT.jpg
Also running ls -a in /root/bin directory did not show any /root/.gpu_method file.


I uninstalled the Nvidia driver and I only have the iGPU driver: drm-510-kmod and included kld_list="i915kms" in /etc/rc.conf
 
My Nvidia settings in Manjaro are the following but I haven't done any configuration in FreeBSD except from installing the driver and loading it:

Code:
> cat .nvidia-settings-rc
#
# /home/chris/.nvidia-settings-rc
#
# Configuration file for nvidia-settings - the NVIDIA Settings utility
# Generated on Sat Feb 18 18:52:31 2023
#

# ConfigProperties:

RcFileLocale = C
DisplayStatusBar = Yes
SliderTextEntries = Yes
IncludeDisplayNameInConfigFile = No
UpdateRulesOnProfileNameChange = Yes
Timer = PowerMizer_Monitor_(GPU_0),Yes,1000
Timer = Thermal_Monitor_(GPU_0),Yes,1000
Timer = Memory_Used_(GPU_0),Yes,3000

# Attributes:

[GPU:0]/GPUPowerMizerMode=2
 
I must disagree with you here; 55-65°C at idle is too hot by ~20°C if 30-35°C is available in Manjaro.

I am not so sure. Logging into various Linux and FreeBSD laptops around the house I find nobody in C7. A quick google for c7 brings up many threads about Linux not being able to enter C7 for many people.

I also seem to ruin powersavings on my machines by using jackd...
 
I tried again a live Arch linux USB and the output of i7z is similar to Manjaro with 99% in C7.
Should I set a Cmax parameter to 7 ?

eg.
Code:
economy_cx_lowest="C7
 
Code:
sysctl dev.cpu.0.cx_supported
dev.cpu.0.cx_supported: C1/1/1 C2/2/253 C3/3/1048
Does it mean that it doesn't support > C3 ?
 
Code:
sysctl dev.cpu.0.cx_supported
dev.cpu.0.cx_supported: C1/1/1 C2/2/253 C3/3/1048
Does it mean that it doesn't support > C3 ?

We have great confusion in terms here. C3 is usually the highest (numbered) C state seen in FreeBSD. Common advice for years has been to specify 'Cmax' - which is C8 - for performance_cx_lowest and/or economy_cx_lowest in rc.conf, which sets sysctl hw.acpi.cpu.cx_lowest on transition between AC and battery power, which sets sysctl dev.cpu.0.cx_{lowest,supported} etc.

I've just installed and run i7z on my IvyBridge i5 (Thinkpad T430s) and it confirms my suspicion that the 'C7' it speaks of must be a Linux term, equivalent to C3 on FreeBSD.

I recall C8 (=Cmax) being chosen in case deeper/lower C-states came along later.

On the T430s (also my X200 Core2 Duo) C1 and C2 are available on AC, with C3 also only on battery, moreover what we call C2, i7z calls C6, but on battery it only shows C1 and (its) C7, whereas the cx_usage sysctl shows all 3 (as C1, C2 and C3), so there's something wonky with i7z in this respect.

Further, C3 availability on battery can even depend on choice of kern.eventtimer!

I'll post some proper logs etc in a few hours hopefully, but meanwhile I suggest using Cmax in settings. Any perceived sluggishness can be dealt with once it's idling at a decent temperature, around 40°C would be good.
 
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
 
What does your configuration files look like?
Are these states by default on your PC or did you change them?
My laptop is almost always on AC and my battery is set to 50-55% in Bios
 
I tried these configurations but the i7z output is always 100% C1:

/etc/rc.conf:
Code:
powerdxx_enable=YES
powerdxx_flags="-n adaptive -a adaptive -b adaptive -m 800 -M 1600"
performance_cx_lowest=C1
economy_cx_lowest=C3

Code:
powerdxx_enable=YES
powerdxx_flags="-n adaptive -a adaptive -b adaptive -m 800 -M 1600"
performance_cx_lowest=C1
economy_cx_lowest=C7

Code:
powerdxx_enable=YES
powerdxx_flags="-n adaptive -a adaptive -b adaptive -m 800 -M 1600"
#performance_cx_lowest=C1
economy_cx_lowest=C3

Code:
powerdxx_enable=YES
powerdxx_flags="-n adaptive -a adaptive -b adaptive -m 800 -M 1600"
#performance_cx_lowest=C1
economy_cx_lowest=C7

and in /etc/sysctl.conf:

Code:
dev.cpu.0.cx_lowest=C3
dev.cpu.1.cx_lowest=C3
dev.cpu.2.cx_lowest=C3
dev.cpu.3.cx_lowest=C3
 
Back
Top