Jump to content

CPU temperature in iStat


oldnapalm
 Share

208 posts in this topic

Recommended Posts

This is a slightly modified FakeSMC kext, I just added the temp keys and some lines of code from VoodooMonitor to update them, so iStat will show the CPU core temps. It was tested on Snow Leopard and Leopard.

 

Thanks goes to Master Chief for his help, Netkas for the help and for writing FakeSMC, Mozodojo for writing VoodooMonitor, and Superhai for writing VoodooPower.

 

23/10/2009 - Updated by Mozodojo to use Markswell's utilities (uses code from Mac OS X kernel). Now it works well in Snow Leopard and shows correctly all cores.

 

20/11/2009 - Netkas added this patch to FakeSMC 2.5, he reworked it for reading temps on demand, not in loop.

Download from http://netkas.org/?p=338

 

23/05/2010 - Mozodojo, Slice and Usr-sse2 added plugin support to FakeSMC (fan, voltage, GPU, mobo sensors, ...)

Check this thread: http://www.projectosx.com/forum/index.php?showtopic=1206

istat.png

 

14/10/2010 - Mozodojo released a new version that works from Extra folder.

http://www.insanelymac.com/forum/index.php?showtopic=234452

 

My latest version (based on FakeSMC V2): - outdated

Kext 10.6 fakesmc.kext.zip

Kext 10.5 fakesmc.kext.zip

Source fakesmc.zip

Link to comment
Share on other sites

Thanks man. I'll look into it after the break.

 

Edit: See here: keysToAdd = OSDynamicCast(OSDictionary, getProperty("SMCKeys"));

You don't need to re-compile the source – you can simply add a dictionary key (SMCKeys) in the Info.plist (when that is missing as child of FakeSMC) and add your key TCOD (type: Data) there.

Link to comment
Share on other sites

I did it and it works. Real CPU temps, not just a static value. Give it a try.

 

What about adding fan speeds and mobo temps?

 

But did you use the version I uploaded, or your original fakesmc?

 

With original fakesmc, if I add the key to Info.plist, iStat shows the static value. What value did you add? Just the key, without value?

 

About fan speeds and mobo temps, I think they must be get from the sensor chip, like Mark-i does from Winbond. Would have to take a look at lm-sensors from Linux.

Link to comment
Share on other sites

But did you use the version I uploaded, or your original fakesmc?

 

With original fakesmc, if I add the key to Info.plist, iStat shows the static value. What value did you add? Just the key, without value?

I'll attach it shortly (attachment removed/see post#20). Busy working on my Mac right now.

 

About fan speeds and mobo temps, I think they must be get from the sensor chip, like Mark-i does from Winbond. Would have to take a look at lm-sensors from Linux.

I haven't really check, but where is the CPU temp coming from then?

 

p.s. It's not a ZIP file but the kext I am using right now (didn't had time to compress it first).

Link to comment
Share on other sites

I'll attach it shortly. Busy working on my Mac right now.

 

 

I haven't really check, but where is the CPU temp coming from then?

 

p.s. It's not a ZIP file but the kext I am using right now (didn't had time to compress it first).

 

Maybe you are using the version I modified, or you have some code in DSDT, or some kext loaded that does the magic. I tried just adding the key to Info.plist and it didn't work.

 

The code I added (from VoodooMonitor) is:

		UInt8 mynewvalue = 0;
	UInt64 msr = rdmsr64(0x019C);
	if (msr & 0x80000000) mynewvalue = (msr >> 16) & 0x7F;
	SMCData MySMCKey = 0;
	MySMCKey = SMCDevice->FindSMCKey("TC0D");
	MySMCKey->data[0] = 100-mynewvalue;

Probably "100" in the last line should be replaced by calculated Tjmax value.

This is the diode temperature.

Mark-i shows temp from the sensor under the CPU, which comes from Winbond chip, like mobo temp and fan speed (I think).

Link to comment
Share on other sites

Maybe you are using the version I modified, or you have some code in DSDT, or some kext loaded that does the magic. I tried just adding the key to Info.plist and it didn't work.

That is weird. Did you patch your DSDT with the SMBUS/EC code blocks I've added? And please add a kextstat dump for me.

BTW: You are running in 32 bit mode, right?

 

The code I added (from VoodooMonitor) is:

		UInt8 mynewvalue = 0;
	UInt64 msr = rdmsr64(0x019C);
	if (msr & 0x80000000) mynewvalue = (msr >> 16) & 0x7F;
	SMCData MySMCKey = 0;
	MySMCKey = SMCDevice->FindSMCKey("TC0D");
	MySMCKey->data[0] = 100-mynewvalue;

Probably "100" in the last line should be replaced by calculated Tjmax value.

This is the diode temperature.

Mark-i shows temp from the sensor under the CPU, which comes from Winbond chip, like mobo temp and fan speed (I think).

Yeah I noticed the new lines. I'll better wait for your answers and attachments first (saving me some time).

Link to comment
Share on other sites

That is weird. Did you patch your DSDT with the SMBUS/EC code blocks I've added? And please add a kextstat dump for me.

