# Frequency and CPU !



## teo (Nov 22, 2020)

Why doesn't FreeBSD have a moderate standard of automated hardware frequency usage that can reach 98% while compiling and burning the CPUs?


----------



## a6h (Nov 22, 2020)

When I compile I set it manually `sysctl dev.cpu.0.freq=800`


----------



## teo (Nov 22, 2020)

vigole said:


> When I compile I set it manually `sysctl dev.cpu.0.freq=800`


The danger of the automatic overuse of CPUs is not only in the compilation, but also when watching some video for example on youtube.


----------



## ralphbsz (Nov 22, 2020)

Because how and whether to control CPU frequency is not very standardized between machines. What works on a laptop with an Intel CPU doesn't necessarily work on a desktop with an AMD CPU, nor on an embedded system (router, NAS server) with a small CPU. There aren't even really standardized device drivers and interfaces for this that transcends OSes: what works on Linux doesn't work on AIX, nor on FreeBSD, and NetBSD handles it probably yet differently. Let's not even talk about MacOS.

Just to show you what's important to the people who designed this OS: There is a huge set of things you can do to adjust serial ports. Read the man pages for stty and tcsetattr sometime. That's because at the time the design decisions for the Unix family of OSes was frozen, adjusting serial port parameters was extremely important. Many machines had dozens (sometimes hundreds) of serial ports, connected to all manner of devices in many strange and different ways. There is elaborate machinery for controlling this. CPU frequency? Not so much.

Also consider that the requirements and wishes of the user(s) can be very different. Is this a laptop, where battery conservation is paramount, and we have to strive for maximum efficiency taking the non-linearity of batteries and cooling into account? Is this a mildly loaded cloud machine, where we have to minimize the carbon footprint? Is latency (instant gratification, fast response) important, such as in gaming? Is the problem being solved of the utmost urgency, and energy usage not important? Can we turn whole cores off, or is the program we're running inherently parallel and needs all cores (but perhaps all running more slowly)? Not everything is a desktop machine that does compilations for software engineers; in reality, that usage is probably 1/10th of a percent of all computer usage, or less.

The ability to adjust CPU frequency while running is actually a very recent addition; on a PDP or VAX or Sun-3, nobody would have ever thought of doing that. And until relatively recently, most computers were multi-user, and typically had a backlog of batch workload, so at most times you wanted to run the CPU as fast as possible (except on an IO-bound machine).


----------



## Phishfry (Nov 22, 2020)

teo said:


> burning the CPUs?


Burning up the CPU is not probable. All modern CPU's have thermal trip.
They will shut themselves down when they reach TJunction temperature.
You can literally run your CPU with no heatsink and it will not burn out.
It may ruin your filesystem by abruptly shutting down but you will not kill the CPU.

Look here at TJunction (typically 100C). This is your thermal trip temperature.








						Product Specifications
					

quick reference guide including specifications, features, pricing, compatibility, design documentation, ordering codes, spec codes and more.




					ark.intel.com
				




You might decrease the lifetime of a CPU by constantly running it at high temperatures.








						Information about Temperature for Intel® Processors
					

Explains temperature-related issues with Intel Processors.




					www.intel.com
				



Chances are it will become obsolete before it dies.


----------



## teo (Nov 22, 2020)

ralphbsz said:


> Because how and whether to control CPU frequency is not very standardized between machines. What works on a laptop with an Intel CPU doesn't necessarily work on a desktop with an AMD CPU, nor on an embedded system (router, NAS server) with a small CPU. There aren't even really standardized device drivers and interfaces for this that transcends OSes: what works on Linux doesn't work on AIX, nor on FreeBSD, and NetBSD handles it probably yet differently. Let's not even talk about MacOS.
> 
> Just to show you what's important to the people who designed this OS: There is a huge set of things you can do to adjust serial ports. Read the man pages for stty and tcsetattr sometime. That's because at the time the design decisions for the Unix family of OSes was frozen, adjusting serial port parameters was extremely important. Many machines had dozens (sometimes hundreds) of serial ports, connected to all manner of devices in many strange and different ways. There is elaborate machinery for controlling this. CPU frequency? Not so much.
> 
> ...


Some FreeBSD maintainers recommend using the system on older hardware because of the lack of drivers and support for modern hardware , and I wonder, the FreeBSD system can not by itself automatically limit the use of frequencies which carries the danger that CPUs burn out while compiling or just start watching a video on youtube, it is simply staying in the past obsolete, that does not happen in linux and windows , controls and regulates the frequency automatically while performing its activity.


----------



## George (Nov 22, 2020)

Change `powerd` mode e.g. to "max" while compiling?


----------



## drhowarddrfine (Nov 22, 2020)

teo said:


> Some FreeBSD maintainers recommend using the system on older hardware because of the lack of drivers and support for modern hardware


I have never heard that in the 16 years I've been running FreeBSD. I've also used all new hardware when building my workstation and servers.

