Bugged clocks in Core Temp 0.99.3

Report any bugs you have with the program, so they can be fixed.

Moderator: imposter

Post Reply
CoreTemp-User073
Registered User
Registered User
Posts: 3
Joined: Thu Jan 01, 1970 12:00 am

Bugged clocks in Core Temp 0.99.3

Post by CoreTemp-User073 »

I have problems with Coretemp not showing the correct bus speed on any core.

Here's an example on how it looks.

Image

This is how it looks with CPU @ stock speed and CnQ active. The same goes for overclocking as well, it reports some weird bus speeds. Generally the end result is always the default clock for the CPU, which is 2.5GHz, but I also get other odd numbers.

Only time it shows the correct numbers is when everything is on stock and CnQ is off.

It's not related to CnQ either. I've had that off and it still shows the wrong numbers when I overclock.

Motherboard is Asus M3A79-T Deluxe. I've tried the Phenom on 3 different motherboards though, two with 790FX chipsets and one with Nforce3 chipset, and it does the same thing.

User avatar
The Coolest
Site Admin
Site Admin
Posts: 3379
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel
Contact:

Post by The Coolest »

This is a known problem with Core Temp. I'm working on a new way to detect clock speeds. So hopefully with the next release this problem will be worked around with or even be completely solved.
Main rig:
AMD Ryzen 9 5950X (True Spirit 140 Direct) / Mobo: Asrock Fatal1ty X470 / EVO 970 500GB + WD Blue 250GB + HDD / GPU: Dell RX 570 4GB / Mem: 2x16GB DDR4-3200 G.Skill 32GTZKW TridentZ - 32GB total / PSU: Seasonic Prime Ultra Gold 650W
NAS:
Core i7 2600K 3.4GHz @ 4.3GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / 2x Inland Pro 120GB + HDDs / GPU: ATi Mach64 VT2 / Mem: 4x4GB DDR3-1600 G.Skill 8GBXL RipJawsX - 16GB total / PSU: Seasonic S12II 620W.
Secondary rigs:
Core i3 7130U / MiniPC / SanDisk SDSSDP-128G / GPU: Intel HD 620 / Mem: 1x8GB DDR3L-1600
Xeon X3430 2.40GHz @ 3.06GHz or Core i3 540 3.06GHz @ 4.0GHz (Freezer 7 Pro) / Mobo: MSI H55M-ED55 / PNY CS1111 240GB / GPU: ATI FirePro V3800 / Mem: 4x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 8GB total / PSU: Seasonic S12II 620W
AMD Phenom II X4 B93 / Mobo: ASUS M2A-VM / GPU: ATI Radeon Xpress X1250 / Crucial M4 120GB / Mem: 2x2GB DDR2-800 - 4GB total / PSU: Antec 380W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors

hathor
Registered User
Registered User
Posts: 31
Joined: Fri Aug 25, 2006 7:02 am
Location: Berlin, Germany

PROCESSOR_POWER_INFORMATION

Post by hathor »

And what about PROCESSOR_POWER_INFORMATION, MaxMhz, CurrentMhz?




http://www.google.com/codesearch?hl=de& ... sbtn=Suche


typedef struct _PROCESSOR_POWER_INFORMATION {
ULONG Number;
ULONG MaxMhz;
ULONG CurrentMhz;
ULONG MhzLimit;
ULONG MaxIdleState;
ULONG CurrentIdleState;
} PROCESSOR_POWER_INFORMATION, *PPROCESSOR_POWER_INFORMATION;

Sample:

Code: Select all


/*
  Copyright (C) 2002 Kimmo Pekkola

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version 2
  of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
/*
  $Header: /home/cvsroot/Rainmeter/Plugins/PluginPower/PowerPlugin.cpp,v 1.1.1.1 2005/07/10 18:51:06 rainy Exp $

  $Log: PowerPlugin.cpp,v $
  Revision 1.1.1.1  2005/07/10 18:51:06  rainy
  no message

  Revision 1.4  2004/07/11 17:10:42  rainy
  The plugin is cleaned up correctly.

  Revision 1.3  2004/06/05 10:56:07  rainy
  Added new interface.
  Uses config parser.

  Revision 1.2  2003/03/22 20:39:42  rainy
  The max value for status is now correct.

  Revision 1.1  2002/09/07 08:17:11  rainy
  Intial version

*/

#pragma warning(disable: 4786)
#pragma warning(disable: 4996)

#include <windows>
#include <math>
#include <map>
#include <string>
#include <time>
#include <Powrprof>
#include "..\..\Library\Export.h"	// Rainmeter's exported functions

