Jump to content

[HOWTO] ACPI access for monitoring


Slice
 Share

48 posts in this topic

Recommended Posts

  • 4 months later...

Hey @Slice do you have any tip about it?

Ah, sorry, I forgot about this thread.

Will look asap.

Not a much sensors you have

 

 

Sensor               Propriedades do sensor:       Tipo de sensor   CPU, HDD, ACPI, PCH, SNB       Temperaturas:       Processador   44 °C (111 °F)       CPU Package   46 °C (115 °F)       CPU IA Cores   45 °C (113 °F)       CPU GT Cores   46 °C (115 °F)       CPU 1 / Núcleo 1   44 °C (111 °F)       CPU 1 / Núcleo 2   45 °C (113 °F)       Diodo PCH   57 °C (135 °F)       SanDisk SDSSDA240G   [ TRIAL VERSION ]       Valores de voltagens:       Núcleo CPU   1.086 V       VID CPU   1.086 V       Bateria   11.248 V       Potência Dissipada:       CPU Package   6.40 W       CPU IA Cores   4.35 W       CPU GT Cores   [ TRIAL VERSION ]       CPU Uncore   2.01 W       Taxa de carga da bateria   647.58 W

Your DSDT contains some kind of "FAN" names

                FAN1,   1, 
                FAN2,   1, 
                FANT,   1, 

But they are 1 bit so can't be used to calculate FAN  speed.

It is usual for notebooks that you can monitor only CPU temperature. Nothing more to do here.

  • Like 1
Link to comment
Share on other sites

Hi @Slice!

 

@RehabMan said "Sounds like your configuration for ACPISensors/HwMonitor is not correct."

 

so I think making a DSDT might fix my CPU and GPU fan issue

 

The CPU fans start off low and spin up every once in a while, not sure why. After some time, they get stuck on full speed.

 

Here's screenshots of:

 

HWSensors:

 

post-1711084-0-37775300-1504558961_thumb.png 

 

 

Macs Fan Control:

 

post-1711084-0-98874200-1504558956_thumb.png

 

I pulled the original DSDT from Clover and searched for "FAN", "Thermal", "OperatingRegion", but didn't find anything.

 

I did find some values: 

 

    Name (TMF1, Zero)
    Name (TMF2, Zero)
    Name (TMF3, Zero)
 
perhaps they are related to the fan? 
 
I'm looking to make CPU0 and CPU1 and GPU fan speed show properly and allow the system to control them.
Link to comment
Share on other sites

I don't see your DSDT.

 

Thanks for taking a look. Here is the DSDT (zipped) and DumpLog.txt 

 

DSDT.aml.zip

 

DumpLog.txt

 

I checked AID64 in Windows 10 to get config info and testing HW when first building my HackPro and everything appeared to be working properly so the sensors are there.  I can get AIDA64 screenshots from Ubuntu if necessary, 

Link to comment
Share on other sites

@e97

It looks like you have desktop with ordinary LPC chip, proposedly ITE87xx.

                    Method (ENFG, 1, NotSerialized)
                    {
                        Acquire (MUT0, 0x0FFF)
                        INDX = 0x87
                        INDX = 0x87
                        LDN = Arg0
                    }

                    Method (EXFG, 0, NotSerialized)
                    {
                        INDX = 0xAA
                        Release (MUT0)
                    }

So you have to use one of FakeSMC plugin to get FAN information.

Look carefully your motherboard to find this chip anf test different plugins booting the system in Verbose mode. Or just look kernel log.

  • Like 1
Link to comment
Share on other sites

@e97

It looks like you have desktop with ordinary LPC chip, proposedly ITE87xx.

                    Method (ENFG, 1, NotSerialized)
                    {
                        Acquire (MUT0, 0x0FFF)
                        INDX = 0x87
                        INDX = 0x87
                        LDN = Arg0
                    }

                    Method (EXFG, 0, NotSerialized)
                    {
                        INDX = 0xAA
                        Release (MUT0)
                    }

So you have to use one of FakeSMC plugin to get FAN information.

Look carefully your motherboard to find this chip anf test different plugins booting the system in Verbose mode. Or just look kernel log.

 

Thanks @Slice ! 

 

The version of FakeSMC I'm using is pretty old, I will try the latest ones with additional plug-ins. I see the ITE87xx here https://github.com/kozlek/HWSensors/tree/master/SuperIOSensors, but the latest binary at http://hwsensors.com/releases doesn't have SuperIOSensors.kext - is it built into the latest FakeSMC.kext or do I need to manually compile?

Link to comment
Share on other sites

Thanks @Slice ! 

 

The version of FakeSMC I'm using is pretty old, I will try the latest ones with additional plug-ins. I see the ITE87xx here https://github.com/kozlek/HWSensors/tree/master/SuperIOSensors, but the latest binary at http://hwsensors.com/releases doesn't have SuperIOSensors.kext - is it built into the latest FakeSMC.kext or do I need to manually compile?

HWSensors3 http://www.insanelymac.com/forum/topic/299861-hwsensors3/page-14?do=findComment&comment=2493773

is more recent then you pointed. Version 3.5 is newer then 6.1.xxx

And here

http://www.insanelymac.com/forum/topic/299861-hwsensors3/page-15?do=findComment&comment=2494222

Link to comment
Share on other sites

  • 2 weeks later...

I want to show an example SSDT for ACPI monitoring

DefinitionBlock ("SSDT-10.aml", "SSDT", 2, "APPLE ", "Monitor", 0x00001000)
{
	External (\_SB.PCI0.LPCB.ECDV, DeviceObj)
	External (\_SB_.LID0, DeviceObj)
	External (\_SB_.LID0._LID, MethodObj)
	External (\_TZ.THM._TMP, MethodObj)

	Scope (\_SB.PCI0.LPCB.EC)
	{	
                Device (FSAM)
                {
                    Name (_HID, EisaId ("APP0111"))
                    Name (_CID, "monitor")
		    Name (PLID, 0xFFFF)
                    Method (MSLD, 0, NotSerialized)
                    {
			Local0 = \_SB_.LID0._LID ()
            		If (Local0 != PLID)
            		{
                	  PLID = Local0
                	  Notify (\_SB.LID0, 0x80) // Status Change
            	        }
                        Return (Local0)
                    }

                    Method (TSYS, 0, NotSerialized)
                    {
                        Local0 = \_TZ.THM._TMP ()
                        Return (Local0)
                    }
                }		
	}
}

1. Definition for the SSDT. Let it be SSDT-10.

2. Definitions for external methods found in my DSDT

3. Scope when the device will be place. This is EC device but it doesn't matter.

4. Name (PLID...) is an Previous LID state

5. Method (MSLD...) will get current state of LID, and store it into PLID. The idea from Rehabman.

6. If changed then Notify OS driver.

7. Method (TSYS..) having predefined name TSYS will monitor ThermalZone  temperature.

 

ACPIMonitor.Info.plist will have following lines

			<key>keysToAdd</key>
			<dict>
				<key>MSLD</key>
				<string>MSLD-1</string>
			</dict>

It means that ACPI method MSLD will return value for SMC key "MSLD" type "ui8 ", size=1.

It will be polled by OS or we should add the key to HWMonitorSMC for it to poll the key.

 

EDITED.

The easiest way to make polling for _LID is include a call for MSLD into TSYS method.

                    Method (TSYS, 0, NotSerialized)
                    {
                        Local1 = MSLD ()
                        Local0 = \_TZ.THM._TMP ()
                        Return (Local0)
                    }

because TSYS method is polled by HWMonitor every 1 second.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

EDITED.

Value from ThermalZone should be masked so the better to do

                    Method (TSYS, 0, NotSerialized)
                    {
			Local1 = MSLD()
                        Local0 = \_TZ.THM._TMP ()
			Local0 &= 0x7F
                        Return (Local0)
                    }

Link to comment
Share on other sites

  • 2 weeks later...

ACPI method ACDC is predefined in ACPImonitor kext and produces three SMC keys

ACIN, ACEN, ACFP which mean AC power connected.

So you have to write new SSDT like this

DefinitionBlock ("SSDT-10.aml", "SSDT", 2, "APPLE ", "Monitor", 0x00001000)
{
  External (\_SB.PCI0.LPCB.EC, DeviceObj)
  External (\_SB_.LID0, DeviceObj)
  External (\_SB_.LID0._LID, MethodObj)
  External (\_TZ.THM._TMP, MethodObj)
  External (\_SB.ADP1._PSR, MethodObj)   //Power Source

  Scope (\_SB.PCI0.LPCB.EC)
  {
    Device (FSAM)
    {
      Name (_HID, EisaId ("APP0111"))
      Name (_CID, "monitor")
      Name (PLID, 0xFFFF)
      Name (PPSR, 0xFFFF)
      Method (MSLD, 0, NotSerialized)  // LID State
      {
        Local0 = \_SB_.LID0._LID ()
        If (Local0 != PLID)
        {
          PLID = Local0
          Notify (\_SB.LID0, 0x80) // Status Change
        }
        Return (Local0)
      }

      Method (TSYS, 0, NotSerialized)  //System Temperature
      {
        MSLD()                      //_LID polling
        Local0 = \_TZ.THM._TMP ()
        Local0 &= 0x7F
        Return (Local0)
      }

      Method (ACDC, 0, NotSerialized)  // AC Power connected
      {
        Local0 = \_SB.ADP1._PSR ()
        If (Local0 != PPSR)
        {
          PPSR = Local0
          Notify (\_SB.ADP1, 0x80) // Status Change
        }
        Return (PPSR)
      }
    }
  }
}

  • Like 1
Link to comment
Share on other sites

  • 7 months later...

1. You have to learn how to edit DSDT and use it in your bootloader.

2. Then you should read the topic and ask if any word from it is unknown to you.

Link to comment
Share on other sites

  • 1 year later...

Hi Slice,

I followed your guide and found ThermalZone (THM), however, I would like to find the fan speed inside my DSDT, but with no luck with some keywords. My laptop is DELL Inspiron 7370. Here I attached my DSDT.aml

 

ThermalZone:

Scope (_TZ)
    {
        ThermalZone (THM)
        {
            Method (_CRT, 0, NotSerialized)  // _CRT: Critical Temperature
            {
                Store (0x6B, Local0)
                Multiply (Local0, 0x0A, Local0)
                Add (Local0, 0x0AAC, Local0)
                Return (Local0)
            }

            Method (_TMP, 0, NotSerialized)  // _TMP: Temperature
            {
                Store (GENS (0x16, Zero, Zero), Local0)
                If (LLess (Local0, 0x0BA6))
                {
                    Store (0x0BA6, Local0)
                }

                Return (Local0)
            }
        }
    }

 

Hope you can give me some tips for fan sensor.

 

Thanks!

twsps

 

DSDT.aml

Link to comment
Share on other sites

On 7/28/2019 at 3:52 AM, Slice said:

There is no fan sensor in my dsdt.

Hi Slice,

 

I got the fan rpm by installing SMMSensor kext. The last sensor that isn't showing right value is the thermal zone, my thermal zone 1 temp keeps showing 25C. is my thermal zone temp GENS based on the above ThermalZone DSDT code?

 

Thanks,

twsps

Link to comment
Share on other sites

In the Dell ACPI system there are multiple methods based on SMM subsystem. One of them is Thermal Zone.

The method GENS() is SMM method.

    Scope (_TZ)
    {
        ThermalZone (THM)
        {
            Method (_CRT, 0, NotSerialized)  // _CRT: Critical Temperature
            {
                Local0 = 0x6B
                Local0 *= 0x0A
                Local0 += 0x0AAC
                Return (Local0)
            }

            Method (_TMP, 0, NotSerialized)  // _TMP: Temperature
            {
                Local0 = GENS (0x16, Zero, Zero)
                If (Local0 < 0x0BA6)
                {
                    Local0 = 0x0BA6
                }

                Return (Local0)
            }
        }
    }

You have to not mix SMMSensors with ACPI access.

Link to comment
Share on other sites

 Share

×
×
  • Create New...