I don't know how one would set the CPU frequency to a non-existent number that could burn a CPU up. If a manufacturer has such a setting, that's on them, not FreeBSD or anyone else.

The original question makes no sense to me.


----------



## mickey (Nov 22, 2020)

teo said:


> limit the use of frequencies which carries the danger that CPUs burn out while compiling or just start watching a video on youtube


If overheating is your primary concern, my own observations recently showed, that disabling Intel Turbo Boost on my system can reduce temperatures by as much as 10°C without significant loss of overall performance.


----------



## PMc (Nov 22, 2020)

teo said:


> Why doesn't FreeBSD have a moderate standard of automated hardware frequency usage that can reach 98% while compiling and burning the CPUs?


Because this is only a problem on laptop machines. Everything else should be designed to run at max for an unlimited time. If it isn't, just move more air thru the case. (Same would be applicable for laptops, but there proper fans may not be available, and/or the thing will get noisy.)



mickey said:


> If overheating is your primary concern, my own observations recently showed, that disabling Intel Turbo Boost on my system can reduce temperatures by as much as 10°C without significant loss of overall performance.


That depends on the specs of the individual chip. Some do benefit significantly from TurboBoost, some do not much.



teo said:


> The danger of the automatic overuse of CPUs is not only in the compilation, but also when watching some video for example on youtube.


How come? Watching a video will usually do this: 
 * run one core at max, probably entering TurboBoost
 * never allow the package to go to C-states
If this already gets the cpu too hot, then that case is quite misdesigned.

Anyway, you can always watch the temperature readings (at least with intel chips) in sysctl:

```
dev.cpu.3.temperature: 40.0C
dev.cpu.3.coretemp.throttle_log: 0
dev.cpu.3.coretemp.tjmax: 105.0C
dev.cpu.3.coretemp.resolution: 1
dev.cpu.3.coretemp.delta: 65
```

So if this shows your machine getting near the limits, then that is an issue specific to your model of machine. It wouldn't be very difficult to monitor these values and switch cpu frequency accordingly. (I am doing just that to switch my extra fans on demand - but I am concerned mainly with disk temperatures, as disks won't throttle automatically.)


----------



## teo (Nov 22, 2020)

PMc said:


> Because this is only a problem on laptop machines. Everything else should be designed to run at max for an unlimited time. If it isn't, just move more air thru the case. (Same would be applicable for laptops, but there proper fans may not be available, and/or the thing will get noisy.)
> 
> 
> That depends on the specs of the individual chip. Some do benefit significantly from TurboBoost, some do not much.
> ...



In the past of another open theme published the real dimension of the FreeBSD system working on a real machine laptop compiling, which in minimal compilations of obsolete ports was turned off the machine in the middle of compilation, sounding the ventilations at full, the same happened simply by watching a video on youtube. 

$ `sysctl -a grep temperature`

```
hw.acpi.thermal.tz0.temperature: 94,1C
dev.cpu.3.temperature: 96,0C
dev.cpu.2.temperature: 96,0C
dev.cpu.1.temperature: 92,0C
dev.cpu.0.temperature: 92,0C
$
```


----------



## PMc (Nov 22, 2020)

Thanks for the pic. You're right, that is something I would not enjoy.

So we learn: whenever you get to buy a new laptop, do that test, right in the shop, before buying.

Probably one could look into the code of `powerd`, and insert an option to retrieve the temperature and set a limit there.
Otherwise, some shell scripting might also do
*(WARNING: this is not tested, it is just quick cut+paste of some parts from my scripts!) *

```
#! /bin/sh
SYSCTL=/sbin/sysctl
SPEAKER=/dev/speaker
NCPU=`$SYSCTL -n hw.ncpu`
SLEEPTM=7
HWMTM=0
HWMPER=20
MODE1=0
MAX_SYS=0

MODE1_UTS=$1   # upper thresh
MODE1_LTS=$2    # lower thresh

alert()
{
  local mode=$1
  case $mode in
    30) echo "T255 O4 CGAECB" > $SPEAKER ;;
    31) echo "T255 O4 CGAEAC" > $SPEAKER ;;
  esac
}

gethwm()
{
  MAX_SYS=0
  i=0
  while test $i -lt $NCPU; do
    eval cpu_$i=`$SYSCTL -n dev.cpu.$i.temperature | cut -f 1 -d .`
    if test $i -gt $MAX_SYS; then
      MAX_SYS=$i
    fi
    i=`expr $i + 1`
  done
}

throttle()
{
  /usr/sbin/service powerd stop
  $SYSCTL dev.cpu.0.freq=200

  # could also do something with 'rctl' here, if appropriate

}

release()
{
  /usr/sbin/service powerd start
}

setcomp()
{
  if test $1 -eq 1; then
    throttle
    alert 31
  fi
  if test $1 -eq 0; then
    release
    alert 30
  fi
  MODE1=$1
}

while true
do
  CURTM=`date +%s`

  # get sys data
  if test `expr $HWMTM + $HWMPER` -lt $CURTM; then
    gethwm
    HWMTM=$CURTM
  fi

  NEW_MODE1=-1

  if test $MAX_SYS -ge $MODE1_UTS; then
    NEW_MODE1=1
  fi
  if test $MAX_SYS -le $MODE1_LTS; then
    NEW_MODE1=0
  fi
  if test $NEW_MODE1 -ne -1 -a $NEW_MODE1 -ne $MODE1; then
    setcomp $NEW_MODE1
  fi

  sleep $SLEEPTM
done
```