typedef struct _PROCESSOR_POWER_INFORMATION
{
    ULONG Number;
    ULONG MaxMhz;
    ULONG CurrentMhz;
    ULONG MhzLimit;
    ULONG MaxIdleState;
    ULONG CurrentIdleState;
} PROCESSOR_POWER_INFORMATION, *PPROCESSOR_POWER_INFORMATION;

typedef LONG (WINAPI *FPCALLNTPOWERINFORMATION)(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG);

/* The exported functions */
extern "C"
{
__declspec( dllexport ) UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id);
__declspec( dllexport ) void Finalize(HMODULE instance, UINT id);
__declspec( dllexport ) LPCTSTR GetString(UINT id, UINT flags);
__declspec( dllexport ) UINT Update(UINT id);
__declspec( dllexport ) UINT GetPluginVersion();
__declspec( dllexport ) LPCTSTR GetPluginAuthor();
}

enum POWER_STATE
{
	POWER_UNKNOWN,
	POWER_ACLINE,
	POWER_STATUS,
	POWER_STATUS2,
	POWER_LIFETIME,
	POWER_PERCENT,
	POWER_MHZ
};

std::map<UINT> g_States;
std::map<UINT> g_Formats;
HINSTANCE hDLL = NULL;
FPCALLNTPOWERINFORMATION fpCallNtPowerInformation = NULL;

/*
  This function is called when the measure is initialized.
  The function must return the maximum value that can be measured.
  The return value can also be 0, which means that Rainmeter will
  track the maximum value automatically. The parameters for this
  function are:

  instance  The instance of this DLL
  iniFile   The name of the ini-file (usually Rainmeter.ini)
  section   The name of the section in the ini-file for this measure
  id        The identifier for the measure. This is used to identify the measures that use the same plugin.
*/
UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id)
{
	 if (hDLL == NULL)
     {
         hDLL = LoadLibrary(L"powrprof.dll");
         if (hDLL)
         {
             fpCallNtPowerInformation = (FPCALLNTPOWERINFORMATION)GetProcAddress(hDLL, "CallNtPowerInformation");
         }
     }

    POWER_STATE powerState = POWER_UNKNOWN;

	/* Read our own settings from the ini-file */
	LPCTSTR type = ReadConfigString(section, L"PowerState", L"");
	if(type)
	{
		if (wcsicmp(L"ACLINE", type) == 0)
		{
			powerState = POWER_ACLINE;
		}
		else if (wcsicmp(L"STATUS", type) == 0)
		{
			powerState = POWER_STATUS;
		}
		else if (wcsicmp(L"STATUS2", type) == 0)
		{
			powerState = POWER_STATUS2;
		}
		else if (wcsicmp(L"LIFETIME", type) == 0)
		{
			powerState= POWER_LIFETIME;

			LPCTSTR format = ReadConfigString(section, L"Format", L"%H:%M");
			if (format)
			{
				g_Formats[id] = format;
			}
		}
		else if (wcsicmp(L"MHZ", type) == 0)
        {
			powerState= POWER_MHZ;
        }
		else if (wcsicmp(L"PERCENT", type) == 0)
		{
			powerState = POWER_PERCENT;
		}

		g_States[id] = powerState;
	}

	switch(powerState)
	{
	case POWER_ACLINE:
		return 1;

	case POWER_STATUS:
		return 4;

	case POWER_STATUS2:
		return 255;

	case POWER_LIFETIME:
		{
			SYSTEM_POWER_STATUS status;
			if (GetSystemPowerStatus(&status))
			{
				return status.BatteryFullLifeTime;
			}
		}
		break;

	case POWER_PERCENT:
		return 100;
	}

	return 0;
}