BTW: You are running in 32 bit mode, right?

 

 

Yeah I noticed the new lines. I'll better wait for your answers and attachments first (saving me some time).

 

No, I didn't add the SMBUS/EC patch to DSDT, I'll try to do it to see if it makes the difference.

 

I'm running 64 bit mode.

 

kextstat:

Index Refs Address            Size       Wired      Name (Version) <Linked Against>
   1   58 0                  0          0          com.apple.kpi.bsd (10.0.0)
   2    4 0                  0          0          com.apple.kpi.dsep (10.0.0)
   3   75 0                  0          0          com.apple.kpi.iokit (10.0.0)
   4   81 0                  0          0          com.apple.kpi.libkern (10.0.0)
   5   64 0                  0          0          com.apple.kpi.mach (10.0.0)
   6   26 0                  0          0          com.apple.kpi.private (10.0.0)
   7   35 0                  0          0          com.apple.kpi.unsupported (10.0.0)
   8    7 0xffffff7f80600000 0x4000     0x4000     com.apple.iokit.IOACPIFamily (1.3.0) <7 6 4 3>
   9   15 0xffffff7f80604000 0x12000    0x12000    com.apple.iokit.IOPCIFamily (2.6) <7 5 4 3>
  10    1 0xffffff7f80616000 0x44000    0x44000    com.apple.driver.AppleACPIPlatform (1.3) <9 8 7 6 5 4 3>
  11    0 0xffffff7f8065a000 0x2000     0x2000     com.psystar.driver.OpenHaltRestart (1.0.3) <4 3>
  12    0 0xffffff7f8065c000 0x18000    0x18000    com.apple.driver.AppleIntelCPUPowerManagement (90.0.0) <7 6 5 4 3 1>
  13    8 0xffffff7f80674000 0x1a000    0x1a000    com.apple.iokit.IOStorageFamily (1.6) <7 6 5 4 3 1>
  14    0 0xffffff7f8068e000 0x12000    0x12000    com.apple.driver.DiskImages (281) <13 7 6 5 4 3 1>
  15    0 0xffffff7f806a0000 0x2000     0x2000     com.superhai.driver.PlatformUUID (1.0.0) <4 3>
  16    0 0xffffff7f806a2000 0x5000     0x5000     com.mojodojo.driver.VoodooMonitor (1.1.1d1) <7 5 4 3>
  17    0 0xffffff7f806a7000 0x8000     0x8000     com.apple.nke.applicationfirewall (2.0.11) <7 6 5 4 3 1>
  18    2 0xffffff7f806af000 0x3000     0x3000     com.apple.kext.AppleMatch (1.0.0d1) <4 1>
  19    0 0xffffff7f806b2000 0x4000     0x4000     com.apple.security.quarantine (0) <18 7 6 5 4 2 1>
  20    0 0xffffff7f806b6000 0x8000     0x8000     com.apple.security.sandbox (0) <18 7 6 5 4 2 1>
  21    0 0xffffff7f806be000 0x3000     0x3000     com.apple.security.TMSafetyNet (6) <7 6 5 4 2 1>
  22    0 0xffffff7f806c1000 0x3000     0x3000     com.apple.driver.AppleAPIC (1.4) <4 3>
  23    0 0xffffff7f806c4000 0x4000     0x4000     com.apple.driver.AppleSMBIOS (1.4) <7 4 3>
  24    0 0xffffff7f806c8000 0x3000     0x3000     com.apple.driver.AppleIntelCPUPowerManagementClient (90.0.0) <7 6 5 4 3 1>
  25    0 0xffffff7f806cb000 0x6000     0x6000     com.apple.driver.AppleRTC (1.3) <8 5 4 3 1>
  26    0 0xffffff7f806d1000 0x3000     0x3000     com.apple.driver.AppleHPET (1.4) <8 7 5 4 3>
  27    2 0xffffff7f806d4000 0x42000    0x42000    com.apple.iokit.IOHIDFamily (1.6.0) <7 6 5 4 3 1>
  28    0 0xffffff7f80716000 0x4000     0x4000     com.apple.driver.AppleACPIButtons (1.3) <27 10 8 7 6 5 4 3 1>
  30    3 0xffffff7f8071d000 0x7000     0x7000     com.apple.iokit.IOAHCIFamily (2.0.0) <5 4 3 1>
  31    0 0xffffff7f80724000 0xe000     0xe000     com.apple.driver.AppleAHCIPort (2.0.0) <30 9 5 4 3 1>
  32    6 0xffffff7f80732000 0x32000    0x32000    com.apple.iokit.IOUSBFamily (3.7.8) <7 5 4 3 1>
  33    0 0xffffff7f80764000 0x10000    0x10000    com.apple.driver.AppleUSBUHCI (3.7.5) <32 9 7 5 4 3 1>
  35    0 0xffffff7f80776000 0x4000     0x4000     org.netkas.fakesmc (2) <8 7 4 3>
  36    0 0xffffff7f8077a000 0x14000    0x14000    com.apple.driver.AppleUSBEHCI (3.7.5) <32 9 7 5 4 3 1>
  37    0 0xffffff7f8078e000 0x5000     0x5000     com.apple.AppleFSCompression.AppleFSCompressionTypeZlib (1.0.0d1) <6 4 3 2 1>
  38    2 0xffffff7f80793000 0x4b000    0x4b000    com.apple.iokit.IOFireWireFamily (4.1.7) <5 4 3 1>
  39    0 0xffffff7f807de000 0x28000    0x28000    com.apple.driver.AppleFWOHCI (4.3.4) <38 9 7 6 5 4 3 1>
  40    1 0xffffff7f80806000 0xf000     0xf000     com.apple.iokit.IOATAFamily (2.5.0) <5 4 3 1>
  41    0 0xffffff7f80815000 0x7000     0x7000     com.jmicron.JMicronATA (1.0.0) <40 9 4 3>
  42    0 0xffffff7f8081c000 0x14000    0x14000    com.apple.iokit.IOAHCIBlockStorage (1.5.0) <30 13 5 4 3 1>
  43    0 0xffffff7f80830000 0x4000     0x4000     com.apple.BootCache (31) <7 6 5 4 3 1>
  44    3 0xffffff7f80834000 0x19000    0x19000    com.apple.iokit.IOSCSIArchitectureModelFamily (2.5.1) <5 4 3 1>
  45    0 0xffffff7f8084d000 0x9000     0x9000     com.apple.iokit.IOAHCISerialATAPI (1.2.0) <44 30 5 4 3 1>
  46    0 0xffffff7f80856000 0x2000     0x2000     com.apple.iokit.IOUSBUserClient (3.7.5) <32 5 4 3 1>
  47    0 0xffffff7f80858000 0xf000     0xf000     com.apple.driver.AppleUSBHub (3.7.8) <32 5 4 3 1>
  48    0 0xffffff7f80867000 0x3000     0x3000     com.apple.driver.XsanFilter (402.1) <13 5 4 3 1>
  49    3 0xffffff7f8086a000 0x9000     0x9000     com.apple.iokit.IOCDStorageFamily (1.6) <13 5 4 3 1>
  50    2 0xffffff7f80873000 0x7000     0x7000     com.apple.iokit.IODVDStorageFamily (1.6) <49 13 5 4 3 1>
  51    1 0xffffff7f8087a000 0x7000     0x7000     com.apple.iokit.IOBDStorageFamily (1.6) <50 49 13 5 4 3 1>
  52    0 0xffffff7f80881000 0x13000    0x13000    com.apple.iokit.IOSCSIMultimediaCommandsDevice (2.5.1) <51 50 49 44 13 5 4 3 1>
  53    0 0xffffff7f80894000 0x7000     0x7000     com.apple.iokit.SCSITaskUserClient (2.5.1) <44 13 5 4 3 1>
  54    0 0xffffff7f8089b000 0x4000     0x4000     com.apple.driver.AppleUSBComposite (3.7.5) <32 4 3 1>
  55    0 0xffffff7f8089f000 0x5000     0x5000     com.apple.iokit.IOUSBHIDDriver (3.7.5) <32 27 5 4 3 1>
  56    2 0xffffff7f808a4000 0x8000     0x8000     com.apple.iokit.IOHDAFamily (1.7.4a1) <5 4 3 1>
  57    0 0xffffff7f808ac000 0x10000    0x10000    com.apple.driver.AppleHDAController (1.7.4a1) <56 9 5 4 3 1>
  58    0 0xffffff7f808bc000 0x3000     0x3000     com.apple.driver.AppleLPC (1.4.6) <9 5 4 3>
  59    1 0xffffff7f808bf000 0xc000     0xc000     com.apple.driver.IOPlatformPluginFamily (3.4.0a20) <6 5 4 3>
  60    2 0xffffff7f808cb000 0xb000     0xb000     com.apple.driver.AppleSMC (3.0.1d2) <8 7 5 4 3>
  61    0 0xffffff7f808d6000 0x11000    0x11000    com.apple.driver.ACPI_SMC_PlatformPlugin (3.4.0a20) <60 59 9 8 7 6 5 4 3>
  62    7 0xffffff7f808e7000 0x34000    0x34000    com.apple.iokit.AppleProfileFamily (40) <9 7 6 5 4 3 1>
  63    0 0xffffff7f8091b000 0x8000     0x8000     com.apple.driver.AppleIntelMeromProfile (19) <62 6 5 4 3>
  64    2 0xffffff7f80923000 0x1a000    0x1a000    com.apple.iokit.IONetworkingFamily (1.8) <7 6 5 4 3 1>
  65    0 0xffffff7f8093d000 0x2d000    0x2d000    com.apple.iokit.AppleYukon2 (3.1.14b1) <64 9 5 4 3 1>
  66    3 0xffffff7f8096a000 0x23000    0x23000    com.apple.iokit.IOGraphicsFamily (2.0) <9 7 5 4 3>
  67    2 0xffffff7f8098d000 0xf000     0xf000     com.apple.iokit.IONDRVSupport (2.0) <66 9 7 5 4 3>
  68    2 0xffffff7f8099c000 0x277000   0x277000   com.apple.NVDAResman (6.0.2) <67 66 9 5 4 3 1>
  69    0 0xffffff7f80c13000 0x46a000   0x46a000   com.apple.nvidia.nv50hal (6.0.2) <68 4 3>
  70    1 0xffffff7f8107d000 0x5000     0x5000     com.apple.kext.OSvKernDSPLib (1.3) <5 4>
  71    3 0xffffff7f81082000 0x1b000    0x1b000    com.apple.iokit.IOAudioFamily (1.7.0fc16) <70 5 4 3 1>
  72    1 0xffffff7f8109d000 0x72000    0x72000    com.apple.driver.DspFuncLib (1.7.4a1) <71 5 4 3 1>
  73    0 0xffffff7f8110f000 0x83000    0x83000    com.apple.driver.AppleHDA (1.7.4a1) <72 71 56 5 4 3 1>
  74    0 0xffffff7f81192000 0x4000     0x4000     com.apple.driver.AudioIPCDriver (1.1.0) <71 5 4 3 1>
  76    0 0xffffff7f8119e000 0x9000     0x9000     com.apple.iokit.IOFireWireIP (2.0.3) <64 38 5 4 3 1>
  77    0 0xffffff7f811a7000 0xb2000    0xb2000    com.apple.GeForce (6.0.2) <68 67 66 9 7 6 5 4 3 1>
  79    0 0xffffff7f8125b000 0x5000     0x5000     com.apple.Dont_Steal_Mac_OS_X (7.0.0) <60 7 4 3 1>
  82    1 0xffffff7f8126a000 0xa000     0xa000     com.apple.iokit.IOSerialFamily (10.0.2) <7 6 5 4 3 1>
  83    0 0xffffff7f81274000 0xa000     0xa000     com.apple.iokit.IOBluetoothSerialManager (2.2.1f7) <82 7 5 4 3 1>
  84    0 0xffffff7f8127e000 0xc000     0xc000     com.apple.iokit.IOSurface (73.0) <7 5 4 3 1>
  85    0 0xffffff7f8128a000 0x4000     0x4000     com.evosx86.driver.lspcidrv (1.0) <4 3>
  86    0 0xffffff7f8128e000 0xa000     0xa000     com.apple.filesystems.autofs (2.1.0) <7 6 5 4 3 1>
  87    1 0xffffff7f81298000 0x58000    0x58000    com.apple.filesystems.ntfs (3.0) <7 6 5 4 1>
  88    0 0xffffff7f812f0000 0x3000     0x3000     com.apple.driver.AppleProfileCallstackAction (20) <62 5 4 3 1>
  89    0 0xffffff7f812f3000 0x2000     0x2000     com.apple.driver.AppleProfileKEventAction (10) <62 4 3 1>
  91    0 0xffffff7f812fe000 0x2000     0x2000     com.apple.driver.AppleProfileRegisterStateAction (10) <62 4 3 1>
  92    0 0xffffff7f81300000 0x2000     0x2000     com.apple.driver.AppleProfileThreadInfoAction (14) <62 6 4 3 1>
  93    0 0xffffff7f81302000 0x2000     0x2000     com.apple.driver.AppleProfileTimestampAction (10) <62 5 4 3 1>
  94    0 0xffffff7f81304000 0x3000     0x3000     com.apple.driver.AppleProfileReadCounterAction (17) <62 6 4 3>
  95    0 0xffffff7f81307000 0x5000     0x5000     com.apple.driver.AppleHWSensor (1.9.2d0) <5 4 3>

