Jump to content

HP Envy 17t-j000 Quad (Haswell) + 10.8.5/10.9.5/10.10.x/10.11.x/10.12.x/10.13.x/10.14.x


gygabyte666
 Share

1,321 posts in this topic

Recommended Posts

I recommend you use iasl on OS X.  But there is Windows builds of iasl on Windows too.  You might look here for Windows builds: https://www.acpica.org/

For Ubuntu boot, use a USB, no need for optical.

 

System Info does not show ig-platform-id.  You can see that only in ioreg (use IORegistryExplorer).  For injecting ig-platform-id it is easier to use the bootloader mechanisms.

 

Changing from GFX0 to IGPU gives you GPU power management.

 

i have already renamed GFX0 to IGPU, but how could i check if GPU pm works? i couldn't even get any gpu informations from HWSensor.

Link to comment
Share on other sites

i have already renamed GFX0 to IGPU, but how could i check if GPU pm works? i couldn't even get any gpu informations from HWSensor.

Look closely in ioreg and you'll see the differences between GFX0 and IGPU.

 

There is some GPU pstate reporting in Pike's AppleIntelCPUPowerManagementInfo.kext.

Link to comment
Share on other sites

First of all I would like to thank you all for your great effort!

 

I got 10.9.1 working on my Envy 15-j001, but I have one problem with the HD4600:

When I insert InjectIntel-ig with value 0600260a into org.Chameleon.Boot.plist to get the graphics fully working I can only boot with "-f" or else the spinning circle at the boot screen will spin forever and sometimes overlay itself. In verbose mode this will result in a white cursor in the top left corner after the boot sequence is completed (when there should be the login screen).

Is there any way to fix this or should I just boot without Caches?

 

Thank you!

Link to comment
Share on other sites

First of all I would like to thank you all for your great effort!

 

I got 10.9.1 working on my Envy 15-j001, but I have one problem with the HD4600:

When I insert InjectIntel-ig with value 0600260a into org.Chameleon.Boot.plist to get the graphics fully working I can only boot with "-f" or else the spinning circle at the boot screen will spin forever and sometimes overlay itself. In verbose mode this will result in a white cursor in the top left corner after the boot sequence is completed (when there should be the login screen).

Is there any way to fix this or should I just boot without Caches?

 

Thank you!

Rebuild cache being certain to check for errors in system.log.

Link to comment
Share on other sites

Rebuild cache being certain to check for errors in system.log.

 

Rebuilding caches didn't change anything, still have to boot with "-f" to get to the login screen. I reproduced the error a few times and it seems that system.log shows "ReportCrash[234] Metadata.framework [Error]: couldn't get the client port" when I boot without "-f", any idea?

Link to comment
Share on other sites

Rebuilding caches didn't change anything, still have to boot with "-f" to get to the login screen. I reproduced the error a few times and it seems that system.log shows "ReportCrash[234] Metadata.framework [Error]: couldn't get the client port" when I boot without "-f", any idea?

Did you check for errors in the cache rebuild?

Link to comment
Share on other sites

Oh you are right, I totally missed that there were warnings (but no errors). E.g. Invalid signature for AppleIntelFramebufferAzul.kext, which might be related to the problems, right?

If you patched AppleIntelFramebufferAzul, that would be normal.

 

I'm referring to errors that prevent a new kernel cache being created.

Link to comment
Share on other sites

If you patched AppleIntelFramebufferAzul, that would be normal.

 

I'm referring to errors that prevent a new kernel cache being created.

 

Just to be sure I am doing it right: kextcache -system-prelinked-kernel  and kextcache -system-caches are the commands I have to execute, right? If so, there are no errors :)

Link to comment
Share on other sites

Just to be sure I am doing it right: kextcache -system-prelinked-kernel  and kextcache -system-caches are the commands I have to execute, right? If so, there are no errors :)

I would use Kext Wizard and monitor output in system.log.

 

