Contribute
Register

Fan not working properly

Status
Not open for further replies.
Joined
Aug 9, 2013
Messages
61
Motherboard
Acer Swift 3 SF314-51-59TD
CPU
i5-7200U
Graphics
HD 620, 1920x1080
Mobile Phone
  1. iOS
Hi.
My laptop fan doesn't work properly. Sometimes it starts and sometimes it does not. The only way to ensure it starts, it's to overheat the PC and then reboot. Booting up fan will for sure start.
I've been told I had ACPI patched wrong, so I re-patched my DSDT.
What else can I do?

Here below I attached the Problem Reporting files.
 

Attachments

  • Problem Reporting - PM 3.zip
    5.1 MB · Views: 111
Hi.
My laptop fan doesn't work properly. Sometimes it starts and sometimes it does not. The only way to ensure it starts, it's to overheat the PC and then reboot. Booting up fan will for sure start.
I've been told I had ACPI patched wrong, so I re-patched my DSDT.
What else can I do?

Here below I attached the Problem Reporting files.

Your ACPI setup is wrong.
You have patched SSDTs in ACPI/patched, but are missing correct settings for DropOem and SortedOrder.
Read the guide:
https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/
 

Attachments

  • Problem Reporting - PM 4.zip
    5 MB · Views: 98
Okay, I think I resolved that.

Your settings are still wrong.
Because you have patched SSDTs in ACPI/patched, you need DropOem=true.
And you need to specify the order of SSDTs with SortedOrder.
You have no SortedOrder and DropOem=false.

But... you have no patches to the SSDTs anyway... So you might as well remove SSDT-0 through SSDT-3.aml in ACPI/patched, leave DropOem=false, and continue to omit SortedOrder.

My fan seems to be loading but HWmonitor still doesn't recognize it nor show it, so I'm not sure it's 100% fixed.

Fan reading requires ACPI reverse engineering and creating specific ACPI code that can be recognized by FakeSMC_ACPISensors.kext.
 
Your settings are still wrong.
Because you have patched SSDTs in ACPI/patched, you need DropOem=true.
And you need to specify the order of SSDTs with SortedOrder.
You have no SortedOrder and DropOem=false.

But... you have no patches to the SSDTs anyway... So you might as well remove SSDT-0 through SSDT-3.aml in ACPI/patched, leave DropOem=false, and continue to omit SortedOrder.
What o_O I had inserted SortedOrder and set DropOem=true... I must have messed up with saving

Fan reading requires ACPI reverse engineering and creating specific ACPI code that can be recognized by FakeSMC_ACPISensors.kext.
Is there a thread where I can read useful information and try to understand how to do it?
 
Is there a thread where I can read useful information and try to understand how to do it?

Look at my ProBook example on github.
 
Look at my ProBook example on github.

Okay, I was wondering if PTID device has something to do with RPM and fan reading, because I see "Fan RPM" under OSDL, but I can't find any reference to OSDL in the DSDT.

