nbfc icon indicating copy to clipboard operation
nbfc copied to clipboard

Config Request for HP Pavilion 15 -cx0xxx

Open confuciussayuhm opened this issue 2 years ago • 4 comments

Hello there. I have been trying for a while now to get nbfc working on my laptop. I originally followed the wiki guide but found it quite daunting and ended up applying one-by-one all the different HP configs noting which profiles made changes to my fan speed. I found one in particular (HP Compaq 15-s103tx) which somehow manages to set my fan to 100%. I then copied this profile and started to edit it as it wasn't working 100% for me. After playing around with this particular config I found that it does something to the way the EC handles battery charging and puts my laptop into some state where it does not want to charge. I have to either take the battery out or wait for the laptop to die entirely before Windows boots correctly. I, therefore, infer that what I thought were the read/write fan registers (for the HP Compaq 15-s103tx) are something else entirely on my laptop. I found that the reason my fan goes to 100% using the HP Compaq 15-s103tx is that the critical temperature was met in the profile. Any other adjustments to try and "force" the fan to a specific speed fail.

I request assistance going through the following EmbeddedController "code" that I have taken out of the extracted DSDT to identify which are the correct registers I should be testing.

        Device (EC0)
        {
            Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */)  // _HID: Hardware ID
            Name (_GPE, 0x14)  // _GPE: General Purpose Events
            Name (OKEC, One)
            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
            {
                IO (Decode16,
                    0x0062,             // Range Minimum
                    0x0062,             // Range Maximum
                    0x01,               // Alignment
                    0x01,               // Length
                    )
                IO (Decode16,
                    0x0066,             // Range Minimum
                    0x0066,             // Range Maximum
                    0x01,               // Alignment
                    0x01,               // Length
                    )
            })
            Method (_REG, 2, NotSerialized)  // _REG: Region Availability
            {
                If ((Arg0 == 0x03))
                {
                    OKEC = Arg1
                    OSTP ()
                    ECFG (One)
                    MSFG = (S0ID & One)
                    PBOV = (PB1E & One)
                }
            }

            Method (CMDW, 2, NotSerialized)
            {
                Name (TEMP, One)
                While (TEMP)
                {
                    ECTB = Zero
                    TEMP = ECTB /* \_SB_.PCI0.LPCB.EC0_.ECTB */
                }

                ECTB = One
                ECMD = Arg0
                EDT1 = Arg1
                ECTE = One
                TEMP = One
                While (TEMP)
                {
                    TEMP = ECTE /* \_SB_.PCI0.LPCB.EC0_.ECTE */
                }

                ECTB = Zero
            }

            OperationRegion (ECMM, SystemMemory, 0xFC7E0800, 0x1000)
            Field (ECMM, AnyAcc, Lock, Preserve)
            {
                REC1,   8, 
                REC2,   8, 
                WEC1,   8, 
                WEC2,   8, 
                WMIM,   8, 
                Offset (0x06), 
                STMS,   2, 
                MBMS,   2, 
                ACLS,   1, 
                MBSS,   1, 
                CSHE,   1, 
                ACSP,   1, 
                PSAC,   1, 
                PSBC,   1, 
                PSED,   1, 
                Offset (0x08), 
                PSPD,   8, 
                BCPD,   8, 
                BSTH,   8, 
                PRDT,   8, 
                UCPT,   8, 
                HHKP,   8, 
                SADP,   8, 
                FANE,   1, 
                CPUO,   1, 
                M4GO,   1, 
                FNSW,   1, 
                SBTC,   1, 
                AMDK,   1, 
                    ,   1, 
                EHP1,   1, 
                SAD2,   8, 
                FRPM,   8, 
                FNMX,   8, 
                FNMN,   8, 
                FWPM,   8, 
                RSTV,   8, 
                CPTV,   8, 
                GPTV,   8, 
                PHTV,   8, 
                FNTV,   8, 
                BTTV,   8, 
                HDTV,   8, 
                    ,   1, 
                    ,   1, 
                W2BS,   1, 
                SK6U,   1, 
                BARD,   1, 
                    ,   1, 
                FNHK,   1, 
                Offset (0x1D), 
                FBST,   1, 
                NGPS,   1, 
                BCDG,   1, 
                DGPS,   1, 
                DGRS,   1, 
                Offset (0x1E), 
                DGPE,   1, 
                DGHR,   1, 
                FBPC,   1, 
                EC6I,   1, 
                EC6O,   1, 
                GC6E,   1, 
                RG12,   1, 
                Offset (0x21), 
                BTNO,   8, 
                Offset (0x23), 
                NVDX,   8, 
                Offset (0x25), 
                CFBE,   1, 
                EPCF,   1, 
                Offset (0x26), 
                DPTC,   8, 
                Offset (0x2A), 
                PBSM,   2, 
                SBSM,   2, 
                    ,   2, 
                BMNC,   1, 
                BCLC,   1, 
                Offset (0x2C), 
                IOAF,   8, 
                BCTL,   128, 
                Offset (0x45), 
                ATTE,   16, 
                RTTE,   16, 
                BC00,   8, 
                BC01,   8, 
                BC02,   8, 
                BC03,   8, 
                BC04,   8, 
                BC05,   8, 
                BC06,   8, 
                BC07,   8, 
                MXER,   8, 
                ATTF,   16, 
                SBVR,   16, 
                NBM1,   1, 
                BBM1,   1, 
                PBM1,   1, 
                Offset (0x58), 
                IOST,   16, 
                BMNE,   16, 
                WACL,   1, 
                Offset (0x5D), 
                ERIB,   16, 
                Offset (0x61), 
                SMST,   8, 
                SMAD,   8, 
                SMCM,   8, 
                SMD0,   256, 
                BCNT,   8, 
                SMAA,   24, 
                SMBN,   8, 
                Offset (0x90), 
                BMNN,   72, 
                BN00,   8, 
                BN01,   8, 
                BN02,   8, 
                BN03,   8, 
                BN04,   8, 
                BN05,   8, 
                BN06,   8, 
                Offset (0xA1), 
                    ,   1, 
                VIDO,   1, 
                TOUP,   1, 
                Offset (0xA2), 
                ODTS,   8, 
                OSTY,   4, 
                    ,   1, 
                PBOV,   1, 
                ECRD,   1, 
                ADPT,   1, 
                PWAK,   1, 
                MWAK,   1, 
                LWAK,   1, 
                RWAK,   1, 
                WWAK,   1, 
                UWAK,   1, 
                KWAK,   1, 
                TWAK,   1, 
                CCAC,   1, 
                AOAC,   1, 
                BLAC,   1, 
                PSRC,   1, 
                BOAC,   1, 
                LCAC,   1, 
                AAAC,   1, 
                ACAC,   1, 
                S3ST,   1, 
                S3RM,   1, 
                S4ST,   1, 
                S4RM,   1, 
                S5ST,   1, 
                S5RM,   1, 
                CSST,   1, 
                CSRM,   1, 
                OSTT,   8, 
                OSST,   8, 
                THLT,   8, 
                TCNL,   8, 
                MODE,   1, 
                    ,   2, 
                INIT,   1, 
                FAN1,   1, 
                FAN2,   1, 
                FANT,   1, 
                SKNM,   1, 
                SDTM,   8, 
                FSSN,   4, 
                FANU,   4, 
                PCVL,   6, 
                SWTO,   1, 
                TTHR,   1, 
                TTHM,   1, 
                THTL,   1, 
                TFCT,   1, 
                NPST,   5, 
                CTMP,   8, 
                CTML,   8, 
                EST3,   8, 
                SKTB,   8, 
                SKTC,   8, 
                DPOT,   8, 
                EST1,   8, 
                EST2,   8, 
                    ,   1, 
                LIDF,   1, 
                PMEE,   1, 
                PWBE,   1, 
                RNGE,   1, 
                BTWE,   1, 
                Offset (0xB9), 
                BRTS,   8, 
                S35M,   1, 
                S35S,   1, 
                    ,   1, 
                MSFG,   1, 
                FFEN,   1, 
                FFST,   1, 
                Offset (0xBB), 
                WLAT,   1, 
                BTAT,   1, 
                WLEX,   1, 
                BTEX,   1, 
                KLSW,   1, 
                WLOK,   1, 
                AT3G,   1, 
                EX3G,   1, 
                PJID,   8, 
                CPUJ,   3, 
                CPNM,   3, 
                GATY,   2, 
                BTP0,   1, 
                BTP1,   1, 
                    ,   2, 
                BCC0,   1, 
                BCC1,   1, 
                Offset (0xBF), 
                Offset (0xC0), 
                BTY0,   1, 
                BAM0,   1, 
                BAL0,   1, 
                    ,   1, 
                BMF0,   3, 
                Offset (0xC1), 
                BST0,   8, 
                BRC0,   16, 
                BSN0,   16, 
                BPV0,   16, 
                BDV0,   16, 
                BDC0,   16, 
                BFC0,   16, 
                GAU0,   8, 
                BAT0,   8, 
                BPC0,   16, 
                BAC0,   16, 
                BCG0,   16, 
                BFCB,   16, 
                BTPB,   16, 
                BOL0,   1, 
                BFS0,   1, 
                Offset (0xDB), 
                ORRF,   1, 
                Offset (0xDC), 
                    ,   2, 
                SBIS,   1, 
                Offset (0xDE), 
                BSSB,   16, 
                Offset (0xE3), 
                BCV1,   16, 
                BCV2,   16, 
                BCV3,   16, 
                BCV4,   16, 
                MUAC,   16, 
                CYC0,   8, 
                Offset (0xF4), 
                BMD0,   16, 
                BACV,   16, 
                BDN0,   8, 
                Offset (0xFB), 
                OTAW,   8, 
                Offset (0xFF), 
                CYC1,   8, 
                Offset (0x2C3), 
                    ,   3, 
                GBTC,   1, 
                Offset (0x3B0), 
                Offset (0x3BC), 
                CPUT,   8, 
                Offset (0x3BE), 
                CPUU,   8, 
                Offset (0x3C0)
            }

            OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
            Field (ERAM, ByteAcc, Lock, Preserve)
            {
                Offset (0x5F), 
                ERBD,   8, 
                SMPR,   8, 
                Offset (0x62)
            }

            OperationRegion (CCLK, SystemIO, 0x1810, 0x04)
            Field (CCLK, DWordAcc, NoLock, Preserve)
            {
                    ,   1, 
                DUTY,   3, 
                THEN,   1, 
                Offset (0x01), 
                FTT,    1, 
                    ,   8, 
                TSTS,   1
            }

            Method (FANG, 1, NotSerialized)
            {
                Local0 = EIDR (Arg0)
                Return (Local0)
            }

            Method (FANW, 2, NotSerialized)
            {
                EIDW (Arg0, Arg1)
                Return (Arg1)
            }

            Method (TUVR, 1, NotSerialized)
            {
                Return (0x05)
            }

            Method (THRO, 1, NotSerialized)
            {
                ITHR (Arg0)
            }

            Method (CLCK, 1, NotSerialized)
            {
                If ((Arg0 == Zero))
                {
                    THEN = Zero
                    FTT = Zero
                }
                Else
                {
                    DUTY = Arg0
                    THEN = One
                }

                Return (THEN) /* \_SB_.PCI0.LPCB.EC0_.THEN */
            }

            Method (PCLK, 0, NotSerialized)
            {
                IPCL ()
            }

            Method (ITHR, 1, NotSerialized)
            {
                If ((Arg0 == Zero))
                {
                    Return (0xFF)
                }
                ElseIf ((Arg0 == One))
                {
                    Return (DUTY) /* \_SB_.PCI0.LPCB.EC0_.DUTY */
                }
                ElseIf ((Arg0 == 0x02))
                {
                    Return (TTHR) /* \_SB_.PCI0.LPCB.EC0_.TTHR */
                }
                Else
                {
                    Return (0xFF)
                }
            }

            Method (IPCL, 0, NotSerialized)
            {
                Local0 = PCVL /* \_SB_.PCI0.LPCB.EC0_.PCVL */
                CPPC = Local0
                PNOT ()
            }

            Method (_Q37, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_37====="
                P80H = 0x37
                Notify (ACAD, 0x80) // Status Change
                Sleep (0x03E8)
                Notify (BAT1, 0x80) // Status Change
                ^^^^WMID.WEI1 = 0x03
                ^^^^WMID.WED1 = Zero
                Notify (WMID, 0x80) // Status Change
                PWRS = One
                PNOT ()
            }

            Method (_Q38, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_38====="
                P80H = 0x38
                Notify (ACAD, 0x80) // Status Change
                Sleep (0x03E8)
                Notify (BAT1, 0x80) // Status Change
                PWRS = Zero
                PNOT ()
            }

            Method (_Q40, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_40====="
                P80H = 0x40
                Local0 = Zero
                If ((OSYS >= 0x07DC))
                {
                    Notify (WLBU, 0x80) // Status Change
                }
                Else
                {
                    ^^^^WLBU.UPWL ()
                    Sleep (0xC8)
                    ^^^^WMID.WEI1 = 0x05
                    ^^^^WMID.WED1 = Zero
                    Notify (WMID, 0x80) // Status Change
                }
            }

            Method (_Q48, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_48====="
                P80H = 0x48
                If ((NGPS == Zero))
                {
                    P80H = 0x48
                    Notify (^^^PEG0.PEGP, 0xD1) // Hardware-Specific
                }
                Else
                {
                    P80H = 0x49
                    Local0 = (NVDX + 0xD1)
                    Notify (^^^PEG0.PEGP, Local0)
                }
            }

            Method (_Q49, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_49====="
                P80H = 0x49
                If (ECOK ())
                {
                    CMDW (0x45, 0x45)
                    \_TZ.TZ02.TZTP = One
                    Notify (\_TZ.TZ02, 0x80) // Status Change
                }
                Else
                {
                    \_TZ.TZ02.TZTP = Zero
                }
            }

            Method (_Q4D, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                P80B = 0x4D
                Debug = "=====QUERY_26====="
                If (BMNC)
                {
                    ^^^^WMID.WEI1 = 0x16
                    ^^^^WMID.WED1 = One
                    Notify (WMID, 0x80) // Status Change
                }

                If (BCLC)
                {
                    ^^^^WMID.WEI1 = 0x16
                    ^^^^WMID.WED1 = One
                    Notify (WMID, 0x80) // Status Change
                }
            }

            OperationRegion (PRT0, SystemIO, 0x80, 0x04)
            Field (PRT0, ByteAcc, Lock, Preserve)
            {
                P80H,   8
            }

            Method (_Q10, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
            }

            Method (_Q11, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_11====="
                P80H = 0x11
                If (IGDS)
                {
                    Notify (^^^GFX0.DD1F, 0x87) // Device-Specific
                }
                Else
                {
                }
            }

            Method (_Q12, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_12====="
                P80H = 0x12
                If (IGDS)
                {
                    Notify (^^^GFX0.DD1F, 0x86) // Device-Specific
                }
                Else
                {
                }
            }

            Method (_Q15, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_15====="
                P80H = 0x15
                If (IGDS)
                {
                    Local0 = LIDF /* \_SB_.PCI0.LPCB.EC0_.LIDF */
                    Local0 = ~Local0
                    Local0 &= One
                    Local0 += 0x02
                    If (^^^GFX0.GLID (Local0))
                    {
                        ^^^GFX0.CLID |= 0x80000000 /* External reference */
                    }
                }

                Notify (LID0, 0x80) // Status Change
            }

            Method (_Q1D, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_1D====="
                P80H = 0x1D
                PCLK ()
            }

            Method (_Q1E, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_1E====="
                P80H = 0x1E
                If (CTUR)
                {
                    If ((TFCT == Zero))
                    {
                        CSMI (0xDA, Zero)
                    }
                    Else
                    {
                        CSMI (0xDA, One)
                    }
                }
            }

            Method (_Q24, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_24====="
                P80H = 0x24
                Sleep (0x03E8)
                Notify (BAT1, 0x80) // Status Change
            }

            Method (_Q25, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_25====="
                P80H = 0x25
                Sleep (0x03E8)
                Notify (BAT1, 0x81) // Information Change
                Sleep (0x03E8)
                Notify (BAT1, 0x80) // Status Change
            }

            Method (_Q33, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_33====="
                P80H = 0x33
                ADBG ("EC PB press")
                PWPR ()
            }

            Method (_Q34, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
            {
                Debug = "=====QUERY_34====="
                P80H = 0x34
                ADBG ("EC PB release")
                PWRR ()
            }

            Name (CTSL, Package (0x19)
            {
                0x10, 
                0x12, 
                0x13, 
                0x14, 
                0x15, 
                0x16, 
                0x17, 
                0x20, 
                0x21, 
                0x22, 
                0x24, 
                0x25, 
                0x26, 
                0x28, 
                0x90, 
                0x91, 
                0xFE, 
                0x92, 
                0x93, 
                0x94, 
                0x95, 
                0x96, 
                0x97, 
                0x98, 
                0x99
            })
            Mutex (CFMX, 0x00)
            Method (CFUN, 4, Serialized)
            {
                Name (ESRC, 0x05)
                If ((DerefOf (Arg0 [Zero]) == 0x15))
                {
                    CreateWordField (Arg1, Zero, SFUN)
                    If ((SFUN == 0x9001)){}
                    ElseIf ((SFUN == 0x9002))
                    {
                        STDT = Zero
                        BFDT = Zero
                        BFDT = Zero
                        STDT = One
                    }
                    ElseIf ((SFUN == 0x9000))
                    {
                        ESMC (Arg2)
                        If ((ESMS != 0xFF))
                        {
                            Local1 = Buffer (0x80){}
                            Local1 [Zero] = 0x80
                            Local1 [One] = ESMS /* External reference */
                            Local3 = ESMB /* External reference */
                            Local1 [0x02] = DerefOf (Local3 [Zero])
                            Local1 [0x03] = DerefOf (Local3 [One])
                            Local1 [0x04] = DerefOf (Local3 [0x02])
                            Local1 [0x05] = DerefOf (Local3 [0x03])
                            Local1 [0x06] = DerefOf (Local3 [0x04])
                            Local1 [0x07] = DerefOf (Local3 [0x05])
                            Local1 [0x08] = DerefOf (Local3 [0x06])
                            Local1 [0x09] = DerefOf (Local3 [0x07])
                            Local1 [0x0A] = DerefOf (Local3 [0x08])
                            Local1 [0x0B] = DerefOf (Local3 [0x09])
                            Local1 [0x0C] = DerefOf (Local3 [0x0A])
                            Local1 [0x0D] = DerefOf (Local3 [0x0B])
                            Local1 [0x0E] = DerefOf (Local3 [0x0C])
                            Local1 [0x0F] = DerefOf (Local3 [0x0D])
                            Local1 [0x10] = DerefOf (Local3 [0x0E])
                            Local1 [0x11] = DerefOf (Local3 [0x0F])
                            Local1 [0x12] = DerefOf (Local3 [0x10])
                            Local1 [0x13] = DerefOf (Local3 [0x11])
                            Local1 [0x14] = DerefOf (Local3 [0x12])
                            Local1 [0x15] = DerefOf (Local3 [0x13])
                            Local1 [0x16] = DerefOf (Local3 [0x14])
                            Local1 [0x17] = DerefOf (Local3 [0x15])
                            Local1 [0x18] = DerefOf (Local3 [0x16])
                            Local1 [0x19] = DerefOf (Local3 [0x17])
                            Local1 [0x1A] = DerefOf (Local3 [0x18])
                            Local1 [0x1B] = DerefOf (Local3 [0x19])
                            Local1 [0x1C] = DerefOf (Local3 [0x1A])
                            Local1 [0x1D] = DerefOf (Local3 [0x1B])
                            Local1 [0x1E] = DerefOf (Local3 [0x1C])
                            Local1 [0x1F] = DerefOf (Local3 [0x1D])
                            Local1 [0x20] = DerefOf (Local3 [0x1E])
                            Local1 [0x21] = DerefOf (Local3 [0x1F])
                            BFDT = Local1
                            STDT = One
                        }
                        Else
                        {
                            STDT = 0x8000
                        }
                    }
                    Else
                    {
                        SFNO = Arg1
                        BFDT = Arg2
                        CSMI (0xCE, Arg0)
                    }
                }
                ElseIf ((Match (CTSL, MEQ, DerefOf (Arg0 [Zero]), 
                    MTR, Zero, Zero) != Ones))
                {
                    SFNO = Arg1
                    BFDT = Arg2
                    CSMI (0xCE, Arg0)
                }
                Else
                {
                    STDT = 0x8000
                }
            }

            Name (OCSL, Package (0x03)
            {
                0x80, 
                0x81, 
                0x82
            })
            Method (PFUN, 4, Serialized)
            {
                SFNO = Arg1
                BFDT = Arg2
                CSMI (0xCF, Arg0)
            }

            Method (CMFC, 4, Serialized)
            {
                Name (RTVL, Package (0x04)
                {
                    Zero, 
                    Zero, 
                    Zero, 
                    Zero
                })
                Debug = "=== In CMFC method ==="
                If ((ObjectType (Arg0) == One))
                {
                    RTVL [Zero] = 0x8000
                }
                ElseIf ((DerefOf (Arg0 [Zero]) < 0xFE))
                {
                    Local1 = Buffer (0x82){}
                    CreateWordField (Local1, Zero, RTST)
                    CreateField (Local1, 0x10, 0x0400, RTDT)
                    If (((ToInteger (Arg0) <= 0x8F) && (ToInteger (Arg0
                        ) >= 0x80)))
                    {
                        PFUN (Arg0, Arg1, Arg2, Arg3)
                    }
                    ElseIf ((ToInteger (Arg0) == 0x92))
                    {
                        PFUN (Arg0, Arg1, Arg2, Arg3)
                    }
                    Else
                    {
                        CFUN (Arg0, Arg1, Arg2, Arg3)
                    }

                    RTST = STDT /* External reference */
                    RTDT = BFDT /* External reference */
                    Return (Local1)
                }
                Else
                {
                    RTVL [Zero] = 0x8000
                }

                Return (RTVL) /* \_SB_.PCI0.LPCB.EC0_.CMFC.RTVL */
            }

            Mutex (FAMX, 0x00)
            Method (EIDR, 1, Serialized)
            {
                Acquire (FAMX, 0xFFFF)
                ERIB = Arg0
                Local0 = ERRD (0x5F)
                Release (FAMX)
                Return (Local0)
            }

            Method (EIDW, 2, Serialized)
            {
                Acquire (FAMX, 0xFFFF)
                ERIB = Arg0
                ERWT (0x5F, Arg1)
                Release (FAMX)
            }

            OperationRegion (ECCD, SystemMemory, 0xFC7E0800, 0x1000)
            Field (ECCD, AnyAcc, Lock, Preserve)
            {
                Offset (0x580), 
                Offset (0x582), 
                ECTB,   1, 
                ECTE,   1, 
                Offset (0x583), 
                ERN1,   8, 
                ERN2,   8, 
                ERN3,   8, 
                ERN4,   8, 
                ERN5,   8, 
                ERN6,   8, 
                ERN7,   8, 
                ERN8,   8, 
                ECMD,   8, 
                EDT1,   8, 
                EDT2,   8, 
                EDT3,   8, 
                EDT4,   8, 
                EDT5,   8, 
                    ,   1
            }

            Method (ERWT, 2, Serialized)
            {
                Local0 = Buffer (0x08){}
                Local0 [Zero] = 0xB1
                Local0 [One] = Arg0
                Local0 [0x02] = Arg1
                ERCD (Local0)
            }

            Method (ERRD, 1, Serialized)
            {
                Local0 = Buffer (0x08){}
                Local0 [Zero] = 0xB0
                Local0 [One] = Arg0
                Return (ERCD (Local0))
            }

            Mutex (CSMX, 0x00)
            Method (ERCD, 1, Serialized)
            {
                Acquire (CSMX, 0xFFFF)
                Name (ESRC, 0x64)
                ECTB = One
                ECMD = DerefOf (Arg0 [Zero])
                EDT1 = DerefOf (Arg0 [One])
                EDT2 = DerefOf (Arg0 [0x02])
                ECTE = One
                While (((ESRC != Zero) && (ECTE != Zero)))
                {
                    Sleep (0x0A)
                    ESRC -= One
                }

                Local0 = ERN1 /* \_SB_.PCI0.LPCB.EC0_.ERN1 */
                ECTB = Zero
                Release (CSMX)
                Return (Local0)
            }

            Method (SBAT, 2, NotSerialized)
            {
                Local0 = Buffer (0x08){}
                Local0 [Zero] = Arg0
                Local0 [One] = 0x16
                Local0 [0x02] = Arg1
                Local0 [0x03] = Zero
                Local0 [0x04] = Zero
                ESMC (Local0)
            }

            Method (SBA2, 2, NotSerialized)
            {
                Local0 = Buffer (0x08){}
                Local0 [Zero] = Arg0
                Local0 [One] = 0x36
                Local0 [0x02] = Arg1
                Local0 [0x03] = Zero
                Local0 [0x04] = Zero
                ESMC (Local0)
            }

            Mutex (ESCX, 0x00)
            Method (ESMC, 1, NotSerialized)
            {
                Acquire (ESCX, 0xFFFF)
                Name (ESRC, 0x05)
                SMD0 = Zero
                SMAD = DerefOf (Arg0 [One])
                SMCM = DerefOf (Arg0 [0x02])
                SMBN = DerefOf (Arg0 [0x03])
                Local4 = DerefOf (Arg0 [0x04])
                Local5 = Zero
                BCNT = Local4
                If ((Local4 != Zero))
                {
                    Local1 = SMD0 /* \_SB_.PCI0.LPCB.EC0_.SMD0 */
                    While (~(Local4 == Local5))
                    {
                        Local1 [Local5] = DerefOf (Arg0 [(0x05 + Local5)]
                            )
                        Local5 += One
                    }

                    SMD0 = Local1
                }

                SMPR = DerefOf (Arg0 [Zero])
                While ((~(ESRC == Zero) && ~((SMST & 0x80
                    ) == 0x80)))
                {
                    Sleep (0x14)
                    ESRC -= One
                }

                If ((SMST == 0x80))
                {
                    ESMB = SMD0 /* \_SB_.PCI0.LPCB.EC0_.SMD0 */
                    ESMS = BCNT /* \_SB_.PCI0.LPCB.EC0_.BCNT */
                }
                Else
                {
                    Debug = "====== Sent EC SMBus command time out. ======"
                    ESMS = 0xFF
                }

                Release (ESCX)
            }
        }

If I have not provided enough information please let me know and I will get that across.

confuciussayuhm avatar Mar 27 '22 09:03 confuciussayuhm

See my answer here for Pavilion 15-cs0xxx. Ewald

ewaldc avatar Jun 24 '22 13:06 ewaldc

See my answer here for Pavilion 15-cs0xxx. Ewald

excuse me, what do you mean?

NiitoCHKN avatar Jul 20 '22 18:07 NiitoCHKN

Take a look here, it may work for your config as well.

ewaldc avatar Jul 20 '22 18:07 ewaldc

Take a look here, it may work for your config as well.

unfortunately doesn't work

NiitoCHKN avatar Jul 20 '22 19:07 NiitoCHKN

This issue is stale because it has been open more than 180 days with no activity. If nobody comments within 7 days, this issue will be closed

github-actions[bot] avatar Jan 18 '23 00:01 github-actions[bot]