----------



## Phishfry (Nov 23, 2020)

96C is much too hot. You definatly have a problem. You are very near thermal trip and should be around 80C-85C max.
Places to start:
Desktop-
Check your heatsink for proper seating and thermal grease. Look for airflow restrictions. Do not place things around your PC.

Laptop-
Check your heatsink for lint and carpet fibers. These get sucked up and can reduce airflow.

General: ACPI handles the speed of the PWM fans. ACPI has been known to cause problems on some systems.

Perhaps you could try turning off HyperThreading in the BIOS in addition to TurboBoost.


----------



## Alain De Vos (Sep 9, 2021)

Currently compiling 4 parallel ports. My desktop PC has a CPU temperature of ,

```
dev.cpu.0.temperature: 64.0C
```


----------



## a6h (Sep 10, 2021)

Alain De Vos said:


> Currently compiling 4 parallel ports. My desktop PC has a CPU temperature of ,
> 
> ```
> dev.cpu.0.temperature: 64.0C
> ```


On what CPU, how many cores, and freq.?


----------



## Alain De Vos (Sep 10, 2021)

8-cores,on all cpu's,3.4Ghz

```
dev.cpu.7.temperature: 61.0C
dev.cpu.6.temperature: 61.0C
dev.cpu.5.temperature: 58.0C
dev.cpu.4.temperature: 58.0C
dev.cpu.3.temperature: 58.0C
dev.cpu.2.temperature: 63.0C
dev.cpu.1.temperature: 63.0C
dev.cpu.0.temperature: 63.0C
```


----------



## SirDice (Sep 10, 2021)

With older systems the thermal paste may have dried out, this results in really bad heat conductivity. This can happen with both desktops and laptops. Laptops are a bit more prone to this though. Take it apart, clean out the dust bunnies, take off the heat sinks, clean up and apply new thermal paste.


----------



## eternal_noob (Sep 10, 2021)

SirDice said:


> dust bunnies


Funny, in Germany it's called "Wollmaus", which literally translates to "wool mouse".


----------



## SirDice (Sep 10, 2021)

I like the Polish version 


> In Polish they are called koty (meaning: "cats").











						Dust bunny - Wikipedia
					






					en.wikipedia.org


----------



## Geezer (Sep 10, 2021)




----------



## Deleted member 30996 (Sep 10, 2021)

teo said:


> $ `sysctl -a grep temperature`
> 
> ```
> hw.acpi.thermal.tz0.temperature: 94,1C
> ...


That's still within my safe zone. 100.0C is when you get the console message and beep saying it's too hot and getting ready to shut down.

All my machines are Win7 era Thinkpads except for an Acer/Gateway clone. I need to take them all apart, make sure they're clean and go from there. 

If I don't use my oPolar gaming fan when compiling ports all but my W520's will overheat and shut down. I'm already aware of it so I do one at a time with the one fan I have and that's enough to cool it off.

This W520 with Intel Quad Core i7-2760QM @ 2.40GHz is at 51C with a youtube video playing in another tab. I vacuumed the exhaust vent on one T61 and it will run an onboard video at full-screen 2 hours and not overheat.

None of them shut down watching a youtube video.


----------



## teo (Sep 12, 2021)

FreeBSD does not control the temperature automatically that in system without activity is above 40.C, and with activity it shoots above 60 to 70 .C temperature, it does not control the excessive use of the frequency automatically that at the minimum of activity like watching a video it reaches 70 or 80% of the cores, and compiling some small package has reached its top of 97% the use of the cores automatically shutting down the computer and the life of the computer, FreeBSD ended up killing my Notebook.


----------



## diizzy (Sep 12, 2021)

https://github.com/lonkamikaze/powerdxx ? (doesn't work on newer Intel CPUs afaik)
It's available in ports


----------



## teo (Sep 12, 2021)

diizzy said:


> https://github.com/lonkamikaze/powerdxx ? (doesn't work on newer Intel CPUs afaik)
> It's available in ports


Nor in the old ones, because my Notebook was about 11 years old.


----------



## Vull (Sep 13, 2021)

teo said:


> Nor in the old ones, because my Notebook was about 11 years old.


Eleven years? That's a lot of sugar for a dime. I once got about 12 years out of a Dell Dimension, but that was a heavy-duty tower configuration. How many years do you expect to get out of a notebook/laptop?

What was that make and model again?

Edited to add: Did you do any preventative maintenance like SirDice mentioned in post #17 above?


----------



## Deleted member 30996 (Sep 13, 2021)

teo said:


> FreeBSD ended up killing my Notebook.


Ask for your money back.


----------



## teo (Sep 13, 2021)

Vull said:


> Eleven years? That's a lot of sugar for a dime. I once got about 12 years out of a Dell Dimension, but that was a heavy-duty tower configuration. How many years do you expect to get out of a notebook/laptop?
> 
> What was that make and model again?
> 
> Edited to add: Did you do any preventative maintenance like SirDice mentioned in post #17 above?


The brand was HP, and of course I did many preventive maintenance in the 11 years of his life that worked normally first with windows or then with linux, this time that I installed it fully FreeBSD, it happened what happened, ended up killing my Notebook, despite having done tests much earlier in virtualized machine, and gave the same problem with the temperature rise and the triggering of the use of the cores in minimal activities.


----------



## Vull (Sep 14, 2021)

teo said:


> The brand was HP, and of course I did many preventive maintenance in the 11 years of his life that worked normally first with windows or then with linux, this time that I installed it fully FreeBSD, it happened what happened, ended up killing my Notebook, despite having done tests much earlier in virtualized machine, and gave the same problem with the temperature rise and the triggering of the use of the cores in minimal activities.


I've not had very good luck with HPs or Acer laptops, although that said I still have to say that my HP Stream is holding up pretty well after about 5-6 years in spite of flaky ACPI and wireless hardware. Have done much better with Lenovo and Dells.

My first Acer Aspire almost burned up after only about 5 years of running Windows XP only. The cooling fan was running constantly and some of the circuitry was fried. Then I put Debian on it and quite unexpectedly the operating temperature dropped down to a reasonable range. It also does okay with FreeBSD, but it's so old now that I mainly just use it as stand for one of my Dells.

If I can get 5 plus years of continuous use out of any laptop I figure it's paid for itself, and everything after that is gravy.


----------



## teo (Sep 14, 2021)

Vull said:


> I've not had very good luck with HPs or Acer laptops, although that said I still have to say that my HP Stream is holding up pretty well after about 5-6 years in spite of flaky ACPI and wireless hardware. Have done much better with Lenovo and Dells.
> 
> My first Acer Aspire almost burned up after only about 5 years of running Windows XP only. The cooling fan was running constantly and some of the circuitry was fried. Then I put Debian on it and quite unexpectedly the operating temperature dropped down to a reasonable range. It also does okay with FreeBSD, but it's so old now that I mainly just use it as stand for one of my Dells.
> 
> If I can get 5 plus years of continuous use out of any laptop I figure it's paid for itself, and everything after that is gravy.


But which model or series of the Lenovo and Dells like Acer Aspire  ? That is compatible with the drivers and hardware of the machine.


----------



## Vull (Sep 14, 2021)

teo said:


> But which model or series of the Lenovo and Dells like Acer Aspire  ? That is compatible with the drivers and hardware of the machine.


Ah but I asked you first, and you only gave me the maker. Not fair. Nevertheless, partly from memory as I no longer have them all:

Lenovo G50-45 laptop- my favorite so far, but not much data on it yet
Dell Latitude D510 laptop - still in service after I don't know how many years
Dell ???? laptop - gave it away years ago
Dell Dimension 4700 tower - in service 2006-2019. HDD replaced 2014.
Acer Aspire A315-21 laptop - still serviceable, although I no longer have it either
Acer Aspire 3624WXMI laptop - burned up via Windows XP, in service 2004-2009
HP Pavillion ???? laptop - bricked itself running Windows 7 when the battery went dead
HP Stream 11-d010-wm laptop- still in service after 5-6 years

There were others I can no longer remember, including one long-dead Compaq, and 2 long-dead Acer Aspires from the Windows Vista era, which I bought as gifts when they were new.


----------



## drhowarddrfine (Sep 14, 2021)

I have a Gateway box in my basement that is a PII. I turned it on just a week ago looking for something and it still works great with RELEASE 9.0 on it, I think.
I have two Dell laptops in my office. One runs FreeBSD 13.0-RELEASE and I use for daily backups of certain things and the other has Windows on it strictly for updating my TV controller which I haven't done in years. Both have junk sitting on them so I don't recall the models but they're both 32-bit so, yeah, old.


----------



## Vull (Sep 14, 2021)

drhowarddrfine said:


> I have a Gateway box in my basement that is a PII. I turned it on just a week ago looking for something and it still works great with RELEASE 9.0 on it, I think.
> I have two Dell laptops in my office. One runs FreeBSD 13.0-RELEASE and I use for daily backups of certain things and the other has Windows on it strictly for updating my TV controller which I haven't done in years. Both have junk sitting on them so I don't recall the models but they're both 32-bit so, yeah, old.


To be entirely forthcoming, my Dell Latitude has also been switched "off" during some fairly long stretches of its "lifetime." But these other computers I listed were left up and running all or most of the time. Naturally, not using a computer will extend its lifetime quite a bit, at least as long as the temperatures aren't too extreme, and it doesn't accumulate too much dust, bugs, humidity, or etc.


----------



## grahamperrin@ (Sep 18, 2021)

teo said:


> … CPUs burn out while compiling or just start watching a video on youtube, …





teo said:


> … HP, …





teo said:


> … killing my Notebook, …



I have used FreeBSD with one old HP EliteBook 8570p after another. When one overheated, repeatedly, *dirt* (not FreeBSD) was the cause.



SirDice said:


> … take off the heat sinks, clean up and apply new thermal paste. …





teo said:


> … preventive maintenance …



teo when did you most recently do exactly what's suggested by SirDice?


----------



## Deleted member 30996 (Sep 18, 2021)

teo said:


> But which model or series of the Lenovo and Dells like Acer Aspire ? That is compatible with the drivers and hardware of the machine.



I've got these laptops running FreeBSD right now:

FreeBSD 12.2-RELEASE-p7
Gateway NV53A (Acer Clone)
AMD Phenom II x 3 N830 Triple Core @ 2.1GHz
4GB DDR3 RAM
ATI Mobilty Radeon HD 4250
HITACHI Travelstar 500GB HDD @ 7200 RPM
Matshita DVD-RAM Super Multi drive
15.6 16:9 HD LED LCD
Realtek ALC272 Audio

FreeBSD 12.2-RELEASE-p7
Thinkpad W520
Intel Quad Core 2nd Gen i7-2760QM (2.40GHz, 6MB L3, 1600MHz FSB, 45W)
8 GB RAM PC3-10600
Nvidia Quadro 1000M with 2GB DDR3 and 96 CUDA cores with Optimus Technology
HITACHI Travelstar 500GB HDD @ 7200 RPM
Serial UltraBay Enhanced DVD Burner II
15.6" TFT display with 1920x1080 (FHD) resolution with LED backlight
Intel HD Audio

FreeBSD 12.2-RELEASE-p7
Thinkpad T61
Intel Core 2 Duo CPU T7300 @ 2.0GHz
4GB PC2-5300 RAM
Nvidia Quadro NVS 140M
Scorpio Black 250GB HDD @ 7200RPM
Hitachi CD-RW / DVDRAM combo
15.4" 1680x1050 (WSXGA+) widescreen
Intel HD Audio

FreeBSD 12.2-RELEASE-p7
Thinkpad T400
Intel Core2 Duo P8600 @ 2.4GHz
8GB PC3-8500 RAM
HITACHI Travelstar 500GB HDD @ 7200 RPM
Switchable Graphics with Intel GMA 4500MHD and ATI Mobility Radeon HD 3470 (Set to Radeon)
Serial Ultrabay Slim CD-RW/DVD combo Drive
14.1" 1280x800 (WXGA) with LED backlight
Intel HD Audio

FreeBSD 12.2-RELEASE-p7 GENERIC i386
IBM Thinkpad T43
Intel Pentium M processor (Dothan) @ 2.00GHz
2GB PC2-4200 RAM
Hitachi GST Travelstar 7K100 100GB HDD @ 7200 RPM
RV370/M22 ATI Mobility Radeon X300
HL-DT-ST RW/DVD GCC-4242N 0J05
15.0" TFT display with 1024x768 resolution
Intel AC'97 Audio

And my offline W520 mp3 player at 145 days uptime in the shot. They can all be seen in the screenshot thread:

FreeBSD 12.1-RELEASE-p3
Thinkpad W520
Intel Quad Core i7-2760QM (2.40GHz, 6MB L3, 1600MHz FSB, 45W)
8 GB RAM PC3-10600
Nvidia Quadro 1000M with 2GB DDR3 and 96 CUDA cores with Optimus Technology
HITACHI Travelstar 500GB HDD @ 7200 RPM
Serial UltraBay Enhanced DVD Burner II
15.6" TFT display with 1920x1080 (FHD) resolution with LED backlight
Intel HD Audio


----------



## teo (Sep 18, 2021)

Trihexagonal said:


> I've got these laptops running FreeBSD right now:
> 
> FreeBSD 12.2-RELEASE-p7
> Gateway NV53A (Acer Clone)
> ...


All those quite low in resources, none with 4 cores or at least base frequency having 2.8 GHz as USB port number 3.0+


----------



## Vull (Sep 18, 2021)

teo said:


> All those quite low in resources, none with 4 cores or at least base frequency having 2.8 GHz as USB port number 3.0+


What is the model number of your burned out HP computer, please?


----------



## teo (Sep 18, 2021)

Vull said:


> What is the model number of your burned out HP computer, please?


 HP G62-b86ss, I'm about to replace the motherboard, to see if it will resurrect.


----------



## Deleted member 30996 (Sep 18, 2021)

teo said:


> All those quite low in resources, none with 4 cores or at least base frequency having 2.8 GHz as USB port number 3.0+



Really, teo?

So you're claiming FreeBSD supposedly burned up a more powerful Processor and making an argument that it will run on less powerful Processors without burning them up?

And as far as that goes, teo, the Processor specs for the W520 shows:
Intel Quad Core i7-2760QM @ 2.40GHz with 4 cores and 8 Processor threads

The Processor specs for the HP G62-b86ss you claim couldn't handle running FreeBSD lists it as having a:
Intel Core i5 @ 2.53 GHz with 2 cores and 4 Processor threads

My lowest resource machine is the IBM T43 running i386 Freebsd-RELEASE-p7. Stats for it:
Intel Pentium M processor (Dothan) @ 2.00GHz with 1 core and 1 Processor thread

And with all my regular desktop apps in use running at a cool 51.0C in the screenshot from 8-29-21:


----------



## teo (Sep 18, 2021)

Trihexagonal said:


> Really, teo?
> 
> So you're claiming FreeBSD supposedly burned up a more powerful Processor and making an argument that it will run on less powerful Processors without burning them up?
> 
> ...


Please do not misrepresent, it seems that you did not read my previous messages and did not visualize the images with cores  temperature at 96% compiling a small binary package and automatically shut down in the process of compilation because I can't stand it anymore. When I installed FreeBSD on the Notebook and started to use it as operating system, I can't stand it anymore and the Notebook died, that's what I said in one of the last messages. Because the temperature in linux or windows regulated it automatically.


----------



## Deleted member 30996 (Sep 18, 2021)

teo said:


> Please do not misrepresent, it seems that you did not read my previous messages and did not visualize the images with cores temperature at 96% compiling a small binary package and automatically shut down in the process of compilation because I can't stand it anymore.


Yes, teo, I made sure to read every sentence you typed carefully and looked at every graph you posted closely, precisely because of the nature of your previous posts.

I have machines with higher end Processors than yours, lower end Processors than yours, none of my machines have an automatic frequency regulator and run just fine without burning one up no matter what the task.


----------



## teo (Sep 18, 2021)

Trihexagonal said:


> Yes, teo, I made sure to read every sentence you typed carefully and looked at every graph you posted closely, precisely because of the nature of your previous posts.
> 
> I have machines with higher end Processors than yours, lower end Processors than yours, none of my machines have an automatic frequency regulator and run just fine without burning one up no matter what the task.


My Notebook was not high-end, maybe mid-range, with 11 years of use. As another user says with FreeBSD it has not done well with either Acer or HP.


----------



## Deleted member 30996 (Sep 19, 2021)

teo said:


> My Notebook was not high-end, maybe mid-range, with 11 years of use. As another user says with FreeBSD it has not done well with either Acer or HP.


And as I said, I've got an Acer running FreeBSD right now with a Radeon chipset:

FreeBSD 12.2-RELEASE-p7
Gateway NV53A (*Acer Clone*)
AMD Phenom II x 3 N830 Triple Core @ 2.1GHz
4GB DDR3 RAM
ATI Mobilty Radeon HD 4250
HITACHI Travelstar 500GB HDD @ 7200 RPM
Matshita DVD-RAM Super Multi drive
15.6 16:9 HD LED LCD
Realtek ALC272 Audio

That came with Windows 7 Pro on it which has a start date of 10/22/2009. 
The T61 and T400 are lower end machines than yours and all of them listed except the IBM T43 came with Win 7 on them.

All but the Gateway/Acer clone (Meaning Gateway had them brand their purchase of Acer laptops as Gateway) were procured used off ebay. My brother-in-law dropped a can of frijoles on the Acer handrest, borked the HDD, gave it to me and I fixed it.


----------



## Vull (Sep 19, 2021)

teo said:


> My Notebook was not high-end, maybe mid-range, with 11 years of use. As another user says with FreeBSD it has not done well with either Acer or HP.


Please read again, neither of my bigger problems was with FreeBSD. The Acer ran Windows XP and the HP ran Windows 7.

The point I was trying to make is that no computer hardware lasts forever. That's why we make redundant backups. I could blame the hardware, I could blame the software, I could blame myself for the way I configured or maintained the computer, but I'm not driving the same car I was driving 11 years ago either.

Eleven years, as I said at the beginning, is still a lot of sugar for a dime.


----------



## grahamperrin@ (Sep 19, 2021)

teo said:


> … not high-end, maybe mid-range, with 11 years of use. …



Thirteen years, not high-end, Ergo Vista 631: <https://bsd-hardware.info/?computer=3a7d355eebe4> and I'm certain that it never overheated when I intentionally pushed the CPU to its limit, for extended periods, with FreeBSD.


----------



## mrbeastie0x19 (Sep 19, 2021)

Does FreeBSD not automatically turn off when system temperature reaches too high? I can understand that small devices with heating issues might be prone to overheating in poor conditions when building large ports. I have had a similar laptop in the past that overheated on Ubuntu.


----------



## teo (Sep 19, 2021)

Vull said:


> Please read again, neither of my bigger problems was with FreeBSD. The Acer ran Windows XP and the HP ran Windows 7.


In one of your previous messages when you said that:


> I've not had very good luck with HPs or Acer laptops, although that said I still have to say that my HP Stream is holding up pretty well after about 5-6 years in spite of flaky ACPI and wireless hardware. Have done much better with Lenovo and Dells.



I thought l related it to FreeBSD.


----------



## Deleted member 30996 (Sep 19, 2021)

mrbeastie0x19 said:


> Does FreeBSD not automatically turn off when system temperature reaches too high?


Yes.



Trihexagonal said:


> 100.0C is when you get the console message and beep saying it's too hot and getting ready to shut down.



If you're compiling ports from the login terminal and the temp approaches the upper safety limit, the System will issue a warning through the console it will shut down in a few seconds if the temp doesn't come down. 

It goes into auto shutdown at 100.0C.


----------



## grahamperrin@ (Sep 19, 2021)

Thanks,



Trihexagonal said:


> … auto shutdown at 100.0C.



Where's the code for this? 

<https://cgit.freebsd.org/src/commit/?id=322141f1e2bebebe5b6ddbad646cebe524c660d8>
<https://cgit.freebsd.org/src/commit/?id=526785c638601ca0cd393a2d9c3621f5dfd0cc45>

acpi_thermal(4)


----------



## Deleted member 30996 (Sep 19, 2021)

I have no idea, but I've watched it happen with sysutils/gkrellm2 showing the temp at 100.0C and had it shut down while compiling a port more than once. That's why I only compile ports on one machine at a time now from the login terminal using my gaming fan.

And why I recently stated I need to take them all apart and clean them.


----------



## teo (Sep 19, 2021)

Trihexagonal said:


> I have no idea, but I've watched it happen with sysutils/gkrellm2 showing the temp at 100.0C and had it shut down while compiling a port more than once. That's why I only compile ports on one machine at a time now from the login terminal using my gaming fan.
> 
> And why I recently stated I need to take them all apart and clean them.


How is that you compile from the login terminal using  my  game fan ?  You mean from the terminal of another server that is hosted on your game machine connected by SSH to the machine you are building the system on?


----------



## Deleted member 30996 (Sep 19, 2021)

It's My oPolar gaming fan that hooks up to the laptop exhaust.

Google it.


----------



## grahamperrin@ (Sep 19, 2021)

Trihexagonal said:


> … 100.0C is when you get the console message and beep saying it's too hot and getting ready to shut down. …





Trihexagonal said:


> … It goes into auto shutdown at 100.0C. …



101–103℃ in the second and third shots at <https://forums.FreeBSD.org/threads/8877/post-532310> – `tz0`. 

I don't know the locations of the eight thermal zones, but it's an HP EliteBook 8570p, <https://bsd-hardware.info/?computer=6fbb1f806232>.


----------



## Deleted member 30996 (Sep 24, 2021)

teo, unplug your laptop, remove the battery, wait one minute, replace the battery, plug the power cord back in and see if it won't power on and boot up like nothing happened.

My obake box shut down at 100C compiling ports and played dead for a couple weeks. I just did the above and it's back in service ready to finish where it left off, with the fan in use this time.


----------



## kpedersen (Sep 25, 2021)

teo are you definitely using powerd?

This is a service unique to FreeBSD that scales back the processor when not under heavy load.

You also will likely want to set the max Cstate in your rc.conf


```
powerd_enable="YES"
performance_cx_lowest="LOW"
economy_cx_lowest="LOW"
```

You can also consider locking frequencies to low levels if the build itself is too heavy on the CPU: `performance_cpu_freq=XXX`
Powerd takes a number of optional flags you may be interested in: https://www.freebsd.org/cgi/man.cgi?powerd


----------



## teo (Sep 25, 2021)

kpedersen said:


> teo are you definitely using powerd?
> 
> This is a service unique to FreeBSD that scales back the processor when not under heavy load.
> 
> ...



kpedersen of some of the examples I have put was not correct? I remember some of those explanatory examples on the internet, I did it before my Notebook died, today I am waiting for a second hand motherboard to replace it with the original one because there are no new ones left, for example in the file /etc/rc.conf


```
powerd_enable="YES"
powerd_flags="-a hiadaptive"
```
Or:

```
powerd_enable="YES"
powerd_flags="-n adaptive -a hiadaptive -b adaptive -m 800 -M 1600"
```

With powerdxx:

```
powerdxx_enable="YES"
powerdxx_flags="-n adaptive -a hiadaptive -b adaptive -m 800 -M 1600"