/*
  This function is called when new value should be measured.
  The function returns the new value.
*/
UINT Update(UINT id)
{
	SYSTEM_POWER_STATUS status;
	if (GetSystemPowerStatus(&status))
	{
		std::map<UINT>::iterator i = g_States.find(id);
		if (i != g_States.end())
		{
			switch((*i).second)
			{
			case POWER_ACLINE:
				return status.ACLineStatus == 1 ? 1 : 0;

			case POWER_STATUS:
				if (status.BatteryFlag & 128)
				{
					return 0;	// No battery
				}
				else if (status.BatteryFlag & 8)
				{
					return 1;	// Charging
				}
				else if (status.BatteryFlag & 4)
				{
					return 2;	// Critical
				}
				else if (status.BatteryFlag & 2)
				{
					return 3;	// Low
				}
				else if (status.BatteryFlag & 1)
				{
					return 4;	// High
				}
				break;

			case POWER_STATUS2:
				return status.BatteryFlag;

			case POWER_LIFETIME:
				return status.BatteryLifeTime;

			case POWER_PERCENT:
				return status.BatteryLifePercent > 100 ? 100 : status.BatteryLifePercent;

			case POWER_MHZ:
                if (fpCallNtPowerInformation)
                {
                    PROCESSOR_POWER_INFORMATION ppi[8];     // Assume that 8 processors are enough
                    memset(ppi, 0, sizeof(PROCESSOR_POWER_INFORMATION) * 8);
                    fpCallNtPowerInformation(ProcessorInformation, NULL, 0, ppi, sizeof(PROCESSOR_POWER_INFORMATION) * 8);
                    return ppi[0].CurrentMhz;
                }
			}
		}
	}

	return 0;
}
/*
  This function is called when the value should be
  returned as a string.
*/
LPCTSTR GetString(UINT id, UINT flags)
{
	static WCHAR buffer[256];

	std::map<UINT>::iterator i = g_States.find(id);
	if (i != g_States.end())
	{
		if ((*i).second == POWER_LIFETIME)
		{
			SYSTEM_POWER_STATUS status;
			if (GetSystemPowerStatus(&status))
			{
				// Change it to time string
				if (status.BatteryLifeTime == -1)
				{
					return L"Unknown";
				}
				else
				{
					std::map<UINT>::iterator iter = g_Formats.find(id);
					if (iter != g_Formats.end())
					{
						tm time;
						memset(&time, 0, sizeof(tm));
						time.tm_sec = status.BatteryLifeTime % 60;
						time.tm_min = (status.BatteryLifeTime / 60) % 60;
						time.tm_hour = status.BatteryLifeTime / 60 / 60;

						wcsftime(buffer, 256, (*iter).second.c_str(), &time);
					}
					else
					{
						wsprintf(buffer, L"%i:%02i:%02i", status.BatteryLifeTime / 60 / 60, (status.BatteryLifeTime / 60) % 60, status.BatteryLifeTime % 60);
					}
					return buffer;
				}
			}
		}
	}
	return NULL;
}

/*
  If the measure needs to free resources before quitting.
  The plugin can export Finalize function, which is called
  when Rainmeter quits (or refreshes).
*/
void Finalize(HMODULE instance, UINT id)
{
	std::map<UINT>::iterator i = g_States.find(id);
	if (i != g_States.end())
	{
		g_States.erase(i);
	}

	std::map<UINT>::iterator i2 = g_Formats.find(id);
	if (i2 != g_Formats.end())
	{
		g_Formats.erase(i2);
	}

    if (hDLL != NULL)
    {
        FreeLibrary(hDLL);
        hDLL = NULL;
    }
}

UINT GetPluginVersion()
{
	return 1003;
}

LPCTSTR GetPluginAuthor()
{
	return L"Rainy (rainy@iki.fi)";
}
.
For WIN XP:
http://www.2shared.com/file/4284922/fe9 ... UENCY.html
Greetings from BERLIN, GERMANY!
tiu-hathor

User avatar
The Coolest
Site Admin
Site Admin
Posts: 3379
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel
Contact:

Post by The Coolest »

Thanks for that code, but it looks like it is meant to check the power status of the machine (like what type of power it's working off, AC or battery). I'm not certain that it will report the correct clock speeds and it looks way too complicated.
A much better way would be to retrieve the real FSB frequency and multiply it by CPU multiplier. I just need to figure out a few details and it should not be too hard after that.

That code should still be useful for me as I was looking for something like that for a while now :)
Main rig:
AMD Ryzen 9 5950X (True Spirit 140 Direct) / Mobo: Asrock Fatal1ty X470 / EVO 970 500GB + WD Blue 250GB + HDD / GPU: Dell RX 570 4GB / Mem: 2x16GB DDR4-3200 G.Skill 32GTZKW TridentZ - 32GB total / PSU: Seasonic Prime Ultra Gold 650W
NAS:
Core i7 2600K 3.4GHz @ 4.3GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / 2x Inland Pro 120GB + HDDs / GPU: ATi Mach64 VT2 / Mem: 4x4GB DDR3-1600 G.Skill 8GBXL RipJawsX - 16GB total / PSU: Seasonic S12II 620W.
Secondary rigs:
Core i3 7130U / MiniPC / SanDisk SDSSDP-128G / GPU: Intel HD 620 / Mem: 1x8GB DDR3L-1600
Xeon X3430 2.40GHz @ 3.06GHz or Core i3 540 3.06GHz @ 4.0GHz (Freezer 7 Pro) / Mobo: MSI H55M-ED55 / PNY CS1111 240GB / GPU: ATI FirePro V3800 / Mem: 4x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 8GB total / PSU: Seasonic S12II 620W
AMD Phenom II X4 B93 / Mobo: ASUS M2A-VM / GPU: ATI Radeon Xpress X1250 / Crucial M4 120GB / Mem: 2x2GB DDR2-800 - 4GB total / PSU: Antec 380W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors

CoreTemp-User073
Registered User
Registered User
Posts: 3
Joined: Thu Jan 01, 1970 12:00 am

Post by CoreTemp-User073 »

Copy that.

Will it ever show CPU temp and/or all 4 coretemps? Right now it only shows the temp of one core.

User avatar
The Coolest
Site Admin
Site Admin
Posts: 3379
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel
Contact:

Post by The Coolest »

As you can see Core Temp shows the temperature as CPU #0, not Core #0.
Phenom only has a single sensor. So there is no way to monitor individual cores.
Main rig:
AMD Ryzen 9 5950X (True Spirit 140 Direct) / Mobo: Asrock Fatal1ty X470 / EVO 970 500GB + WD Blue 250GB + HDD / GPU: Dell RX 570 4GB / Mem: 2x16GB DDR4-3200 G.Skill 32GTZKW TridentZ - 32GB total / PSU: Seasonic Prime Ultra Gold 650W
NAS:
Core i7 2600K 3.4GHz @ 4.3GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / 2x Inland Pro 120GB + HDDs / GPU: ATi Mach64 VT2 / Mem: 4x4GB DDR3-1600 G.Skill 8GBXL RipJawsX - 16GB total / PSU: Seasonic S12II 620W.
Secondary rigs:
Core i3 7130U / MiniPC / SanDisk SDSSDP-128G / GPU: Intel HD 620 / Mem: 1x8GB DDR3L-1600
Xeon X3430 2.40GHz @ 3.06GHz or Core i3 540 3.06GHz @ 4.0GHz (Freezer 7 Pro) / Mobo: MSI H55M-ED55 / PNY CS1111 240GB / GPU: ATI FirePro V3800 / Mem: 4x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 8GB total / PSU: Seasonic S12II 620W
AMD Phenom II X4 B93 / Mobo: ASUS M2A-VM / GPU: ATI Radeon Xpress X1250 / Crucial M4 120GB / Mem: 2x2GB DDR2-800 - 4GB total / PSU: Antec 380W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors

CoreTemp-User073
Registered User
Registered User
Posts: 3
Joined: Thu Jan 01, 1970 12:00 am

Post by CoreTemp-User073 »

So what HWMonitor is showing is something else then?

User avatar
The Coolest
Site Admin
Site Admin
Posts: 3379
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel
Contact:

Post by The Coolest »

It just shows the same value for each core.
Main rig:
AMD Ryzen 9 5950X (True Spirit 140 Direct) / Mobo: Asrock Fatal1ty X470 / EVO 970 500GB + WD Blue 250GB + HDD / GPU: Dell RX 570 4GB / Mem: 2x16GB DDR4-3200 G.Skill 32GTZKW TridentZ - 32GB total / PSU: Seasonic Prime Ultra Gold 650W
NAS:
Core i7 2600K 3.4GHz @ 4.3GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / 2x Inland Pro 120GB + HDDs / GPU: ATi Mach64 VT2 / Mem: 4x4GB DDR3-1600 G.Skill 8GBXL RipJawsX - 16GB total / PSU: Seasonic S12II 620W.
Secondary rigs:
Core i3 7130U / MiniPC / SanDisk SDSSDP-128G / GPU: Intel HD 620 / Mem: 1x8GB DDR3L-1600
Xeon X3430 2.40GHz @ 3.06GHz or Core i3 540 3.06GHz @ 4.0GHz (Freezer 7 Pro) / Mobo: MSI H55M-ED55 / PNY CS1111 240GB / GPU: ATI FirePro V3800 / Mem: 4x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 8GB total / PSU: Seasonic S12II 620W
AMD Phenom II X4 B93 / Mobo: ASUS M2A-VM / GPU: ATI Radeon Xpress X1250 / Crucial M4 120GB / Mem: 2x2GB DDR2-800 - 4GB total / PSU: Antec 380W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors

Post Reply

Return to “Core Temp - Bug reports”