Code:
 Device (PTID)
        {
            Name (CADR, Zero)
            Name (WLEN, Zero)
            Name (RLEN, Zero)
            Name (CAMD, Zero)
            Name (OBUF, Buffer (0x10) {})
            Name (IBUF, Buffer (0x0F) {})
            Name (ERRN, Zero)
            Name (_HID, EisaId ("INT340E"))  // _HID: Hardware ID
            Name (_CID, EisaId ("PNP0C02"))  // _CID: Compatible ID
            Name (IVER, 0x00030000)
            Name (TSDL, Package (0x04)
            {
                Zero,
                "CPU Temperature",
                0x05,
                "PCH Temperature"
            })
            Name (TMPV, Package (0x02)
            {
                0x80000000,
                0x80000000
            })
            Name (PSDL, Package (0x04)
            {
                Zero,
                "CPU Power",
                One,
                "Gfx Power"
            })
            Name (PWRV, Package (0x02)
            {
                0x80000000,
                0x80000000
            })
            Name (OSDL, Package (0x06)
            {
                0x04,
                "Fan RPM",
                "RPM",
                0x0C,
                "Battery Capaciy",
                "mAh"
            })
            Name (OSDV, Package (0x02)
            {
                0x80000000,
                0x80000000
            })
            Method (TSDD, 0, NotSerialized)
            {
                Name (TMPC, Zero)
                Store (^^PCI0.LPCB.EC0.ECPU, TMPC)
                Store (TMPC, Index (TMPV, Zero))
                Store (^^PCI0.LPCB.EC0.ECPU, TMPC)
                Store (TMPC, Index (TMPV, One))
                Return (TMPV)
            }

            Method (PWRG, 0, NotSerialized)
            {
                Return (Ones)
            }

            Method (PSDD, 0, NotSerialized)
            {
                Name (PWRC, Zero)
                Store (PWRG (), PWRC)
                Store (PWRC, Index (PWRV, Zero))
                Store (PWRG (), PWRC)
                Store (PWRC, Index (PWRV, One))
                Return (PWRV)
            }

            Method (OSDG, 0, NotSerialized)
            {
                Return (Ones)
            }

            Method (OSDD, 0, NotSerialized)
            {
                Name (OSDC, Zero)
                Store (OSDG (), OSDC)
                Store (OSDC, Index (OSDV, Zero))
                Store (OSDG (), OSDC)
                Store (OSDC, Index (OSDV, One))
                Return (OSDV)
            }

            Method (SDSP, 0, NotSerialized)
            {
                Return (0x0A)
            }

            Name (MBOX, Buffer (0x1A) {})
            Name (PADA, Package (0x0A)
            {
                One,
                0xFFFFFFFF,
                0xFFFFFFFF,
                0x1A,
                0xFFFFFFFF,
                0xFFFFFFFF,
                0xFFFFFFFF,
                0xFFFFFFFF,
                0xFFFFFFFF,
                0xFFFFFFFF
            })
            Name (PADD, Package (0x0A)
            {
                0x02,
                0x0271,
                0x0270,
                0x1A,
                0x62,
                0x63,
                0x60,
                0x61,
                0x65,
                0x64
            })
            Method (PADT, 0, NotSerialized)
            {
                And (^^PCI0.LPCB.EC0.PBSY, 0x80, Local0)
                If (LEqual (Local0, Zero))
                {
                    Return (PADD)
                }

                Return (PADA)
            }

            Method (RPMD, 0, NotSerialized)
            {
                Store (Zero, Local0)
                Store (0x0A, Local1)
                Add (WLEN, Local1, Local1)
                While (LLess (Local0, RLEN))
                {
                    Store (DerefOf (Index (IBUF, Local0)), Index (MBOX, Local1))
                    Add (One, Local0, Local0)
                    Add (One, Local1, Local1)
                }

                Return (MBOX)
            }

            Method (WPMD, 1, NotSerialized)
            {
                If (LNotEqual (SizeOf (Arg0), 0x1A))
                {
                    Return (0xFFFFFFFF)
                }

                Store (Zero, Local0)
                While (LLess (Local0, 0x1A))
                {
                    Store (DerefOf (Index (Arg0, Local0)), Index (MBOX, Local0))
                    Add (One, Local0, Local0)
                }

                Store (DerefOf (Index (Arg0, 0x06)), CADR)
                Store (DerefOf (Index (Arg0, 0x07)), WLEN)
                Store (DerefOf (Index (Arg0, 0x08)), RLEN)
                Store (DerefOf (Index (Arg0, 0x09)), CAMD)
                Name (CUNT, Zero)
                Store (Zero, CUNT)
                Store (0x0A, Local0)
                While (LLess (CUNT, WLEN))
                {
                    Store (DerefOf (Index (Arg0, Local0)), Index (OBUF, CUNT))
                    Add (CUNT, One, CUNT)
                    Add (Local0, One, Local0)
                }

                Return (Zero)
            }

            Name (CYCT, Zero)
            Method (ISPC, 0, NotSerialized)
            {
                Store (DerefOf (Index (MBOX, 0x03)), CYCT)
                ShiftLeft (CYCT, 0x08, CYCT)
                Add (CYCT, DerefOf (Index (MBOX, 0x02)), CYCT)
                ShiftLeft (CYCT, 0x08, CYCT)
                Add (CYCT, DerefOf (Index (MBOX, One)), CYCT)
                ShiftLeft (CYCT, 0x08, CYCT)
                Add (CYCT, DerefOf (Index (MBOX, Zero)), CYCT)
                If (LGreaterEqual (CYCT, One))
                {
                    Store (DerefOf (Index (MBOX, 0x04)), Local0)
                    Multiply (Local0, 0x0A, Local0)
                    Sleep (Local0)
                }

                Store (^^PCI0.LPCB.EC0.PECI (CADR, WLEN, RLEN, CAMD, OBUF, IBUF, ERRN), Local0)
                If (LEqual (Local0, One))
                {
                    If (LGreater (CYCT, Zero))
                    {
                        Subtract (CYCT, One, CYCT)
                        And (CYCT, 0xFF, Index (MBOX, Zero))
                        And (CYCT, 0xFF00, Local0)
                        ShiftRight (Local0, 0x08, Index (MBOX, One))
                        And (CYCT, 0x00FF0000, Local0)
                        ShiftRight (Local0, 0x10, Index (MBOX, 0x02))
                        And (CYCT, 0xFF000000, Local0)
                        ShiftRight (Local0, 0x18, Index (MBOX, 0x03))
                    }
                }
            }

            Method (ENPC, 0, NotSerialized)
            {
                Store (Zero, CYCT)
            }

            Method (RPCS, 0, NotSerialized)
            {
                Name (TPCS, Zero)
                If (LGreater (CYCT, Zero))
                {
                    Store (One, TPCS)
                    ISPC ()
                }
                Else
                {
                    Store (Zero, TPCS)
                }

                Return (TPCS)
            }

            Method (RPEC, 0, NotSerialized)
            {
                Name (TPEC, Zero)
                Store (ERRN, TPEC)
                Return (TPEC)
            }
        }