performance_cx_lowest="C1"
economy_cx_lowest="Cmax"
```

As I was also testing with:

```
performance_cx_lowest="Cmax"
economy_cx_lowest="Cmax"
```

The multiple configurations to regulate the temperature and its high consumption of the base frequency and its cores, none seems effective at least in my  notebook, starting with FreeBSD in its installation and activation of powerd.  The TDP of the  CPU,  is of  35 W, with FreeBSD  that it used to be above of 70% viewing some video fragment on youtube, and worse above 96 or 97%   compiling some small binary package that automatically shut down the notebook.  One question, does it depend on the quality or brand of thermal paste to keep the cooling at bay ? For your, which thermal paste is the best?






			
				Triexagonal said:
			
		

> ....unplug your laptop, remove the battery, wait one minute, replace the battery, plug the power cord back in and see if it won't power on and boot up like nothing happened.
> 
> My obake box shut down at 100C compiling ports and played dead for a couple weeks. I just did the above and it's back in service ready to finish where it left off, with the fan in use this time.


I tried several ways looking at videos or information on the internet, it gives no signs of life, not even the small input led of the power supply that displayed a small light when connected to the notebook.


----------



## kpedersen (Sep 25, 2021)

teo said:


> As I was also testing with:
> 
> ```
> performance_cx_lowest="Cmax"
> ...