If there are no errors, then you should boot verbose so you can determine more about what is wrong. Maybe it is VT-d related and you need dart=0 (very common).

Link to comment
Share on other sites

I would use Kext Wizard and monitor output in system.log.

 

If there are no errors, then you should boot verbose so you can determine more about what is wrong. Maybe it is VT-d related and you need dart=0 (very common).

 

Hm...I used Kext Wizard and there were no errors in system.log during the procedure, however the problem is still there - even worse: I can see the login screen when booting with "-f", but if I login the login screen will "reload" and wants me to login again and again. It's similar to the symptom when booting without -f only that with the cache enabled there is no login screen at all, only a blinking white cursor. If I type some letters they will disappear after a second or two (seems like it is refreshing?).

Link to comment
Share on other sites

Hm...I used Kext Wizard and there were no errors in system.log during the procedure, however the problem is still there - even worse: I can see the login screen when booting with "-f", but if I login the login screen will "reload" and wants me to login again and again. It's similar to the symptom when booting without -f only that with the cache enabled there is no login screen at all, only a blinking white cursor. If I type some letters they will disappear after a second or two (seems like it is refreshing?).

Without knowing more about how you installed, I can't offer any further information. It sounds like your install is pretty screwed up.

Link to comment
Share on other sites

Without knowing more about how you installed, I can't offer any further information. It sounds like your install is pretty screwed up.

 

Patched DSDT and SSDT using your patches, used kexts provided by gigabyte. In my opionion my installation is not screwed up, but I'll reinstall. Thank you for your help.

Link to comment
Share on other sites

Patched DSDT and SSDT using your patches, used kexts provided by gigabyte. In my opionion my installation is not screwed up, but I'll reinstall. Thank you for your help.

Vanilla install from Mac App Store?

Link to comment
Share on other sites

Hi RehabMan,

 

my shutdown problem has troubled me for two months.

the laptop can't shutdown exactly(screen, fan are off, but the hdd is still on). tried all the shutdown fixes, but didn't work for me.

i have compared _PTS method of my dsdt with others. i found that _PTS of others is totally clean and brief. is it possiable that i transplant the codes from other laptops?(for example this Envy 17t)

 

the _PTS method of mine:

Method (_PTS, 1, NotSerialized)  // _PTS: Prepare To Sleep
    {
        If (LEqual (Arg0, 0x05)) {}
        Else
        {
            Store (Zero, P80D)
            P8XH (Zero, Arg0, Zero)
            Store (Arg0, SLPS)
            Store (Zero, GO55)
            If (And (ICNF, 0x10))
            {
                If (CondRefOf (\_SB.IAOE.PTSL))
                {
                    Store (Arg0, \_SB.IAOE.PTSL)
                }
            }

            If (LEqual (Arg0, 0x03))
            {
                P8XH (0x04, 0x53, Zero)
                P8XH (0x04, 0x53, One)
                If (LAnd (DTSE, LGreater (TCNT, One)))
                {
                    TRAP (TRTD, 0x1E)
                }

                If (And (ICNF, One))
                {
                    If (LAnd (And (ICNF, 0x10), LEqual (\_SB.IAOE.ITMR, Zero)))
                    {
                        If (LAnd (CondRefOf (\_SB.PCI0.LPCB.EC0.AWT0), CondRefOf (\_SB.IAOE.ECTM)))
                        {
                            If (LGreater (\_SB.IAOE.ECTM, Zero))
                            {
                                Store (And (\_SB.IAOE.ECTM, 0xFF), \_SB.PCI0.LPCB.EC0.AWT0)
                                Store (ShiftRight (And (\_SB.IAOE.ECTM, 0xFF00), 0x08), \_SB.PCI0.LPCB.EC0.AWT1)
                                Store (ShiftRight (And (\_SB.IAOE.ECTM, 0x00FF0000), 0x10), \_SB.PCI0.LPCB.EC0.AWT2)
                                Store (\_SB.PCI0.LPCB.EC0.WTMS, Local0)
                                Store (Or (0x81, Local0), \_SB.PCI0.LPCB.EC0.WTMS)
                            }
                        }
                    }

                    If (LAnd (And (ICNF, 0x10), CondRefOf (\_SB.IFFS.FFSS)))
                    {
                        If (And (\_SB.IFFS.FFSS, One))
                        {
                            Store (One, \_SB.IAOE.FFSE)
                            If (LAnd (CondRefOf (\_SB.PCI0.LPCB.EC0.WTMS), LEqual (\_SB.IAOE.PTSL, 0x03)))
                            {
                                Store (\_SB.PCI0.LPCB.EC0.WTMS, Local0)
                                Store (Or (0x02, Local0), \_SB.PCI0.LPCB.EC0.WTMS)
                            }
                        }
                        Else
                        {
                            Store (Zero, \_SB.IAOE.FFSE)
                        }
                    }
                }

                Store (One, \_SB.PCI0.LPCB.EC0.FLS3)
                If (LAnd (And (\_SB.PCI0.LPCB.EC0.IBT1, 0x02), LEqual (GI70, Zero)))
                {
                    Store (Zero, DPS3)
                }
                Else
                {
                    Store (One, DPS3)
                }
            }

            If (LEqual (Arg0, 0x04))
            {
                P8XH (0x04, 0x54, Zero)
                P8XH (0x04, 0x54, One)
                Store (One, \_SB.PCI0.LPCB.EC0.FLS4)
                If (LAnd (And (\_SB.PCI0.LPCB.EC0.IBT1, 0x04), LEqual (GI70, One)))
                {
                    Store (One, \_SB.PCI0.LPCB.EC0.WLPH)
                }
                Else
                {
                    Store (Zero, \_SB.PCI0.LPCB.EC0.WLPH)
                }
            }

            Store (\_SB.PCI0.LPCB.EC0.WLAN, \_SB.PTWL)
            Store (\_SB.PCI0.LPCB.EC0.BLTH, \_SB.PTBT)
            Store (\_SB.PCI0.LPCB.EC0.ST3G, \_SB.PT3G)
            Store (\_SB.PCI0.LPCB.EC0.WLST, \_SB.RDWL)
            Store (\_SB.PCI0.LPCB.EC0.BLTS, \_SB.RDBT)
            Store (\_SB.PCI0.LPCB.EC0.ED3G, \_SB.RD3G)
            If (LEqual (Arg0, 0x05))
            {
                P8XH (0x04, 0x55, Zero)
                P8XH (0x04, 0x55, One)
            }
        }
    }

the _PTS method of Envy 17t


    Method (_PTS, 1, NotSerialized)  // _PTS: Prepare To Sleep
    {
        Store (Arg0, \_SB.PCI0.LPCB.H_EC.SLPT)
        Store (Zero, P80D)
        P8XH (Zero, Arg0, Zero)
        Store (Arg0, SLPS)
        If (And (ICNF, 0x10))
        {
            If (CondRefOf (\_SB.IAOE.PTSL))
            {
                Store (Arg0, \_SB.IAOE.PTSL)
            }
        }

        If (LEqual (Arg0, 0x03))
        {
            P8XH (0x04, 0x53, Zero)
            P8XH (0x04, 0x53, One)
            If (LAnd (DTSE, LGreater (TCNT, One)))
            {
                TRAP (TRTD, 0x1E)
            }
        }

        If (LEqual (Arg0, 0x04))
        {
            P8XH (0x04, 0x54, Zero)
            P8XH (0x04, 0x54, One)
            CMSW (0x60, 0x60)
        }

        If (LEqual (Arg0, 0x05))
        {
            P8XH (0x04, 0x55, Zero)
            P8XH (0x04, 0x55, One)
        }

        GLSD ()
        Store (One, AOAL)
        GLRS ()
        If (CondRefOf (\_SB.TPM.PTS))
        {
            \_SB.TPM.PTS (Arg0)
        }

        If (LEqual (\_SB.PCI0.RP07.PSPX, One))
        {
            Store (One, \_SB.PCI0.RP07.PSPX)
            Store (One, \_SB.PCI0.RP07.PSPX)
            Store (One, \_SB.PCI0.RP07.PMSX)
        }
    }