Do you also have ProBook DSDT and SSDT files so I can make comparison between them and the patch, and understand what refers to what?

Code:
 External(\_SB.PCI0, DeviceObj)
    External(\_SB.PCI0.LPCB, DeviceObj)
    External(\_SB.PCI0.LPCB.EC, DeviceObj)
    External(\_SB.PCI0.LPCB.EC.ECMX, MutexObj)
    External(\_SB.PCI0.LPCB.EC.CRZN, FieldUnitObj)
    External(\_SB.PCI0.LPCB.EC.TEMP, FieldUnitObj)
    External(\_SB.PCI0.LPCB.EC.FRDC, FieldUnitObj)
    External(\_SB.PCI0.LPCB.EC.DTMP, FieldUnitObj)
    External(\_SB.PCI0.LPCB.EC.FTGC, FieldUnitObj)
    External(\_SB.PCI0.LPCB.EC.ECRG, FieldUnitObj)

I see those lines but obviously "[...].ECRG" etc. are not the same in my DSDT. I am wondering how can I understand how they correlate with mines, and which are the one I have to pick.
For example, searching for "\_SB.PCI0.LPCB.EC.ECxx" show 5 different lines, with "\_SB.PCI0.LPCB.EC.ECAV" being the most used in this scope:

Code:
Scope (_TZ)
    {
        Name (ATMP, 0x3C)
        Name (LTMP, 0x3C)
        Name (FANS, Zero)
        Method (RTMP, 0, NotSerialized)
        {
            If (\_SB.PCI0.LPCB.EC0.ECAV ())
            {
                Store (\_SB.PCI0.LPCB.EC0.ECPU, Local0)
                If (LLess (Local0, 0x80))
                {
                    Store (Local0, LTMP)
                }
            }

            Return (LTMP)
        }

        Method (RCRT, 0, NotSerialized)
        {
            If (\_SB.PCI0.LPCB.EC0.ECAV ())
            {
                Store (\_SB.PCI0.LPCB.EC0.ECRT, Local0)
                If (LLess (Local0, 0x80))
                {
                    Store (Local0, \_SB.TCRT)
                }
            }
        }

        Method (RPSV, 0, NotSerialized)
        {
            If (\_SB.PCI0.LPCB.EC0.ECAV ())
            {
                Store (\_SB.PCI0.LPCB.EC0.EPSV, Local0)
                If (LLess (Local0, 0x80))
                {
                    Store (Local0, \_SB.TPSV)
                }
            }
        }

        Method (RFAN, 1, NotSerialized)
        {
            If (\_SB.PCI0.LPCB.EC0.ECAV ())
            {
                Store (\_SB.PCI0.LPCB.EC0.ST83 (Arg0), Local0)
                If (LEqual (Local0, 0xFF))
                {
                    Return (Local0)
                }

                Store (\_SB.PCI0.LPCB.EC0.TACH (Arg0), Local0)
                Divide (Local0, 0x64, Local1, Local0)
                Add (Local0, One, Local0)
                If (LLessEqual (Local0, 0x3C))
                {
                    Store (Local0, FANS)
                }
                Else
                {
                    Store (FANS, Local0)
                }
            }
            Else
            {
                Store (Zero, Local0)
            }

            Return (Local0)
        }

        Method (RFSE, 0, NotSerialized)
        {
            If (\_SB.PCI0.LPCB.EC0.ECAV ())
            {
                Store (\_SB.PCI0.LPCB.EC0.ST83 (Zero), Local1)
                If (LLess (Local1, 0x80))
                {
                    If (LLess (Local1, 0x0A))
                    {
                        Store (Zero, Local0)
                    }
                    Else
                    {
                        Store (One, Local0)
                    }
                }
                ElseIf (LLess (Local1, 0xF5))
                {
                    Store (0x02, Local0)
                }
                Else
                {
                    Store (0x03, Local0)
                }
            }
            Else
            {
                Store (Zero, Local0)
            }

            Return (Local0)
        }

        Method (TCHG, 0, NotSerialized)
        {
        }

        Method (THDL, 0, NotSerialized)
        {
        }

        Method (TMSS, 1, NotSerialized)
        {
        }

        Method (TMSW, 1, NotSerialized)
        {
        }
    }

I don't know if this matter in fan control and readings but I see references to TACH method and to "FANS", and also 7 out of 9 "\_SB.PCI0.LPCB.EC0.ECxx" lines are in that scope.
 
Last edited:
Okay, I was wondering if PTID device has something to do with RPM and fan reading, because I see "Fan RPM" under OSDL, but I can't find any reference to OSDL in the DSDT.

You should not expect any reference...
OSDL (and other PTID methods) are for use outside DSDT...

Do you also have ProBook DSDT and SSDT files so I can make comparison between them and the patch, and understand what refers to what?

Native files for 4530s and 4540s are on github.
 
Status
Not open for further replies.
Back
Top