Link to comment
Share on other sites

Then I guess you also don't get these in kernel.log:

 

[b]Right after boot:[/b]
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found IN2R, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VSFC, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VCBC, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VS6C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VS8C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found Vp1C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VG1C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VS1C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VSAC, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VM0S, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found Vp3C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VSCC, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VS3C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VP0R, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VMBS, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VSEC, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VCAC, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VS5C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VS7C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found Vp0C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VG0C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VS0C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VS9C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found Vp2C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VSBC, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VS2C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VN0C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VMAS, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VSDC, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VS4C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found VC0C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PG0C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PG1C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PN2R, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PM2S, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PP0R, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PC0C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PM1S, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PN0C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PN1R, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PN0R, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PCBC, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PCAC, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PMBS, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found Pp0C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found Pp1C, length - 6
Oct 18 01:33:52 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found PMAS, length - 6

[b]Wake after sleep:[/b]
Oct 18 01:34:59 Master-Chiefs-Mac kernel[0]: FakeSMC: key info not found CLWK, length - 6

 

Something tells me that having a working/functional SBUS/EC is mighty important ;)

Link to comment
Share on other sites

I feel mysteriously compelled to add the EC now, I only did the SBUS...I'm getting the same error from fakesmc after waking up from sleep.

 

/EDIT

 