I think you are generally doing it correctly. Though the rc.conf manpage specifically mentions LOW and HIGH. I would try LOW on both economy and performance to make sure.

The next thing is if you could after a restart output the relevant sysctl values, just to make sure that the correct Cstates are being used. Mine output C8.

Finally, run the following as root (after starting powerd):

`powerd -v`

This should give you a realtime overview of what powerd is doing. It should tell you that it is trying to scale the CPU to one of the lower frequencies.

(disable the powerdxx port for now, just in case it is conflicting).


----------



## fernandel (Sep 25, 2021)

I have Lenovo T495 which suppoesed to have better support and I do not have a problem. But I did have a problem when I used ports and buld something like llvm for example and temperature were 91 C. Never turned off but I do not want to kill my first laptop in life.
When I bought laptop it came with Windows and two or three days I played before I wipe off and installed FreeBSD. On Windows time I check temperature and later compare with FreeBSD, it was lower on Windows
The same temperature "problem" was when I use iMack with FreeBSD installed on. On OS X temperature was all the time lower than on FreeBSD. I do not know how is on other BSD's on FreeBSD is not good.


----------



## teo (Sep 25, 2021)

kpedersen said:


> I think you are generally doing it correctly. Though the rc.conf manpage specifically mentions LOW and HIGH. I would try LOW on both economy and performance to make sure.
> 
> The next thing is if you could after a restart output the relevant sysctl values, just to make sure that the correct Cstates are being used. Mine output C8.
> 
> ...



