flightlessmango / MangoHud

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. Discord: https://discordapp.com/invite/Gj5YmBb
MIT License
6.11k stars 263 forks source link

How to help MangoHUD read CPU properly #1367

Open luisalvarado opened 1 week ago

luisalvarado commented 1 week ago

I am using the latest one compiled from 5 hours ago, every time I open a game it always shows the CPU Core temperature from the 1st core, so when it shows 70 degrees or more (Most of the time it shows like 85 or more) it is only talking about core 0, instead of possibly other cores getting used for the game. So my questions to think about how to help MangoHUD are:

  1. Is there a possibility to tell MangoHUD how many cores it should read the temperature from and to average them?

  2. Is there a possibility to tell MangoHUD which sensor tool to use? which basically would change the way it reads and structures the CPU information

  3. Is there a way to show the Highest, Average, Lowest CPU Temperature. Similar to the FPS stats?

flightlessmango commented 1 week ago

Intel or AMD?

luisalvarado commented 1 week ago

Is intel, but I am investigating. I made a video here https://www.youtube.com/watch?v=FqXfrNvYm8A about MangoHUD and Intel with the whole Turbo Boost behavior (or Precision Boost on AMD), but I need to keep on digging, if possible, with your help and corrections. The video is uploading right now but IF I say anything incorrect, please let me know so I can correct it on the 2nd iteration of tests.

flightlessmango commented 1 week ago

We use the coretemp module and the Package id 0 node. As I understand it this node has it's own temperature sensor on the CPU die, so it's not based on the core temperatures. It's effectively an aggregate of all the heat

luisalvarado commented 1 week ago

Thank you @flightlessmango , then based on this, it is not a MangoHUD issue. The issue is that Package id 0 is not showing temperatures properly, because, apart from the core temperatures, it also takes into account other temperature reading in the die / socket / CPU area. You can read more here:

https://askubuntu.com/questions/1389360/lm-sensors-from-sensors-command-what-is-package-id-0

https://forums.linuxmint.com/viewtopic.php?t=309709

https://github.com/aristocratos/bpytop/issues/156 (This one the package id 0 is just crazy)

Basically Package id 0 is as reliable as me with a chocolate bar... that bar is not gonna make it.

I am bringing this up because I get more questions about why MangoHUD shows the PC basically turning into an furnace, than a normal temperature. On many cases the temperature shown by MangoHUD contradicts the real one on the CPU (because of the same package id 0 issue).

This is because some motherboards could have additional sensors for newer cpus that could be also affecting the list of sensors used by the cores (even though package id 0 says otherwise, it will end up showing higher temperatures when the cores are not at that temperature level. So ending up with a false positive basically.

Don't know if, firstly, there is a possibility of reading the core temperatures as a list, then average their temperatures to end up in the final "visual" temperature?

There are other ideas but this is one that if coretemp allows you to, could be feasible?

Intel 13900K

photo_2024-06-27_15-04-00

Intel 6700K

photo_2024-06-27_15-08-43

PS: For some reason, and correct me if I am wrong, I can not find the setting to show the average core clock. My mangohud conf is like this:

cpu_temp=1 gpu_temp=1 position=top-right vram=1 ram=1 gpu_name=1 gpu_power=1 fps_metrics=0.001,0.01,0.97,AVG fps_limit=0 toggle_fps_limit=1 height=500 resolution=1 font_size=48

But does not show the core clock speed. I swear I saw it but I can not be sure since the last time I looked for it, to be truthful was like 6 months ago.

flightlessmango commented 1 week ago

cpu_mhz shows the highest frequency

On my 14900k, packages appears to always be the same as the hottest core. Could higher temperature in package be a sign of something going awry? You'd think that if the die/socket is 100c but the cores are 80c, there's something wrong with your setup. Do we have a reference on windows? does afterburner always show temp as the highest core?

luisalvarado commented 1 week ago

No, you are fine, it is just that the package "reading" should be updated to show the average one, or at least a packege id 1 to show the average. The package id 0 in this case is useful for servers, since you dont want to create a script to read all cores every time to see which one has the highest temp at a moment (for decision making). That is where it is more useful. But for the gaming area like this, and even more so the MangoHUD (Which btw congratualtions, it has become a standard in gaming benchmark and more), I would go one step above and make it so that it can read the average, maybe not per every X amount of ms, but probably once a second or more, because the user will eventually get confused since it would be assumed it is the average of all cores, not the highest one alone.

So the summary of this is:

Now, to answer your questions:

You'd think that if the die/socket is 100c but the cores are 80c, there's something wrong with your setup.

No there is not, it could have been either, when it read 100c it was because one core got there because of a boost, or it could have been that it is adding to the total, other sensor readings not directly tied to the cores. Hence the confusion we all get. This other sensors are useful for reading room temperature or nearby areas of the socket.

Do we have a reference on windows? does afterburner always show temp as the highest core?

No idea, last time I used Windows was 2007

So you are good and no need to worry. If you want to keep it safe like I do, I recommend this here:

I actually made a video about the tradeoff between CPU Temperature vs FPS gain: https://www.youtube.com/watch?v=FqXfrNvYm8A

Suffice to say, at least for me which basically bleed buying the hardware I have, I rather not have the higher temperatures because I want my baby to last years. I would imagine you would be too with that beautiful 14900k.

Frankly, and I am guessing you have seen the performance, the power of a 13900k or even more a 14900k is way too much. I have a 6700k with me that still is strong but this monsters you and I have are just ridiculous when talking about performance.