Done... http://www.insanelymac.com/forum/index.php...40#entry1299409

 

I see "FakeSMC: key info not found CLWK, length - 6" when waking up from S3 sleep with the fakeSMC.kext from this thread.

Link to comment
Share on other sites

I do see those FakeSMC messages in kernel.log, I guess they are the keys that iStat tries to read.

 

I added the SMBUS/EC patch to DSDT, copied all code blocks with EC support and SBUS support comments. The only difference is that my DSDT doesn't have an LPCB device, so I put the code from it in SBRG, which has the same address.

 

kextstat after SMBUS/EC patch to DSDT:

Index Refs Address            Size       Wired      Name (Version) <Linked Against>
   1   58 0                  0          0          com.apple.kpi.bsd (10.0.0)
   2    4 0                  0          0          com.apple.kpi.dsep (10.0.0)
   3   79 0                  0          0          com.apple.kpi.iokit (10.0.0)
   4   85 0                  0          0          com.apple.kpi.libkern (10.0.0)
   5   68 0                  0          0          com.apple.kpi.mach (10.0.0)
   6   26 0                  0          0          com.apple.kpi.private (10.0.0)
   7   35 0                  0          0          com.apple.kpi.unsupported (10.0.0)
   8    9 0xffffff7f80600000 0x4000     0x4000     com.apple.iokit.IOACPIFamily (1.3.0) <7 6 4 3>
   9   17 0xffffff7f80604000 0x12000    0x12000    com.apple.iokit.IOPCIFamily (2.6) <7 5 4 3>
  10    2 0xffffff7f80616000 0x44000    0x44000    com.apple.driver.AppleACPIPlatform (1.3) <9 8 7 6 5 4 3>
  11    0 0xffffff7f8065a000 0x2000     0x2000     com.psystar.driver.OpenHaltRestart (1.0.3) <4 3>
  12    0 0xffffff7f8065c000 0x18000    0x18000    com.apple.driver.AppleIntelCPUPowerManagement (90.0.0) <7 6 5 4 3 1>
  13    8 0xffffff7f80674000 0x1a000    0x1a000    com.apple.iokit.IOStorageFamily (1.6) <7 6 5 4 3 1>
  14    0 0xffffff7f8068e000 0x12000    0x12000    com.apple.driver.DiskImages (281) <13 7 6 5 4 3 1>
  15    0 0xffffff7f806a0000 0x2000     0x2000     com.superhai.driver.PlatformUUID (1.0.0) <4 3>
  16    0 0xffffff7f806a2000 0x5000     0x5000     com.mojodojo.driver.VoodooMonitor (1.1.1d1) <7 5 4 3>
  17    0 0xffffff7f806a7000 0x8000     0x8000     com.apple.nke.applicationfirewall (2.0.11) <7 6 5 4 3 1>
  18    2 0xffffff7f806af000 0x3000     0x3000     com.apple.kext.AppleMatch (1.0.0d1) <4 1>
  19    0 0xffffff7f806b2000 0x4000     0x4000     com.apple.security.quarantine (0) <18 7 6 5 4 2 1>
  20    0 0xffffff7f806b6000 0x8000     0x8000     com.apple.security.sandbox (0) <18 7 6 5 4 2 1>
  21    0 0xffffff7f806be000 0x3000     0x3000     com.apple.security.TMSafetyNet (6) <7 6 5 4 2 1>
  22    0 0xffffff7f806c1000 0x3000     0x3000     com.apple.driver.AppleAPIC (1.4) <4 3>
  23    0 0xffffff7f806c4000 0x3000     0x3000     com.apple.driver.AppleIntelCPUPowerManagementClient (90.0.0) <7 6 5 4 3 1>
  24    0 0xffffff7f806c7000 0x4000     0x4000     com.apple.driver.AppleSMBIOS (1.4) <7 4 3>
  25    2 0xffffff7f806cb000 0x2000     0x2000     com.apple.iokit.IOSMBusFamily (1.1) <5 4 3>
  26    0 0xffffff7f806cd000 0x6000     0x6000     com.apple.driver.AppleACPIEC (1.3) <25 10 8 5 4 3>
  27    0 0xffffff7f806d3000 0x6000     0x6000     com.apple.driver.AppleRTC (1.3) <8 5 4 3 1>
  28    0 0xffffff7f806d9000 0x3000     0x3000     com.apple.driver.AppleHPET (1.4) <8 7 5 4 3>
  29    2 0xffffff7f806dc000 0x42000    0x42000    com.apple.iokit.IOHIDFamily (1.6.0) <7 6 5 4 3 1>
  30    0 0xffffff7f8071e000 0x4000     0x4000     com.apple.driver.AppleACPIButtons (1.3) <29 10 8 7 6 5 4 3 1>
  33    0 0xffffff7f80727000 0x4000     0x4000     org.netkas.fakesmc (2) <8 7 4 3>
  34    0 0xffffff7f8072b000 0x5000     0x5000     com.apple.AppleFSCompression.AppleFSCompressionTypeZlib (1.0.0d1) <6 4 3 2 1>
  35    0 0xffffff7f80730000 0x4000     0x4000     com.apple.BootCache (31) <7 6 5 4 3 1>
  36    3 0xffffff7f80734000 0x7000     0x7000     com.apple.iokit.IOAHCIFamily (2.0.0) <5 4 3 1>
  37    0 0xffffff7f8073b000 0xe000     0xe000     com.apple.driver.AppleAHCIPort (2.0.0) <36 9 5 4 3 1>
  38    6 0xffffff7f80749000 0x32000    0x32000    com.apple.iokit.IOUSBFamily (3.7.8) <7 5 4 3 1>
  39    0 0xffffff7f8077b000 0x10000    0x10000    com.apple.driver.AppleUSBUHCI (3.7.5) <38 9 7 5 4 3 1>
  40    2 0xffffff7f8078b000 0x4b000    0x4b000    com.apple.iokit.IOFireWireFamily (4.1.7) <5 4 3 1>
  41    0 0xffffff7f807d6000 0x28000    0x28000    com.apple.driver.AppleFWOHCI (4.3.4) <40 9 7 6 5 4 3 1>
  42    0 0xffffff7f807fe000 0x14000    0x14000    com.apple.driver.AppleUSBEHCI (3.7.5) <38 9 7 5 4 3 1>
  43    1 0xffffff7f80812000 0xf000     0xf000     com.apple.iokit.IOATAFamily (2.5.0) <5 4 3 1>
  44    0 0xffffff7f80821000 0x7000     0x7000     com.jmicron.JMicronATA (1.0.0) <43 9 4 3>
  45    0 0xffffff7f80828000 0x2000     0x2000     com.apple.iokit.IOUSBUserClient (3.7.5) <38 5 4 3 1>
  46    0 0xffffff7f8082a000 0x14000    0x14000    com.apple.iokit.IOAHCIBlockStorage (1.5.0) <36 13 5 4 3 1>
  47    3 0xffffff7f8083e000 0x19000    0x19000    com.apple.iokit.IOSCSIArchitectureModelFamily (2.5.1) <5 4 3 1>
  48    0 0xffffff7f80857000 0x9000     0x9000     com.apple.iokit.IOAHCISerialATAPI (1.2.0) <47 36 5 4 3 1>
  49    0 0xffffff7f80860000 0xf000     0xf000     com.apple.driver.AppleUSBHub (3.7.8) <38 5 4 3 1>
  50    0 0xffffff7f8086f000 0x3000     0x3000     com.apple.driver.XsanFilter (402.1) <13 5 4 3 1>
  51    3 0xffffff7f80872000 0x9000     0x9000     com.apple.iokit.IOCDStorageFamily (1.6) <13 5 4 3 1>
  52    2 0xffffff7f8087b000 0x7000     0x7000     com.apple.iokit.IODVDStorageFamily (1.6) <51 13 5 4 3 1>
  53    1 0xffffff7f80882000 0x7000     0x7000     com.apple.iokit.IOBDStorageFamily (1.6) <52 51 13 5 4 3 1>
  54    0 0xffffff7f80889000 0x13000    0x13000    com.apple.iokit.IOSCSIMultimediaCommandsDevice (2.5.1) <53 52 51 47 13 5 4 3 1>
  55    0 0xffffff7f8089c000 0x7000     0x7000     com.apple.iokit.SCSITaskUserClient (2.5.1) <47 13 5 4 3 1>
  56    0 0xffffff7f808a3000 0x4000     0x4000     com.apple.driver.AppleUSBComposite (3.7.5) <38 4 3 1>
  57    0 0xffffff7f808a7000 0x5000     0x5000     com.apple.iokit.IOUSBHIDDriver (3.7.5) <38 29 5 4 3 1>
  58    2 0xffffff7f808ac000 0x8000     0x8000     com.apple.iokit.IOHDAFamily (1.7.4a1) <5 4 3 1>
  59    0 0xffffff7f808b4000 0x10000    0x10000    com.apple.driver.AppleHDAController (1.7.4a1) <58 9 5 4 3 1>
  60    0 0xffffff7f808c4000 0x3000     0x3000     com.apple.driver.AppleLPC (1.4.6) <9 5 4 3>
  61    0 0xffffff7f808c7000 0x2000     0x2000     com.apple.driver.AppleSMBusPCI (1.0.2d0) <9 5 4 3>
  62    1 0xffffff7f808c9000 0xc000     0xc000     com.apple.driver.IOPlatformPluginFamily (3.4.0a20) <6 5 4 3>
  63    2 0xffffff7f808d5000 0xb000     0xb000     com.apple.driver.AppleSMC (3.0.1d2) <8 7 5 4 3>
  64    0 0xffffff7f808e0000 0x11000    0x11000    com.apple.driver.ACPI_SMC_PlatformPlugin (3.4.0a20) <63 62 9 8 7 6 5 4 3>
  65    7 0xffffff7f808f1000 0x34000    0x34000    com.apple.iokit.AppleProfileFamily (40) <9 7 6 5 4 3 1>
  66    0 0xffffff7f80925000 0x8000     0x8000     com.apple.driver.AppleIntelMeromProfile (19) <65 6 5 4 3>
  67    2 0xffffff7f8092d000 0x1a000    0x1a000    com.apple.iokit.IONetworkingFamily (1.8) <7 6 5 4 3 1>
  68    0 0xffffff7f80947000 0x2d000    0x2d000    com.apple.iokit.AppleYukon2 (3.1.14b1) <67 9 5 4 3 1>
  69    3 0xffffff7f80974000 0x23000    0x23000    com.apple.iokit.IOGraphicsFamily (2.0) <9 7 5 4 3>
  70    2 0xffffff7f80997000 0xf000     0xf000     com.apple.iokit.IONDRVSupport (2.0) <69 9 7 5 4 3>
  71    2 0xffffff7f809a6000 0x277000   0x277000   com.apple.NVDAResman (6.0.2) <70 69 9 5 4 3 1>
  72    0 0xffffff7f80c1d000 0x46a000   0x46a000   com.apple.nvidia.nv50hal (6.0.2) <71 4 3>
  73    1 0xffffff7f81087000 0x5000     0x5000     com.apple.kext.OSvKernDSPLib (1.3) <5 4>
  74    3 0xffffff7f8108c000 0x1b000    0x1b000    com.apple.iokit.IOAudioFamily (1.7.0fc16) <73 5 4 3 1>
  75    1 0xffffff7f810a7000 0x72000    0x72000    com.apple.driver.DspFuncLib (1.7.4a1) <74 5 4 3 1>
  76    0 0xffffff7f81119000 0x83000    0x83000    com.apple.driver.AppleHDA (1.7.4a1) <75 74 58 5 4 3 1>
  77    0 0xffffff7f8119c000 0xb000     0xb000     com.apple.driver.AppleSMBusController (1.0.2d0) <25 9 8 5 4 3>
  78    0 0xffffff7f811a7000 0x4000     0x4000     com.apple.driver.AudioIPCDriver (1.1.0) <74 5 4 3 1>
  80    0 0xffffff7f811b3000 0x9000     0x9000     com.apple.iokit.IOFireWireIP (2.0.3) <67 40 5 4 3 1>
  81    0 0xffffff7f811bc000 0xb2000    0xb2000    com.apple.GeForce (6.0.2) <71 70 69 9 7 6 5 4 3 1>
  83    0 0xffffff7f81270000 0x5000     0x5000     com.apple.Dont_Steal_Mac_OS_X (7.0.0) <63 7 4 3 1>
  86    1 0xffffff7f8127f000 0xa000     0xa000     com.apple.iokit.IOSerialFamily (10.0.2) <7 6 5 4 3 1>
  87    0 0xffffff7f81289000 0xa000     0xa000     com.apple.iokit.IOBluetoothSerialManager (2.2.1f7) <86 7 5 4 3 1>
  88    0 0xffffff7f81293000 0xc000     0xc000     com.apple.iokit.IOSurface (73.0) <7 5 4 3 1>
  89    0 0xffffff7f8129f000 0x4000     0x4000     com.evosx86.driver.lspcidrv (1.0) <4 3>
  90    1 0xffffff7f812a3000 0x58000    0x58000    com.apple.filesystems.ntfs (3.0) <7 6 5 4 1>
  91    0 0xffffff7f812fb000 0xa000     0xa000     com.apple.filesystems.autofs (2.1.0) <7 6 5 4 3 1>
  92    0 0xffffff7f81305000 0x3000     0x3000     com.apple.driver.AppleProfileCallstackAction (20) <65 5 4 3 1>
  93    0 0xffffff7f81308000 0x2000     0x2000     com.apple.driver.AppleProfileKEventAction (10) <65 4 3 1>
  94    0 0xffffff7f8130a000 0x2000     0x2000     com.apple.driver.AppleProfileRegisterStateAction (10) <65 4 3 1>
  96    0 0xffffff7f81315000 0x2000     0x2000     com.apple.driver.AppleProfileThreadInfoAction (14) <65 6 4 3 1>
  97    0 0xffffff7f81317000 0x2000     0x2000     com.apple.driver.AppleProfileTimestampAction (10) <65 5 4 3 1>
  98    0 0xffffff7f81319000 0x3000     0x3000     com.apple.driver.AppleProfileReadCounterAction (17) <65 6 4 3>
  99    0 0xffffff7f8131c000 0x5000     0x5000     com.apple.driver.AppleHWSensor (1.9.2d0) <5 4 3>

 