Hello kpedersen, how do you proceed to display the relevant values of sysctl? Duties for when you are resurrected the notebook.
The two examples of information I remember configured with powerd and powerdxx, in which case powerd was disabled so that it does not conflict.


----------



## kpedersen (Sep 25, 2021)

teo said:


> relevant values of sysctl? Duties for when you are resurrected the notebook.


I tend to just list them all and grep. So something like:

`sysctl -a | grep cx_lowest`

Now, lets also check what your lowest Cstate is. I have once had a machine where there was no support for most Cstates.

`sysctl -a | grep cx_supported`


----------



## Deleted member 30996 (Sep 25, 2021)

teo said:


> I tried several ways looking at videos or information on the internet, it gives no signs of life, not even the small input led of the power supply that displayed a small light when connected to the notebook.


But you do not say you followed my instructions, teo. So I will try again.

I plugged mine in and no sign of life.

I unplugged it

Took the battery out and waited one minute.

Replaced the battery.

Plugged it back in and the charging light came on immediately.

Now tell me you did that and whether it worked or not, teo.


----------



## grahamperrin@ (Nov 10, 2021)

teo please, is overheating still an issue? 

FYI <https://forums.freebsd.org/posts/541376>


----------



## teo (Nov 10, 2021)

grahamperrin said:


> grahamperrin said:
> 
> 
> > grahamperrin said:
> ...


Hi grahamperrin

As I said in my previous messages, my notebook died, and died because of overheating that at the minimum activity, the temperature/frequency/cores with FreeBSD, used to shoot through the roof, as written in the previous messages. Before these last messages,  I did all possible tests that give on the internet,and did not respond  the notebook . To come back to life, I had to change the motherboard and with difficulty it worked again, since then I have not played with FreeBSD on this notebook.


----------



## grahamperrin@ (Nov 11, 2021)

teo said:


> As I said in my previous messages, my notebook died,



Sorry! I missed that.

(Partly a problem with XenForo.)


----------

