RehabMan Posted May 1, 2015 Author Share Posted May 1, 2015 Of course i mean both keys, and i was wrong with the kext it was loaded I've traced like crazy, and the keystrokes depends on this wmi event If (And (WMEV, 0x0800)) { Store (EC0A (WMBU), WMBU) CWEV (0x0800) } where the wmi buffer depends on EC registerhere the EC0A method Method (EC0A, 1, NotSerialized) { Acquire (QSEV, 0xFFFF) Store (ECRB (0x2B), Local1) Store (Zero, Local0) While (LLess (Local0, Local1)) { Store (ECRB (0x2C), Local2) If (LLess (Local0, SizeOf (Arg0))) { BBWR (Arg0, Local0, Local2) } Increment (Local0) } Release (QSEV) Return (Arg0) }or i'm doing something wrong? You're going to have to keep digging. Link to comment Share on other sites More sharing options...
wern apfel Posted May 1, 2015 Share Posted May 1, 2015 I will But why is this code not working ?, ecrd 1 brightness increase, and ecrd 0 degrease Store(ECRD, Local0)\n If (LEqual(Local0,1))\n {\n Notify(\_SB.PCI0.LPCB.PS2K, 0x0205)\n Notify(\_SB.PCI0.LPCB.PS2K, 0x0285)\n }\n If (LEqual(Local0,0))\n {\n Notify(\_SB.PCI0.LPCB.PS2K, 0x0206)\n Notify(\_SB.PCI0.LPCB.PS2K, 0x0286)\n Link to comment Share on other sites More sharing options...
RehabMan Posted May 2, 2015 Author Share Posted May 2, 2015 I will But why is this code not working ?, ecrd 1 brightness increase, and ecrd 0 degrease Store(ECRD, Local0)\n If (LEqual(Local0,1))\n {\n Notify(\_SB.PCI0.LPCB.PS2K, 0x0205)\n Notify(\_SB.PCI0.LPCB.PS2K, 0x0285)\n }\n If (LEqual(Local0,0))\n {\n Notify(\_SB.PCI0.LPCB.PS2K, 0x0206)\n Notify(\_SB.PCI0.LPCB.PS2K, 0x0286)\n Use ACPIDebug to determine if each section of code is being reached. Use the debug VoodooPS2Controller.kext to see if it is receiving/translating the codes. Link to comment Share on other sites More sharing options...
wern apfel Posted May 2, 2015 Share Posted May 2, 2015 Both keys call the same event, with your key-up code only brightness increase, and down code only degrease ApplePS2Keyboard::message: type=e0028010, provider=0xffffff800af38600, argument=0xffffff809a793eac, argument=0205, cmp=e0028010 ApplePS2Keyboard: sending key e005=91 down ApplePS2Keyboard::message: type=e0028010, provider=0xffffff800af38600, argument=0xffffff809a793eac, argument=0285, cmp=e0028010 ApplePS2Keyboard: sending key e005=91 up And the keys FN + q,w,e,r,t,a,s,d,f,g do the same. I think i will stay with hotkoffys wmi kext Link to comment Share on other sites More sharing options...
RehabMan Posted May 2, 2015 Author Share Posted May 2, 2015 Both keys call the same event, with your key-up code only brightness increase, and down code only degrease ApplePS2Keyboard::message: type=e0028010, provider=0xffffff800af38600, argument=0xffffff809a793eac, argument=0205, cmp=e0028010 ApplePS2Keyboard: sending key e005=91 down ApplePS2Keyboard::message: type=e0028010, provider=0xffffff800af38600, argument=0xffffff809a793eac, argument=0285, cmp=e0028010 ApplePS2Keyboard: sending key e005=91 up The messages above show it working for backlight down (0x91 is down, 0x90 is up). If you have the native slider in SysPrefs->Displays, you should see the native on-screen display overlay as you press that key. If you don't have the brightness slider working in SysPrefs->Displays, you need to fix that first. It is a prerequisite. Note: This assumes the VoodooPS2Controller.kext you're using has not been significantly changed from my version and 0x91 and 0x90 are still ADB codes for brightness. Link to comment Share on other sites More sharing options...
wern apfel Posted May 2, 2015 Share Posted May 2, 2015 Yes but this happens if both keys were pressed, can't get them work separately And yes your latest VoodooPS2Controller.kext is loaded, prefpane slider is working Link to comment Share on other sites More sharing options...
RehabMan Posted May 2, 2015 Author Share Posted May 2, 2015 Yes but this happens if both keys were pressed, can't get them work separately And yes your latest VoodooPS2Controller.kext is loaded, prefpane slider is working You need to trace/debug the existing code to determine how it disambiguates between each key. Then add/patch the code to send the appropriate code to the PS2 driver. Link to comment Share on other sites More sharing options...
wern apfel Posted May 2, 2015 Share Posted May 2, 2015 I can't instrument this buffer "Name (WMBU, Buffer (0x80) {})" can't compile dsdt Link to comment Share on other sites More sharing options...
RehabMan Posted May 2, 2015 Author Share Posted May 2, 2015 I can't instrument this buffer "Name (WMBU, Buffer (0x80) {})" can't compile dsdt Not sure what you're referring to. Name(WMBU, Buffer(0x80){}) creates a variable of type buffer, 128 bytes long, named WMBU. Post more details on what you're doing... It might be helpful if you posted your native DSDT, edited DSDT (with instrumentation you have so far), and output from ACPIDebug in system.log clearly noted with results from pressing each key (independently). Link to comment Share on other sites More sharing options...
wern apfel Posted May 3, 2015 Share Posted May 3, 2015 I'm sniffly, and at the moment my brain is not working very well Here is my dsdt, search for //_ to see my findings DSDT-org-nvs.zip Link to comment Share on other sites More sharing options...
RehabMan Posted May 3, 2015 Author Share Posted May 3, 2015 I'm sniffly, and at the moment my brain is not working very well Here is my dsdt, search for //_ to see my findings I notice your DSDT doesn't emulate a version of Windows for _OSI("Darwin"). But it probably doesn't matter if the WMI kext works. Why not instrument the WMI methods (or review the WMI driver) with the WMI kext installed, so you can see where the data can be read that disambiguates each key? Note: The answer is probably in EC0A and what ends up in the WMBU buffer. You can print the WMBU buffer with ACPIDebug eg. \rmdt.p2("WMBU is", WMBU) Link to comment Share on other sites More sharing options...
wern apfel Posted May 4, 2015 Share Posted May 4, 2015 I notice your DSDT doesn't emulate a version of Windows for _OSI("Darwin"). But it probably doesn't matter if the WMI kext works. Why not instrument the WMI methods (or review the WMI driver) with the WMI kext installed, so you can see where the data can be read that disambiguates each key? Note: The answer is probably in EC0A and what ends up in the WMBU buffer. You can print the WMBU buffer with ACPIDebug eg. \rmdt.p2("WMBU is", WMBU) This is my native dsdt, my patched emulates _OSI win7, the WMBU buffer is known, like i mentioned on early posts 50 degrease and 48 increase brightness, but i don't no how to split the key control When i boot with the HD3000 card and emulate linux, brightness change is working without that wmi controls Link to comment Share on other sites More sharing options...
RehabMan Posted May 4, 2015 Author Share Posted May 4, 2015 This is my native dsdt, my patched emulates _OSI win7, the WMBU buffer is known, like i mentioned on early posts 50 degrease and 48 increase brightness, but i don't no how to split the key control When i boot with the HD3000 card and emulate linux, brightness change is working without that wmi controls Post DSDT with instrumentation. Post output in system.log from ACPIDebug with clear attribution as it relates to the keys you're pressing. I previously suggested this in post #34. I won't ask a 3rd time. Link to comment Share on other sites More sharing options...
wern apfel Posted May 4, 2015 Share Posted May 4, 2015 Added this to _WED method \RMDT.P2 ("WMBU", WMBU) acpidebug output brightness key up ACPIDebug: { "WMBU", { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } key down ACPIDebug: { "WMBU", { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } Link to comment Share on other sites More sharing options...
RehabMan Posted May 4, 2015 Author Share Posted May 4, 2015 Added this to _WED method \RMDT.P2 ("WMBU", WMBU) acpidebug output brightness key up ACPIDebug: { "WMBU", { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } key down ACPIDebug: { "WMBU", { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } Please read post #38. The key is probably in EC0A, which appears to be used to transfer the info from EC to WMBU... Method (EC0A, 1, NotSerialized) { Acquire (QSEV, 0xFFFF) Store (ECRB (0x2B), Local1) // read count of bytes Store (Zero, Local0) While (LLess (Local0, Local1)) // roughly: for (Local0=0; Local0<count; Local0++) { Store (ECRB (0x2C), Local2) // reading next byte of data from EC If (LLess (Local0, SizeOf (Arg0))) { BBWR (Arg0, Local0, Local2) // BBWR (Buffer Byte Write) writes Local2 to buffer(Arg0) at offset Local0 } Increment (Local0) } Release (QSEV) Return (Arg0) } Link to comment Share on other sites More sharing options...
wern apfel Posted May 4, 2015 Share Posted May 4, 2015 Now it looks better key down ACPIDebug: { "EC0A Local2 is", 0x2, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Local2 is", 0x10, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Local2 is", 0x50, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } key up ACPIDebug: { "EC0A Local2 is", 0x2, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Local2 is", 0x10, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Local2 is", 0x48, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } edit: Oh, not really good ??, only can see this with wmi kext loaded Link to comment Share on other sites More sharing options...
RehabMan Posted May 4, 2015 Author Share Posted May 4, 2015 Now it looks better key down ACPIDebug: { "EC0A Local2 is", 0x2, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Local2 is", 0x10, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Local2 is", 0x50, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } key up ACPIDebug: { "EC0A Local2 is", 0x2, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Local2 is", 0x10, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Local2 is", 0x48, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } edit: Oh, not really good ??, only can see this with wmi kext loaded What do you mean by "key up" and "key down"? You never posted your DSDT with the instrumentation (request was at post #36). It is not surprising that instrumentation added to _WED or methods called by it are only executed with the WMI driver loaded. Clearly your EC query method (_Q66) simply notifies the WMI device, then waits for it to ask for additional information (by calling _WED and other functions). If you'll provide what I requested a bigger picture may emerge... Link to comment Share on other sites More sharing options...
wern apfel Posted May 5, 2015 Share Posted May 5, 2015 key up and down means pressing Fn + brightness key up(increase) or down(decrease) I had always deleted the dsdt, so i created a new one by pressing the brightness key, doesn't matter up or down without wmi kext ACPIDebug: "_Q66 BRTK" ACPIDebug: "SMEV BRTK" ACPIDebug: { "WMEV Arg0 is", 0x800, } ACPIDebug: "WMNF BRTK" ACPIDebug: "EV8 BRTK" ACPIDebug: "NEVT BRTK" with wmi kext brightness key down ACPIDebug: "_Q66 BRTK" ACPIDebug: "SMEV BRTK" ACPIDebug: { "WMEV Arg0 is", 0x800, } ACPIDebug: "WMNF BRTK" ACPIDebug: "EV8 BRTK" ACPIDebug: "NEVT BRTK" ACPIDebug: { "EC0A Local2 is", 0x2, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "EC0A Local2 is", 0x10, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "EC0A Local2 is", 0x50, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "CMEV Arg0 is", 0x800, } ACPIDebug: "WMEV BRTK" ACPIDebug: 0x0 brightness key up ACPIDebug: "_Q66 BRTK" ACPIDebug: "SMEV BRTK" ACPIDebug: { "WMEV Arg0 is", 0x800, } ACPIDebug: "WMNF BRTK" ACPIDebug: "EV8 BRTK" ACPIDebug: "NEVT BRTK" ACPIDebug: { "EC0A Local2 is", 0x2, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "EC0A Local2 is", 0x10, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "EC0A Local2 is", 0x48, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "EC0A Local2 is", 0x0, } ACPIDebug: { "EC0A Arg0 is", { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } ACPIDebug: { "CMEV Arg0 is", 0x800, } ACPIDebug: "WMEV BRTK" ACPIDebug: 0x0 dsdt.aml.zip Link to comment Share on other sites More sharing options...
RehabMan Posted May 6, 2015 Author Share Posted May 6, 2015 key up and down means pressing Fn + brightness key up(increase) or down(decrease) I had always deleted the dsdt, so i created a new one by pressing the brightness key, doesn't matter up or down without wmi kext ... Chage EC0A to output less often... we only care about what it returns in the buffer, and perhaps how many bytes were stored there: Method (EC0A, 1, NotSerialized) { Acquire (QSEV, 0xFFFF) Store (ECRB (0x2B), Local1) Store (Zero, Local0) While (LLess (Local0, Local1)) { Store (ECRB (0x2C), Local2) If (LLess (Local0, SizeOf (Arg0))) { BBWR (Arg0, Local0, Local2) } Increment (Local0) } Release (QSEV) \RMDT.P3 ("EC0A result", Arg0, Local1) Return (Arg0) } Re-post results. BTW, this DSDT has a bug. Look at _WED: Method (_WED, 1, NotSerialized) { WVSP () If (LNotEqual (Arg0, 0xD0)) { WVCU () Return (WMBU) } If (LEqual (ECD0, Zero)) { WVCU () Return (WMBU) } If (And (WMEV, 0x0200)) { CWEV (0x0200) WVPT (0x02) WVPT (Zero) WVPT (0xE045) } Else { If (And (WMEV, 0x0100)) { CWEV (0x0100) If (ECG4 ()) { WVPT (0x02) WVPT (Zero) WVPT (0xE043) } Else { WVPT (0x02) WVPT (Zero) WVPT (0xE044) } } Else { If (And (WMEV, 0x0800))//_both keys send code { Store (EC0A (WMBU), WMBU) CWEV (0x0800) } } } WVCU () Return (WMBU) } It calls WVSP at the beginning. And WVCU before all Return. But both WVSP and WVCU are acquiring the mutex WMIX. Method (WVSP, 0, NotSerialized) { Acquire (WMIX, 0xFFFF) Store (Zero, WM) BCLR (WMBU) } Method (WVCU, 0, NotSerialized) { Acquire (WMIX, 0xFFFF) Store (Zero, WM) } I think what was intended was to release the mutex in WVCU: Method (WVCU, 0, NotSerialized) { Release (WMIX) Store (Zero, WM) } Link to comment Share on other sites More sharing options...
RehabMan Posted May 6, 2015 Author Share Posted May 6, 2015 Based on what I see above (to be confirmed with the modifications requested), here is some ideas... old _Q66: Method (_Q66, 0, NotSerialized) //_both keys send code { If (LNotEqual (ECRD, One)) { Return (Zero) } NEVT ()//_notification event ?? Return (Zero) } new _Q66 (note that bug in WVCU would need to be fixed): Method (_Q66, 0, NotSerialized) //_both keys send code { If (LNotEqual (ECRD, One)) { Return (Zero) } NEVT () Store(\_SB.AMW0._WED(0xD0), Local2) // compare if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00 })) { // brightness down Notify(\_SB.PCI0.LPCB.PS2K, 0x0205) Notify(\_SB.PCI0.LPCB.PS2K, 0x0285) } if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00 })) { // brightness up Notify(\_SB.PCI0.LPCB.PS2K, 0x0206) Notify(\_SB.PCI0.LPCB.PS2K, 0x0286) } Return (Zero) } alternate (more complex, but also more efficient): Method (_Q66, 0, NotSerialized) //_both keys send code { If (LNotEqual (ECRD, One)) { Return (Zero) } Store(ECG1(), Local0) if (And(Local0, 0x800)) //brightness down/up keys { // get WMI command buffer from EC Acquire(\_SB.AMW0.WMIX, 0xFFFF) Store(Buffer(6) { 0, 0, 0, 0, 0, 0}, Local2) Store(ECRB(0x2b), Local1) Store(0, Local0) while (LLess(Local0, Local1)) { if (LGreaterEqual(Local0, SizeOf(Local2))) { // error: buffer overflow, make buffer not match Store(0, Index(Local2, 0)) break } Store(ECRB(0x2c), Index(Local2, Local0)) Increment(Local0) } Release(\_SB.AMW0.WMIX) // compare if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00 })) { // brightness down Notify(\_SB.PCI0.LPCB.PS2K, 0x0205) Notify(\_SB.PCI0.LPCB.PS2K, 0x0285) } if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00 })) { // brightness up Notify(\_SB.PCI0.LPCB.PS2K, 0x0206) Notify(\_SB.PCI0.LPCB.PS2K, 0x0286) } } Return (Zero) } Link to comment Share on other sites More sharing options...
wern apfel Posted May 6, 2015 Share Posted May 6, 2015 Chage EC0A to output less often... we only care about what it returns in the buffer, and perhaps how many bytes were stored there: Method (EC0A, 1, NotSerialized) { Acquire (QSEV, 0xFFFF) Store (ECRB (0x2B), Local1) Store (Zero, Local0) While (LLess (Local0, Local1)) { Store (ECRB (0x2C), Local2) If (LLess (Local0, SizeOf (Arg0))) { BBWR (Arg0, Local0, Local2) } Increment (Local0) } Release (QSEV) \RMDT.P3 ("EC0A result", Arg0, Local1) Return (Arg0) } Re-post results. brightness key up ACPIDebug: { "EC0A result", { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, 0x6, } brightness key down ACPIDebug: { "EC0A result", { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, 0x6, } the same as Arg0 beside the 0x6 at the end, buffer length ? Great RehabMan, it work's not the 1st fix , where Local2 gives me no values ACPIDebug: { "_Q66 Local2 is", { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } The complex fix works but we run into another issue the battery status change is slow, over 10 seconds here Local2 gives me this output brightness up ACPIDebug: { "_Q66 Local2 is", { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00, }, } brightness down ACPIDebug: { "_Q66 Local2 is", { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00, }, } while plug, unplug ac-adapter ACPIDebug: { "_Q66 Local2 is", 0x0, } edit: solved by moving to NEVT method and leave _Q66 untouched, now i have also better key response Thanks a million, you're awesome RehabMan Link to comment Share on other sites More sharing options...
RehabMan Posted May 6, 2015 Author Share Posted May 6, 2015 ... the same as Arg0 beside the 0x6 at the end, buffer length ? Yes, I figured that was the buffer length being read from the EC. I could tell from your previous output (number of iterations of the loop). Great RehabMan, it work's not the 1st fix , where Local2 gives me no values ACPIDebug: { "_Q66 Local2 is", { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, } Hmmm... would require more investigation into what _WED is doing... Did you fix the bug with WMIX? Probably WED0 needs to be called before calling _WED... Method (_Q66, 0, NotSerialized) //_both keys send code { If (LNotEqual (ECRD, One)) { Return (Zero) } NEVT () \_SB.AMW0.WED0(1) Store(\_SB.AMW0._WED(0xD0), Local2) // compare if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00 })) { // brightness down Notify(\_SB.PCI0.LPCB.PS2K, 0x0205) Notify(\_SB.PCI0.LPCB.PS2K, 0x0285) } if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00 })) { // brightness up Notify(\_SB.PCI0.LPCB.PS2K, 0x0206) Notify(\_SB.PCI0.LPCB.PS2K, 0x0286) } Return (Zero) } The complex fix works but we run into another issue the battery status change is slow, over 10 seconds here Local2 gives me this output brightness up ACPIDebug: { "_Q66 Local2 is", { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00, }, } brightness down ACPIDebug: { "_Q66 Local2 is", { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00, }, } while plug, unplug ac-adapter ACPIDebug: { "_Q66 Local2 is", 0x0, } edit: solved by moving to NEVT method and leave _Q66 untouched, now i have also better key response Yes, this EC query is quite overloaded... Thanks a million, you're awesome RehabMan Glad to help. And I think you can see how ACPIDebug can be quite useful... Link to comment Share on other sites More sharing options...
wern apfel Posted May 7, 2015 Share Posted May 7, 2015 Did you fix the bug with WMIX? Yes, but can't see any difference Probably WED0 needs to be called before calling _WED... Method (_Q66, 0, NotSerialized) //_both keys send code { If (LNotEqual (ECRD, One)) { Return (Zero) } NEVT () \_SB.AMW0.WED0(1) Store(\_SB.AMW0._WED(0xD0), Local2) // compare if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00 })) { // brightness down Notify(\_SB.PCI0.LPCB.PS2K, 0x0205) Notify(\_SB.PCI0.LPCB.PS2K, 0x0285) } if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00 })) { // brightness up Notify(\_SB.PCI0.LPCB.PS2K, 0x0206) Notify(\_SB.PCI0.LPCB.PS2K, 0x0286) } Return (Zero) } Now i can see the Local2 values, but no brightness change Glad to help. And I think you can see how ACPIDebug can be quite useful... Yes very useful, right now i'm digging for another issues. The Laptop is only working properly after wake from sleep, not really annoying but.. what means Arg0=3 at _WAK and _PTS, s3 sleep mode ? Link to comment Share on other sites More sharing options...
RehabMan Posted May 7, 2015 Author Share Posted May 7, 2015 Yes, but can't see any difference Now i can see the Local2 values, but no brightness change Do the buffers match? Maybe because the return buffer is too long when comparing. Method (_Q66, 0, NotSerialized) //_both keys send code { If (LNotEqual (ECRD, One)) { Return (Zero) } NEVT () \_SB.AMW0.WED0(1) Mid(\_SB.AMW0._WED(0xD0), 0, 7, Local2) // grab first 7 bytes of _WED // compare if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00, 0 })) { // brightness down Notify(\_SB.PCI0.LPCB.PS2K, 0x0205) Notify(\_SB.PCI0.LPCB.PS2K, 0x0285) } if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00, 0 })) { // brightness up Notify(\_SB.PCI0.LPCB.PS2K, 0x0206) Notify(\_SB.PCI0.LPCB.PS2K, 0x0286) } Return (Zero) } There is other ways to write the same thing... Yes very useful, right now i'm digging for another issues. The Laptop is only working properly after wake from sleep, not really annoying but.. what means Arg0=3 at _WAK and _PTS, s3 sleep mode ? This kind of information is in the ACPI spec. Arg0 indicates the sleep mode being entered (_PTS) or the sleep mode being exited (_WAK). Link to comment Share on other sites More sharing options...
wern apfel Posted May 8, 2015 Share Posted May 8, 2015 Do the buffers match? Maybe because the return buffer is too long when comparing. Yes they match Method (_Q66, 0, NotSerialized) //_both keys send code { If (LNotEqual (ECRD, One)) { Return (Zero) } NEVT () \_SB.AMW0.WED0(1) Mid(\_SB.AMW0._WED(0xD0), 0, 7, Local2) // grab first 7 bytes of _WED // compare if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x50, 0x00, 0 })) { // brightness down Notify(\_SB.PCI0.LPCB.PS2K, 0x0205) Notify(\_SB.PCI0.LPCB.PS2K, 0x0285) } if (LEqual(Local2, Buffer() { 0x02, 0x00, 0x10, 0x00, 0x48, 0x00, 0 })) { // brightness up Notify(\_SB.PCI0.LPCB.PS2K, 0x0206) Notify(\_SB.PCI0.LPCB.PS2K, 0x0286) } Return (Zero) } The buffer grabbing did the trick, also the first 5 bytes are enough, does not work without WED0 call By the way without releasing WMIX, acpidebug doesn't output anything @_Q66 Local2, but brightness change is working This kind of information is in the ACPI spec. Arg0 indicates the sleep mode being entered (_PTS) or the sleep mode being exited (_WAK). I have to read some ACPI specs Like i said some devices work only after wake from sleep, can it be a memory allocation issue? Link to comment Share on other sites More sharing options...
Recommended Posts