After that I added the "TC0D" key to Info.plist (original FakeSMC) and iStat still shows "0º C" for CPU temp.

 

Could you do the test? Use original fakesmc.kext from netkas and add TC0D key to Info.plist.

 

Thanks for your help.

Link to comment
Share on other sites

I do see those FakeSMC messages in kernel.log, I guess they are the keys that iStat tries to read.

 

I added the SMBUS/EC patch to DSDT, copied all code blocks with EC support and SBUS support comments. The only difference is that my DSDT doesn't have an LPCB device, so I put the code from it in SBRG, which has the same address.

 

kextstat after SMBUS/EC patch to DSDT:

 

<snip />

 

After that I added the "TC0D" key to Info.plist (original FakeSMC) and iStat still shows "0º C" for CPU temp.

Could you do the test? Use original fakesmc.kext from netkas and add TC0D key to Info.plist.

Thanks for your help.

Would you mind attaching yours? The one showing 0? At least then we know for sure that we use the same version.

Link to comment
Share on other sites

Would you mind attaching yours? The one showing 0? At least then we know for sure that we use the same version.

 

Sure, here it is

removed, doesn't work

 

The one attached to the first post also has TC0D in Info.plist, but shows variable temp because it has the code from VoodooMonitor.

Link to comment
Share on other sites

