Jump to content

DSDT Debugging/Tracing to system.log

DSDT ACPI debug trace

  • Please log in to reply
56 replies to this topic

#41
wern apfel

wern apfel

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 117 posts

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



#42
RehabMan

RehabMan

    InsanelyMac Deity

  • Coders
  • 1,893 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

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...

#43
wern apfel

wern apfel

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 117 posts

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

Attached Files



#44
RehabMan

RehabMan

    InsanelyMac Deity

  • Coders
  • 1,893 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

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)
        }


#45
RehabMan

RehabMan

    InsanelyMac Deity

  • Coders
  • 1,893 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars
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)
            }


#46
wern apfel

wern apfel

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 117 posts

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



#47
RehabMan

RehabMan

    InsanelyMac Deity

  • Coders
  • 1,893 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

...
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...

#48
wern apfel

wern apfel

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 117 posts

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 ?

 



#49
RehabMan

RehabMan

    InsanelyMac Deity

  • Coders
  • 1,893 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

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).

#50
wern apfel

wern apfel

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 117 posts

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?



#51
RehabMan

RehabMan

    InsanelyMac Deity

  • Coders
  • 1,893 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

Yes they match
 

The buffer grabbing did the trick, also the first 5 bytes are enough, does not work without WED0 call


I compared 7 just to make sure it didn't match with another command that starts the same as brightness, but is longer...
And if you look at _WED and WED0, you'll see why WED0(1) is required.

By the way without releasing WMIX, acpidebug doesn't output anything  @_Q66 Local2, but brightness change is working


Any Acquire should be balanced with Release.

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?


Define "some devices".

#52
wern apfel

wern apfel

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 117 posts

Define "some devices".

After start-up, SD-Card reader works randomly, sometimes when i lift up the magic mouse the pointer is jumping to the left upper corner and scrolling is not working, rarely pin sense on audio jack not working.

All these issues are gone after wake up from sleep.

 

Already tried:

At method NHPG and NPME RP06 is missing (SD-Card reader is tied to that bridge) also missing at _GPE method _L01. Added that entries but no change.

EV5, 2, 6 ,12 executed after sleep. 



#53
RehabMan

RehabMan

    InsanelyMac Deity

  • Coders
  • 1,893 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

After start-up, SD-Card reader works randomly, sometimes when i lift up the magic mouse the pointer is jumping to the left upper corner and scrolling is not working, rarely pin sense on audio jack not working.
All these issues are gone after wake up from sleep.


I have serious doubts that these problems are related...

#54
wern apfel

wern apfel

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 117 posts

These problems are related... ??

I hoped you can give me some hints where i have to dig.

 

Should i open a new topic for this issue ?

My guess is that something is not executed at start-up ,but after wake from sleep. Thats the reason why i've traced some methods called by _WAK.

Could it be a regions floating issue?



#55
RehabMan

RehabMan

    InsanelyMac Deity

  • Coders
  • 1,893 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

These problems are related... ??
I hoped you can give me some hints where i have to dig.
 
Should i open a new topic for this issue ?


Jack sense on audio has to do with patched AppleHDA or work you should do in CodecCommander.
Magic mouse is bluetooth, perhaps USB related.
SD-card reader.. not sure depends on how it is connected to the computer (USB or PCIe).

My guess is that something is not executed at start-up ,but after wake from sleep. Thats the reason why i've traced some methods called by _WAK.
Could it be a regions floating issue?


Not floating regions. SystemMemory addresses are determined by BIOS at boot. They don't change during a sleep/wake transition.

#56
wern apfel

wern apfel

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 117 posts

Jack sense on audio has to do with patched AppleHDA or work you should do in CodecCommander.
Magic mouse is bluetooth, perhaps USB related.
SD-card reader.. not sure depends on how it is connected to the computer (USB or PCIe).

Logically yes, but i never ever got this issues after wake from sleep, and become instantly fixed after wake from sleep.

Also fixed after suspend to disk wake, does the BIOS not the same as on normal boot?, if so than maybe it's not a dsdt issue.

 

SD-card reader is connected to PCIe, device RP06



#57
RehabMan

RehabMan

    InsanelyMac Deity

  • Coders
  • 1,893 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

Logically yes, but i never ever got this issues after wake from sleep, and become instantly fixed after wake from sleep.
Also fixed after suspend to disk wake, does the BIOS not the same as on normal boot?, if so than maybe it's not a dsdt issue.
 
SD-card reader is connected to PCIe, device RP06


No idea on your issues. And they are off-topic this thread. To me, they don't seem related.

You should probably look into detail about what is going on in DSDT... Maybe _INI or _REG methods are not executing completely.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2015 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy