Contribute
Register

Dell Inspiron 15 7559 - Fan Info

Status
Not open for further replies.
I've been examining the ACPISensors code and DSDT code, and I've come to the following observation:

I think ACPISensors (in my case) only reads the first two entries of the TACH package, and (possibly) fails to evaluate anything else. I've tested switching the order of FAN0 and FAN1 in the TACH package (don't think matter should order), and when the fans don't show up in HWMonitor, the kernel log buffer shows the trace code for the FIRST FANx device ONLY!

Here's the code:
Code:
    Device (SMCD)
    {
        Name (_HID, "FAN0000")
        Name (TACH, Package ()
        {
            "CPUFan", "FAN1",
            "System Fan", "FAN0"
        })  
      
        Method (FAN0, 0, Serialized)
        {
            \RMDT.PUSH("running FAN0")
            Store (\_SB.PCI0.LPCB.EC.FANL, Local0)
            \RMDT.P2("[FAN0] FANL is ", Local0)
            Store (\_SB.PCI0.LPCB.EC.FANH, Local1)
            \RMDT.P2("[FAN0] FANH is ", Local1)
          
            If (Local0)
            {
                Subtract (Local0, Local1, Local2)
                Multiply (Local2, 0x3E8, Local2)
                Store (Local2, Local0)
            }
          
            \RMDT.P2("[FAN0] returned Local0 value: ", Local0)
            Return (Local0)
        }
      
        Method (FAN1, 0, Serialized)
        {
            \RMDT.PUSH("running FAN1")
            Store (\_SB.PCI0.LPCB.EC.FA2L, Local0)
            \RMDT.P2("[FAN1] FANL is ", Local0)
            Store (\_SB.PCI0.LPCB.EC.FA2H, Local1)
            \RMDT.P2("[FAN1] FANH is ", Local1)
          
            If (Local0)
            {
                Subtract (Local0, Local1, Local2)
                Multiply (Local2, 0x3E8, Local2)
                Store (Local2, Local0)
            }
          
            \RMDT.P2("[FAN1] returned Local0 value: ", Local0)
            Return (Local0)
        }    
    }

And then kernel log buffer:
Code:
ACPIDebug: "running FAN1"
ACPIDebug: { "[FAN1] FANL is ", 0x0, }
ACPIDebug: { "[FAN1] FANH is ", 0x0, }
ACPIDebug: { "[FAN1] returned Local0 value: ", 0x0, }
ACPIDebug: "running FAN1"
ACPIDebug: { "[FAN1] FANL is ", 0x0, }
ACPIDebug: { "[FAN1] FANH is ", 0x0, }
ACPIDebug: { "[FAN1] returned Local0 value: ", 0x0, }

When I switch it so that "System Fan", "FAN0" is on the top, it'll read and evaluate FAN0. In this case, FAN1 makes up the first two entries in the package, so it evaluates those.

I'll DL the ACPISensors source code and add some traces to the code. The section in particular I'm eyeing is:

Code:
    // Parse tachometer table
    if (kIOReturnSuccess == acpiDevice->evaluateObject("TACH", &object) && object) {
        addSensorsFromArray(OSDynamicCast(OSArray, object), kFakeSMCCategoryFan);
        OSSafeRelease(object);
    }
    else ACPISensorsDebugLog("tachometer description table (TACH) not found");

If you have anything to make of this, please let me know! For now, I'll work on adding traces to ACPISensors source code...

-Duncan

ACPISensors::addSensorsFromArray definitely evaluates all entries returned from TACH:
Code:
...
       for (UInt32 index = 0; index + 1 < array->getCount(); index += 2) {
...
 
ACPISensors::addSensorsFromArray definitely evaluates all entries returned from TACH:
Code:
...
       for (UInt32 index = 0; index + 1 < array->getCount(); index += 2) {
...

Hmm, alright.

I think I enabled debug mode for the kext by defining kACPISensorsDebug as 1...Might find some interesting info with this enabled.
How would I print what objects were evaluated w/ addSensorsFromArray?

How do I build the kext? Sorry for the simple question :lol:

-Duncan
 
How do I build the kext?

Use Xcode. The problem is not likely in the kext, however... Perhaps you should try older builds of HwMonitor.app.

You should probably also turn TACH into a method, so you can do some traces via ACPIDebug. Then you'll know whether it is being called or not.
 
Use Xcode. The problem is not likely in the kext, however... Perhaps you should try older builds of HwMonitor.app.

You should probably also turn TACH into a method, so you can do some traces via ACPIDebug. Then you'll know whether it is being called or not.

Alright ... Will do.

Now just another test I did - set both FAN0 and FAN1 to return 100 & 110 respectively:
Code:
    Device (SMCD)
    {
        Name (_HID, "FAN0000")  // _HID: Hardware ID
        Name (TACH, Package (0x04)
        {
            "System Fan",
            "FAN0",
            "CPUFan",
            "FAN1"
        })
        Method (FAN0, 0, Serialized)
        {
            \RMDT.PUSH ("running FAN0")
            Store (0x64, Local0)
            \RMDT.P2 ("[FAN0] returned Local0 value: ", Local0)
            Return (Local0)
        }

        Method (FAN1, 0, Serialized)
        {
            \RMDT.PUSH ("running FAN1")
            Store (0x6E, Local0)
            \RMDT.P2 ("[FAN1] returned Local0 value: ", Local0)
            Return (Local0)
        }
    }

As usual, only first one in TACH is reported and doesn't show up in HWMonitor...

And for the TACH method, would I just make it a method, and then have it return the regular TACH package?

-Duncan
 

Alright, here's my TACH code:

Code:
        Method(TACH, 0, Serialized)
        {
            \RMDT.PUSH("TACH called")
            Return (Package()
            {
                "System Fan", "FAN0",
                "CPUFan", "FAN1"
            })
        }

Interestingly, I don't see the 'TACH called' trace yet in kernel log buffers ... Will keep looking for it, though.

I was able to record verbose bootup in slo-mo to compensate for there not being any kernel logs yet ...

IRRELEVANT:
In the slo-mo logs, I saw multiple 'ACPI ERROR' messages related to my _OSI > XOSI Clover hotpatch. Disabled the XOSI hotpatch and nothing changed (USB functionality wise) and 'ACPI ERRORS' went away...

Will keep trying older versions of HWMonitor as well...
SMCD is also recognzied in DSDT (checked with IOReg)

Any reason why TACH might not be called / load?

-Duncan
 
Alright, here's my TACH code:

Code:
        Method(TACH, 0, Serialized)
        {
            \RMDT.PUSH("TACH called")
            Return (Package()
            {
                "System Fan", "FAN0",
                "CPUFan", "FAN1"
            })
        }

Interestingly, I don't see the 'TACH called' trace yet in kernel log buffers ... Will keep looking for it, though.

I was able to record verbose bootup in slo-mo to compensate for there not being any kernel logs yet ...

IRRELEVANT:
In the slo-mo logs, I saw multiple 'ACPI ERROR' messages related to my _OSI > XOSI Clover hotpatch. Disabled the XOSI hotpatch and nothing changed (USB functionality wise) and 'ACPI ERRORS' went away...

Will keep trying older versions of HWMonitor as well...
SMCD is also recognzied in DSDT (checked with IOReg)

Any reason why TACH might not be called / load?

-Duncan

Attach ioreg as ZIP: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.

Provide output (in Terminal):
Code:
kextstat|grep -y acpiplat
kextstat|grep -y appleintelcpu
kextstat|grep -y applelpc
kextstat|grep -y applehda

Attach EFI/Clover folder as ZIP (press F4 at main Clover screen before collecting). Please eliminate 'themes' directory. Provide only EFI/Clover, not the entire EFI folder.

Attach output of (in Terminal):
Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /

Compress all files as ZIP. Do not use external links. Attach all files using site attachments only.
 
Attach ioreg as ZIP: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.

Provide output (in Terminal):
Code:
kextstat|grep -y acpiplat
kextstat|grep -y appleintelcpu
kextstat|grep -y applelpc
kextstat|grep -y applehda

Attach EFI/Clover folder as ZIP (press F4 at main Clover screen before collecting). Please eliminate 'themes' directory. Provide only EFI/Clover, not the entire EFI folder.

Attach output of (in Terminal):
Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /

Compress all files as ZIP. Do not use external links. Attach all files using site attachments only.

Terminal outputs:

Code:
Duncans-HackBook-Pro-Retina:~ duncan$ kextstat | grep -y acpiplat
   13    2 0xffffff7f83232000 0x60000    0x60000    com.apple.driver.AppleACPIPlatform (5.0) D748FA50-380C-3F0D-BAD9-EB7A15848EA8 <12 11 7 6 5 4 3 1>
Duncans-HackBook-Pro-Retina:~ duncan$ kextstat | grep -y appleintelcpu
Duncans-HackBook-Pro-Retina:~ duncan$ kextstat | grep -y applelpc
   82    0 0xffffff7f82a08000 0x3000     0x3000     com.apple.driver.AppleLPC (3.1) F51595F0-F9B1-3B85-A1C3-F984DAD4107E <76 12 5 4 3>
Duncans-HackBook-Pro-Retina:~ duncan$ kextstat | grep -y applehda
   94    1 0xffffff7f82eef000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (276.23) 85C22ED3-018F-310B-9E18-76C0188D256C <93 92 78 12 7 6 5 4 3 1>
  128    0 0xffffff7f83071000 0xb4000    0xb4000    com.apple.driver.AppleHDA (9272.51.3) 1C8AE397-E144-3C7E-AE91-698B4E32E8CE <127 97 94 93 92 78 12 11 6 5 4 3 1>
Duncans-HackBook-Pro-Retina:~ duncan$ sudo touch /System/Library/Extensions && sudo kextcache -u /
Password:
Sorry, try again.
Password:
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext USBInjectAll.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext SATA-100-series-unsupported.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext RealtekRTL8111.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelBacklight.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_CPUSensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_ACPISensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Intel_HD_Graphics.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Broadcom_WiFi.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext CodecCommander.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmPatchRAM2.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmFirmwareRepo.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2Keyboard.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2Controller.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2SmartTouchPad.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleHDA_ALC256.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIDebug.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
KernelCache ID: A7F7E436BC8C9E4B6B171501354DF8D0
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>

-Duncan
 

Attachments

  • Archive.zip
    3.8 MB · Views: 116
Terminal outputs:

Code:
Duncans-HackBook-Pro-Retina:~ duncan$ kextstat | grep -y acpiplat
   13    2 0xffffff7f83232000 0x60000    0x60000    com.apple.driver.AppleACPIPlatform (5.0) D748FA50-380C-3F0D-BAD9-EB7A15848EA8 <12 11 7 6 5 4 3 1>
Duncans-HackBook-Pro-Retina:~ duncan$ kextstat | grep -y appleintelcpu
Duncans-HackBook-Pro-Retina:~ duncan$ kextstat | grep -y applelpc
   82    0 0xffffff7f82a08000 0x3000     0x3000     com.apple.driver.AppleLPC (3.1) F51595F0-F9B1-3B85-A1C3-F984DAD4107E <76 12 5 4 3>
Duncans-HackBook-Pro-Retina:~ duncan$ kextstat | grep -y applehda
   94    1 0xffffff7f82eef000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (276.23) 85C22ED3-018F-310B-9E18-76C0188D256C <93 92 78 12 7 6 5 4 3 1>
  128    0 0xffffff7f83071000 0xb4000    0xb4000    com.apple.driver.AppleHDA (9272.51.3) 1C8AE397-E144-3C7E-AE91-698B4E32E8CE <127 97 94 93 92 78 12 11 6 5 4 3 1>
Duncans-HackBook-Pro-Retina:~ duncan$ sudo touch /System/Library/Extensions && sudo kextcache -u /
Password:
Sorry, try again.
Password:
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext USBInjectAll.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext SATA-100-series-unsupported.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext RealtekRTL8111.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelBacklight.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_CPUSensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_ACPISensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Intel_HD_Graphics.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Broadcom_WiFi.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext CodecCommander.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmPatchRAM2.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmFirmwareRepo.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2Keyboard.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2Controller.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2SmartTouchPad.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleHDA_ALC256.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIDebug.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
KernelCache ID: A7F7E436BC8C9E4B6B171501354DF8D0
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>

-Duncan

I don't see anything fundamentally wrong here (you'll have to keep looking into potential HwMonitor bugs).

If you want reliable kernel logs, use 10.11, as I suggested earlier.
 
Status
Not open for further replies.
Back
Top