yeah they both look similar, is it possiable to transplant the code? and i wonder if it works... any suggestions? 

 

thanks in advance

 

 

 

------------------ update ------------------

 

and i also found that my laptop(v5-573g) couldn't shutdown under Linux, but this problem is already fixed by patching the linux kernel.  see here

 

yeah it would be a huge project if i try to modify the osx kernel and build it. 

 

According to your experience, is it possiable to be fixed by editting the dsdt? or i can only do something to the kernel :{ 

Link to comment
Share on other sites

Hi RehabMan,

 

my shutdown problem has troubled me for two months.

the laptop can't shutdown exactly(screen, fan are off, but the hdd is still on). tried all the shutdown fixes, but didn't work for me.

i have compared _PTS method of my dsdt with others. i found that _PTS of others is totally clean and brief. is it possiable that i transplant the codes from other laptops?(for example this Envy 17t)

 

the _PTS method of mine:

Method (_PTS, 1, NotSerialized)  // _PTS: Prepare To Sleep
    {
        If (LEqual (Arg0, 0x05)) {}
        Else
        {
            Store (Zero, P80D)
            P8XH (Zero, Arg0, Zero)
            Store (Arg0, SLPS)
            Store (Zero, GO55)
            If (And (ICNF, 0x10))
            {
                If (CondRefOf (\_SB.IAOE.PTSL))
                {
                    Store (Arg0, \_SB.IAOE.PTSL)
                }
            }

            If (LEqual (Arg0, 0x03))
            {
                P8XH (0x04, 0x53, Zero)
                P8XH (0x04, 0x53, One)
                If (LAnd (DTSE, LGreater (TCNT, One)))
                {
                    TRAP (TRTD, 0x1E)
                }

                If (And (ICNF, One))
                {
                    If (LAnd (And (ICNF, 0x10), LEqual (\_SB.IAOE.ITMR, Zero)))
                    {
                        If (LAnd (CondRefOf (\_SB.PCI0.LPCB.EC0.AWT0), CondRefOf (\_SB.IAOE.ECTM)))
                        {
                            If (LGreater (\_SB.IAOE.ECTM, Zero))
                            {
                                Store (And (\_SB.IAOE.ECTM, 0xFF), \_SB.PCI0.LPCB.EC0.AWT0)
                                Store (ShiftRight (And (\_SB.IAOE.ECTM, 0xFF00), 0x08), \_SB.PCI0.LPCB.EC0.AWT1)
                                Store (ShiftRight (And (\_SB.IAOE.ECTM, 0x00FF0000), 0x10), \_SB.PCI0.LPCB.EC0.AWT2)
                                Store (\_SB.PCI0.LPCB.EC0.WTMS, Local0)
                                Store (Or (0x81, Local0), \_SB.PCI0.LPCB.EC0.WTMS)
                            }
                        }
                    }

                    If (LAnd (And (ICNF, 0x10), CondRefOf (\_SB.IFFS.FFSS)))
                    {
                        If (And (\_SB.IFFS.FFSS, One))
                        {
                            Store (One, \_SB.IAOE.FFSE)
                            If (LAnd (CondRefOf (\_SB.PCI0.LPCB.EC0.WTMS), LEqual (\_SB.IAOE.PTSL, 0x03)))
                            {
                                Store (\_SB.PCI0.LPCB.EC0.WTMS, Local0)
                                Store (Or (0x02, Local0), \_SB.PCI0.LPCB.EC0.WTMS)
                            }
                        }
                        Else
                        {
                            Store (Zero, \_SB.IAOE.FFSE)
                        }
                    }
                }

                Store (One, \_SB.PCI0.LPCB.EC0.FLS3)
                If (LAnd (And (\_SB.PCI0.LPCB.EC0.IBT1, 0x02), LEqual (GI70, Zero)))
                {
                    Store (Zero, DPS3)
                }
                Else
                {
                    Store (One, DPS3)
                }
            }

            If (LEqual (Arg0, 0x04))
            {
                P8XH (0x04, 0x54, Zero)
                P8XH (0x04, 0x54, One)
                Store (One, \_SB.PCI0.LPCB.EC0.FLS4)
                If (LAnd (And (\_SB.PCI0.LPCB.EC0.IBT1, 0x04), LEqual (GI70, One)))
                {
                    Store (One, \_SB.PCI0.LPCB.EC0.WLPH)
                }
                Else
                {
                    Store (Zero, \_SB.PCI0.LPCB.EC0.WLPH)
                }
            }

            Store (\_SB.PCI0.LPCB.EC0.WLAN, \_SB.PTWL)
            Store (\_SB.PCI0.LPCB.EC0.BLTH, \_SB.PTBT)
            Store (\_SB.PCI0.LPCB.EC0.ST3G, \_SB.PT3G)
            Store (\_SB.PCI0.LPCB.EC0.WLST, \_SB.RDWL)
            Store (\_SB.PCI0.LPCB.EC0.BLTS, \_SB.RDBT)
            Store (\_SB.PCI0.LPCB.EC0.ED3G, \_SB.RD3G)
            If (LEqual (Arg0, 0x05))
            {
                P8XH (0x04, 0x55, Zero)
                P8XH (0x04, 0x55, One)
            }
        }
    }

the _PTS method of Envy 17t


    Method (_PTS, 1, NotSerialized)  // _PTS: Prepare To Sleep
    {
        Store (Arg0, \_SB.PCI0.LPCB.H_EC.SLPT)
        Store (Zero, P80D)
        P8XH (Zero, Arg0, Zero)
        Store (Arg0, SLPS)
        If (And (ICNF, 0x10))
        {
            If (CondRefOf (\_SB.IAOE.PTSL))
            {
                Store (Arg0, \_SB.IAOE.PTSL)
            }
        }

        If (LEqual (Arg0, 0x03))
        {
            P8XH (0x04, 0x53, Zero)
            P8XH (0x04, 0x53, One)
            If (LAnd (DTSE, LGreater (TCNT, One)))
            {
                TRAP (TRTD, 0x1E)
            }
        }

        If (LEqual (Arg0, 0x04))
        {
            P8XH (0x04, 0x54, Zero)
            P8XH (0x04, 0x54, One)
            CMSW (0x60, 0x60)
        }

        If (LEqual (Arg0, 0x05))
        {
            P8XH (0x04, 0x55, Zero)
            P8XH (0x04, 0x55, One)
        }

        GLSD ()
        Store (One, AOAL)
        GLRS ()
        If (CondRefOf (\_SB.TPM.PTS))
        {
            \_SB.TPM.PTS (Arg0)
        }

        If (LEqual (\_SB.PCI0.RP07.PSPX, One))
        {
            Store (One, \_SB.PCI0.RP07.PSPX)
            Store (One, \_SB.PCI0.RP07.PSPX)
            Store (One, \_SB.PCI0.RP07.PMSX)
        }
    }

yeah they both look similar, is it possiable to transplant the code? and i wonder if it works... any suggestions? 

 

thanks in advance

 

and i found also that my laptop can't shutdown under Linux, but this problem is already fixed by patching the linux kernel.  see here

 

yeah it would be a huge project if i try to modify the osx kernel and build it. 

 

According to your experience, is it possiable to be fixed by editting the dsdt? or i can only do something to the kernel :{

 

Not a good idea to transplant.

 

Have you attempted to debug your _PTS with ACPIDebug.kext? First step is to verify it executes from beginning to end.

Link to comment
Share on other sites

Not a good idea to transplant.

 

Have you attempted to debug your _PTS with ACPIDebug.kext? First step is to verify it executes from beginning to end.

 

i just intended to have a try, but i'm not sure, which argument and which branch should i observe when i shutdown my laptop?  "If (LEqual (Arg0, 0x05))"? should i debug if it enters into this branch?

Link to comment
Share on other sites

i just intended to have a try, but i'm not sure, which argument and which branch should i observe when i shutdown my laptop?  "If (LEqual (Arg0, 0x05))"? should i debug if it enters into this branch?

I would be surprised that the Arg0==5 case didn't complete start to finish... it does nothing.

 

The question is what is Arg0 in the shutdown case. I would have to read ACPI spec: https://www.acpica.org/

Maybe different iasl? I'm using the latest version here:

http://www.osx86.net/files/download/3680-iasl-intel-acpi-tools-x64/

 

And it works with this:

./iasl -e *.aml -d DSDT.AML
but this will gives me error AE_Already_Exists

./iasl -e *.aml -d ./DSDT.AML

 

BTW, the '-da' option seems to work pretty well...

iasl -da *.aml
Note: You must have no other *.aml files present in the directory when you execute iasl -da other than SSDTs/DSDT. If you have the other common ACPI files (APIC, BOOT, FACS, MCFG, ASF!, DBGP, etc.) iasl will produce an error.
Link to comment
Share on other sites

It works for me too.

I added a note to my post... It works if you have only SSDT*.aml and DSDT*.aml in the directory (or specify SSDT*.aml DSDT.aml). The other files should be disassembled independently (if you want).

Link to comment
Share on other sites

@gygabyte666,

 

If you want to see if you can make actual brightness keys work... I've implemented a new feature in the latest build of my VoodooPS2 keyboard driver. It allows you to push keystrokes from ACPI. This allows you to turn ACPI keys into normal keys delivered as if they were PS2 keys.

 

To use it, you need to find out what code in DSDT is called when the keys are pressed.

 

 

Your first step would be to determine which EC query methods are called when you press the keys. A handy way is to instrument all _Qxx methods, then press the keys.

 

On my Lenovo U430, I instrumented all the EC query methods:

# instrument EC query methods
into method label _Q09 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q09 enter")\n
%1\n
\\rmdt.p1("EC0._Q09 exit")\n
end;

into method label _Q26 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q26 enter")\n
%1\n
\\rmdt.p1("EC0._Q26 exit")\n
end;

into method label _Q27 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q27 enter")\n
%1\n
\\rmdt.p1("EC0._Q27 exit")\n
end;

into method label _Q27 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q27 enter")\n
%1\n
\\rmdt.p1("EC0._Q27 exit")\n
end;

into method label _Q60 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q60 enter")\n
%1\n
\\rmdt.p1("EC0._Q60 exit")\n
end;

into method label _Q69 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q69 enter")\n
%1\n
\\rmdt.p1("EC0._Q69 exit")\n
end;

into method label _Q70 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q70 enter")\n
%1\n
\\rmdt.p1("EC0._Q70 exit")\n
end;

into method label _Q71 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q71 enter")\n
%1\n
\\rmdt.p1("EC0._Q71 exit")\n
end;

into method label _Q8F parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q8F enter")\n
%1\n
\\rmdt.p1("EC0._Q8F exit")\n
end;

into method label _Q90 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q90 enter")\n
%1\n
\\rmdt.p1("EC0._Q90 exit")\n
end;

into method label _Q91 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q91 enter")\n
%1\n
\\rmdt.p1("EC0._Q91 exit")\n
end;

into method label _Q92 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q92 enter")\n
%1\n
\\rmdt.p1("EC0._Q92 exit")\n
end;

into method label _Q93 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q93 enter")\n
%1\n
\\rmdt.p1("EC0._Q93 exit")\n
end;

into method label _Q94 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q94 enter")\n
%1\n
\\rmdt.p1("EC0._Q94 exit")\n
end;

into method label _QE0 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE0 enter")\n
%1\n
\\rmdt.p1("EC0._QE0 exit")\n
end;

into method label _QE2 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE2 enter")\n
%1\n
\\rmdt.p1("EC0._QE2 exit")\n
end;

into method label _QE4 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE4 enter")\n
%1\n
\\rmdt.p1("EC0._QE4 exit")\n
end;

into method label _QE5 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE5 enter")\n
%1\n
\\rmdt.p1("EC0._QE5 exit")\n
end;

into method label _QE6 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE6 enter")\n
%1\n
\\rmdt.p1("EC0._QE6 exit")\n
end;

into method label _QE7 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE7 enter")\n
%1\n
\\rmdt.p1("EC0._QE7 exit")\n
end;

into method label _QE8 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE8 enter")\n
%1\n
\\rmdt.p1("EC0._QE8 exit")\n
end;

into method label _QE9 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE9 enter")\n
%1\n
\\rmdt.p1("EC0._QE9 exit")\n
end;

into method label _Q41 parent_label _SB.PCI0.LPCB.EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q41 enter")\n
%1\n
\\rmdt.p1("EC0._Q41 exit")\n
end;
You would need to modify such that they match your _Qxx methods in the EC. Then apply the patches to your DSDT.

 

You will need the RMDT device patch and ACPIDebug. See: https://github.com/RehabMan/OS-X-ACPI-Debug.

 

Press the keys... output will be in system.log. Once you know which _Qxx methods are called for each of your brightness up/down keys, you can implement a patch to push keystrokes into the driver. Mine were at _Q90 and _Q91, so I implemented these patches:

 

# Make EC-based brightness up/down work with RehabMan VoodooPS2 ACPI keyboard mechanism
into method label _Q90 parent_label EC0 replace_content
begin
    // Dell code for brightness up\n
    Notify (PS2K, 0x0206)\n
    Notify (PS2K, 0x0286)\n
end;

into method label _Q91 parent_label EC0 replace_content
begin
    // Dell code for brightness down\n
    Notify (PS2K, 0x0205)\n
    Notify (PS2K, 0x0285)\n
end;
Your keyboard is a little different in that the keys generate a ps2 code, but same code for the two separate keys. Hopefully each key generates a different EC query.

 

Let me know what you find out... I don't have the Envy any more, but am curious as to what the result is.

Link to comment
Share on other sites

@gygabyte666,

 

If you want to see if you can make actual brightness keys work... I've implemented a new feature in the latest build of my VoodooPS2 keyboard driver. It allows you to push keystrokes from ACPI. This allows you to turn ACPI keys into normal keys delivered as if they were PS2 keys.

 

To use it, you need to find out what code in DSDT is called when the keys are pressed.

 

 

Your first step would be to determine which EC query methods are called when you press the keys. A handy way is to instrument all _Qxx methods, then press the keys.

 

On my Lenovo U430, I instrumented all the EC query methods:

# instrument EC query methods
into method label _Q09 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q09 enter")\n
%1\n
\\rmdt.p1("EC0._Q09 exit")\n
end;

into method label _Q26 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q26 enter")\n
%1\n
\\rmdt.p1("EC0._Q26 exit")\n
end;

into method label _Q27 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q27 enter")\n
%1\n
\\rmdt.p1("EC0._Q27 exit")\n
end;

into method label _Q27 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q27 enter")\n
%1\n
\\rmdt.p1("EC0._Q27 exit")\n
end;

into method label _Q60 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q60 enter")\n
%1\n
\\rmdt.p1("EC0._Q60 exit")\n
end;

into method label _Q69 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q69 enter")\n
%1\n
\\rmdt.p1("EC0._Q69 exit")\n
end;

into method label _Q70 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q70 enter")\n
%1\n
\\rmdt.p1("EC0._Q70 exit")\n
end;

into method label _Q71 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q71 enter")\n
%1\n
\\rmdt.p1("EC0._Q71 exit")\n
end;

into method label _Q8F parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q8F enter")\n
%1\n
\\rmdt.p1("EC0._Q8F exit")\n
end;

into method label _Q90 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q90 enter")\n
%1\n
\\rmdt.p1("EC0._Q90 exit")\n
end;

into method label _Q91 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q91 enter")\n
%1\n
\\rmdt.p1("EC0._Q91 exit")\n
end;

into method label _Q92 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q92 enter")\n
%1\n
\\rmdt.p1("EC0._Q92 exit")\n
end;

into method label _Q93 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q93 enter")\n
%1\n
\\rmdt.p1("EC0._Q93 exit")\n
end;

into method label _Q94 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q94 enter")\n
%1\n
\\rmdt.p1("EC0._Q94 exit")\n
end;

into method label _QE0 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE0 enter")\n
%1\n
\\rmdt.p1("EC0._QE0 exit")\n
end;

into method label _QE2 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE2 enter")\n
%1\n
\\rmdt.p1("EC0._QE2 exit")\n
end;

into method label _QE4 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE4 enter")\n
%1\n
\\rmdt.p1("EC0._QE4 exit")\n
end;

into method label _QE5 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE5 enter")\n
%1\n
\\rmdt.p1("EC0._QE5 exit")\n
end;

into method label _QE6 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE6 enter")\n
%1\n
\\rmdt.p1("EC0._QE6 exit")\n
end;

into method label _QE7 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE7 enter")\n
%1\n
\\rmdt.p1("EC0._QE7 exit")\n
end;

into method label _QE8 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE8 enter")\n
%1\n
\\rmdt.p1("EC0._QE8 exit")\n
end;

into method label _QE9 parent_label EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._QE9 enter")\n
%1\n
\\rmdt.p1("EC0._QE9 exit")\n
end;

into method label _Q41 parent_label _SB.PCI0.LPCB.EC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC0._Q41 enter")\n
%1\n
\\rmdt.p1("EC0._Q41 exit")\n
end;
You would need to modify such that they match your _Qxx methods in the EC. Then apply the patches to your DSDT.

 

You will need the RMDT device patch and ACPIDebug. See: https://github.com/RehabMan/OS-X-ACPI-Debug.

 

Press the keys... output will be in system.log. Once you know which _Qxx methods are called for each of your brightness up/down keys, you can implement a patch to push keystrokes into the driver. Mine were at _Q90 and _Q91, so I implemented these patches:

 

# Make EC-based brightness up/down work with RehabMan VoodooPS2 ACPI keyboard mechanism
into method label _Q90 parent_label EC0 replace_content
begin
    // Dell code for brightness up\n
    Notify (PS2K, 0x0206)\n
    Notify (PS2K, 0x0286)\n
end;

into method label _Q91 parent_label EC0 replace_content
begin
    // Dell code for brightness down\n
    Notify (PS2K, 0x0205)\n
    Notify (PS2K, 0x0285)\n
end;
Your keyboard is a little different in that the keys generate a ps2 code, but same code for the two separate keys. Hopefully each key generates a different EC query.

 

Let me know what you find out... I don't have the Envy any more, but am curious as to what the result is.

 

Thanks for the info. I will look into this and report back.

Link to comment
Share on other sites

I added a note to my post... It works if you have only SSDT*.aml and DSDT*.aml in the directory (or specify SSDT*.aml DSDT.aml). The other files should be disassembled independently (if you want).

Note that on some system (like my Dell 5430), there are 2 CpuPm SSDT and 2 Cpu0IST SSDT, which causes errors while decompiling. Delete one of them will help.

Link to comment
Share on other sites

 Share

×
×
  • Create New...