to make what u want, need to edit functons of class which responds for fake device attitude.

 

Could be a condition in applesmc_fill_data?

 

What do you recommend, this or use LoopTimerEvent?

 

Thanks for your attention.

Link to comment
Share on other sites

Sure, here it is

 

 

The one attached to the first post also has TC0D in Info.plist, but shows variable temp because it has the code from VoodooMonitor.

No temps with this version. Just a dash "-" and nothing else.

 

Maybe Netkas can explain why we need fakesmc.kext in the first place, because the kext uses the very same ports. What's the catch here?

 

BTW: I no longer use fakesmc.kext nor any other related kext (never mind asking how because I won't get sacked over this – my employer has a good relationship with Apple).

  • Like 1
Link to comment
Share on other sites

No temps with this version. Just a dash "-" and nothing else.

 

Maybe Netkas can explain why we need fakesmc.kext in the first place, because the kext uses the very same ports. What's the catch here?

 

BTW: I no longer use fakesmc.kext nor any other related kext.

 

Does iStat show CPU temp without fakesmc.kext?

 

Edit: just tried to boot without fakesmc and boot stops before starting the GUI, I guess it's waiting for DSMOS. Did you add some DSDT code to be able to boot without fakesmc?

Link to comment
Share on other sites

Does iStat show CPU temp without fakesmc.kext?

Not without hacking the DSDT first no.

 

Edit: just tried to boot without fakesmc and boot stops before starting the GUI, I guess it's waiting for DSMOS. Did you add some DSDT code to be able to boot without fakesmc?

You cannot boot without fakesmc.kext no. I can because I did something "extra" which I won't reveal or I'll end up in court one day. Think about it what you want, but this is as far as it goes (I have a family to take care off).

 

Asus mobo owners like us are very lucky to have Asus probe code in our DSDT . This basically means that everything we need (CPU/Case/MB temperatures, fan speeds, voltage, bus speed et all) is available in our DSDT.

Link to comment
Share on other sites

Not without hacking the DSDT first no.

 

 

You cannot boot without fakesmc.kext no. I can because I did something "extra" which I won't reveal or I'll end up in court one day. Think about it what you want, but this is as far as it goes (I have a family to take care off).

 

Asus mobo owners like us are very lucky to have Asus probe code in our DSDT . This basically means that everything we need (CPU/Case/MB temperatures, fan speeds, voltage, bus speed et all) is available in our DSDT.

 

No problem man, I respect your reasons.

 

I'll move the temp update code from LoopTimerEvent to applesmc_fill_data as netkas suggested. iStat reads it from SMC each 10 seconds by default, so no need to update it every second, this way it will be updated when it's read.

 

For now this is good to me, I'll edit the first post so if someone is looking for this, won't have to read all posts.

 

If you don't mind, please remove the attachment from post #6, it has the update code in LoopTimerEvent, updates once a second.

 

Thanks again for your help.

Link to comment
Share on other sites

This is a slightly modified FakeSMC kext, I just added the "TC0D" key and some lines of code from VoodooMonitor to update it, so iStat will show the CPU die temp. It was tested on Snow Leopard with iStat 2.0.

 

Thanks goes to Master Chief for his help, and Netkas for the help and for writing FakeSMC.

 

Kext

Source

 

Nice work. Thank you.

Meantime what do you suggest we do about the score and odd errors of missing smckeys that fill up the log? Temperature readout is there all right with your edited fakesmc.

Master Chief's sure a great guy.

Thanks

Link to comment
Share on other sites

Nice work. Thank you.

Meantime what do you suggest we do about the score and odd errors of missing smckeys that fill up the log? Temperature readout is there all right with your edited fakesmc.

I really am tempted to coax Master Chief into revealing how he does it without the fakesmc? Really envy him. Any way still a great guy.

Thanks

 

Thanks man, I'm glad this is useful to you too.

About the log messages there's not much we can do, iStat tries to read a lot of keys, I think even on real Macs not all the keys are valid (depends on the model). If you just want to remove the messages from log, you can remove the debug messages from FakeSMC, just comment out the following line from IOACPIPlatformDeviceCh.cpp

IOLog("FakeSMC: key not found %c%c%c%c, length - %x\n", s->key[0], s->key[1], s->key[2], s->key[3],  s->data_len);

Link to comment
Share on other sites

If you don't want more people asking about this, I recommend everyone to edit their posts about Master Chief's hint or delete them completely, that is the best thing you can do. And Master Chief, you should edit your one, too. (Once you may get your PM box bombed with questions... :wacko:)

Link to comment
Share on other sites

 Share

×
×
  • Create New...