I got the fan rpm reading working! I also enabled four different temperature sensors in iStat, your example only gives me two.
So, to get rpm reading working first you need to add the code below to the
Device (EC), right after the big block
Field (ECOR, ByteAcc, NoLock, Preserve).
Code:
// Fan Speed reading in rpm
Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0x84),
HFN1, 16
}
Then modify FAN0 to read that value. The full
Device (SMCD) in my case looks like that:
Code:
Device (SMCD) // System Monitor and Controll Device
{
Name (_HID, "monitor") // Driver will look for this in order to load or not
Method (FAN0, 0, NotSerialized) // ACPIMonitor FAN 0 Speed
{
Store (\_SB.PCI0.LPC.EC.HFN1, Local0) // Store FAN 0 Control to Local0
Return (Local0)
}
Method (TSYS, 0, NotSerialized) // ACPIMonitor - GPU Temperature as Northbridge (T60p)
{
Store (\_SB.PCI0.LPC.EC.TMP3, Local0)
Return (Local0)
}
Method (TAMB, 0, NotSerialized) // ACPIMonitor - Temperature
{
Store (\_SB.PCI0.LPC.EC.TMP2, Local0)
Return (Local0)
}
Method (TDIM, 0, NotSerialized) // ACPIMonitor - Most Probably Battery Temperature as Memory Controller (T60p)
{
Store (\_SB.PCI0.LPC.EC.TMP6, Local0)
Return (Local0)
}
Method (TCPU, 0, NotSerialized) // Fan Mode Accordind CPU Heatsink Temperature
{
Store (\_SB.PCI0.LPC.EC.TMP0, Local0)
If (LLessEqual (Local0, 0x32)) // CPU Temp is <= 50C
{
Store (Zero, \_SB.PCI0.LPC.EC.HFSP) // Set FAN Off
}
If (LGreaterEqual (Local0, 0x55)) // CPU Temp is >= 85C
{
Store (0x40, \_SB.PCI0.LPC.EC.HFSP) // Set FAN Mode Disengaged - Absolute Maximum
}
Else {
If (LGreaterEqual (Local0, 0x4B)) // CPU Temp is >= 75C
{
Store (0x07, \_SB.PCI0.LPC.EC.HFSP) // Set FAN Mode 7 - Maximum Speed
}
Else {
If (LGreaterEqual (Local0, 0x46)) // CPU Temp is >= 70C
{
Store (0x04, \_SB.PCI0.LPC.EC.HFSP) // Set FAN Mode 4 - Medium Speed
}
Else {
If (LGreaterEqual (Local0, 0x41)) // CPU Temp is >= 65C
{
Store (0x02, \_SB.PCI0.LPC.EC.HFSP) // Set FAN Mode 2
}
Else {
If (LGreaterEqual (Local0, 0x3D)) // CPU Temp is >= 61C
{
Store (0x01, \_SB.PCI0.LPC.EC.HFSP) // Set FAN Mode 1 - Lowest Speed
}
}
}
}
}
Return (Local0)
}
}
I think TMPx sensors except TMP0 and TMP1 (two CPU cores) can differ from system to system in their meaning. Or not, really don't know for sure. In my DSDT I have 8 TMPx registers defined (TMP0-TMP7), so if you have more or less, you can experiment there. It is also possible to modify ACPIMonitor to include GPU sensor definition, but I'm too lazy for that, reading it as Northbridge suits me just fine.