Contribute
Register

[Help] Can't apply "Instrument EC Queries" DSDT patch.

Status
Not open for further replies.
Joined
Oct 9, 2011
Messages
37
Motherboard
Xiaomi Mi Notebook Pro 15
CPU
Core i5-8250U
Graphics
Intel UHD Graphics 620
Mac
  1. MacBook Pro
  2. Mac Pro
Mobile Phone
  1. iOS
Hello again, I have another problem. I'm trying to fix the brightness keys and have been following these guides:

https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/
https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/
https://github.com/RehabMan/OS-X-ACPI-Keyboard

I've successfully added the ACPIDebug kext and patch (it shows up in the ioreg).

The issue is that I can't apply the "Instrument EC Queries" patch because there is no code that it matches I suppose.
What can I do about it?

The notebook is using the ELAN driver and I've also checked the ADB codes in the ioReg: they are the same as in the example. So in theory, once I get the correct methods from the debug info, I'll be able to delegate the ADB codes correctly and smile.


Also, yes, I know that Windows isn't spoofed in the DSDT but it is in clover so that isn't the issue.


I've attached the disassembled ACPI files as well.

Thanks a lot.
 

Attachments

  • config.plist
    12.2 KB · Views: 307
  • origin.zip
    178.8 KB · Views: 156
  • Kevin’s MacBook Pro.ioreg
    7.5 MB · Views: 163
Last edited:
Hello again, I have another problem. I'm trying to fix the brightness keys and have been following these guides:

https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/
https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/
https://github.com/RehabMan/OS-X-ACPI-Keyboard

I've successfully added the ACPIDebug kext and patch (it shows up in the ioreg).

The issue is that I can't apply the "Instrument EC Queries" patch because there is no code that it matches I suppose.
What can I do about it?

The notebook is using the ELAN driver and I've also checked the ADB codes in the ioReg: they are the same as in the example. So in theory, once I get the correct methods from the debug info, I'll be able to delegate the ADB codes correctly and smile.


Also, yes, I know that Windows isn't spoofed in the DSDT but it is in clover so that isn't the issue.


I've attached the disassembled ACPI files as well.

Thanks a lot.

No EC queries present.

Your brightness keys trigger a call to method GPE._L16.
It calls ECLV, which eventually calls LEVN, which calls LGPA.
This code in LGPA is responsible for the brightness keys:
Code:
                ElseIf (LEqual (_T_0, 0x03))
                {
                    Notify (^^GFX0.DD1F, 0x87)
                    Store (Zero, OG00)
                }
                ElseIf (LEqual (_T_0, 0x04))
                {
                    Notify (^^GFX0.DD1F, 0x86)
                    Store (Zero, OG00)
                }

You can instrument that code to verify.
 
You're incredible. I just placed a Notify call to delegate the codes to the PS2 in each of those cases et voila': it works!

I do understand how you found out that it was LGPA. However, how did you know that is was those to cases? Was it because of ^^GFX0.DD1F or what? I'm really eager to learn.

~~Also, I've tried finding some info on how to make these patches as add-on SSDTs. How could I do that? I get the general idea of it; you write the Defblock and then the Scope etc., all the way down. But where can I read up on the exact requisites?~~

Thanks a lot for your help!
 
Last edited:
I do understand how you found out that it was LGPA. However, how did you know that is was those to cases? Was it because of ^^GFX0.DD1F or what? I'm really eager to learn.

0x86 and 0x87 are the notify codes for brightness keys for Windows.

~~Also, I've tried finding some info on how to make these patches as add-on SSDTs. How could I do that? I get the general idea of it; you write the Defblock and then the Scope etc., all the way down. But where can I read up on the exact requisites?~~

Read hotpatch guide:
http://www.tonymacx86.com/threads/guide-using-clover-to-hotpatch-acpi.200137/
 
Thanks, I've started doing it but I gotta say that I'm surprised that nobody has created a tool that automatically sets the External(s) - it's a very tedious task.

Also, the LGPA method is huge! I'm already at 40 Externals...

Such a tool would be relatively difficult (close to impossible) to create as ACPI object access uses dynamic runtime lookup.
Careful analysis of the code required...
 
0x86 and 0x87 are the notify codes for brightness keys for Windows.

Why isn't that piece of info in the brightness guide? Rather than mucking about with the ACPI debug I just searched for those notify codes in the DSDT, found it and the variables, and there we go.
 
Why isn't that piece of info in the brightness guide? Rather than mucking about with the ACPI debug I just searched for those notify codes in the DSDT, found it and the variables, and there we go.

Not all ACPI sets support the 0x86 and 0x87 codes.
And at the time the guide was written, this information had not yet been discovered by me.

Also, it is important you confirm you have a setup that actually results in the query methods for brightness keys actually being called (eg. confirmation of adequate _OSI spoofing, etc).
 
Not all ACPI sets support the 0x86 and 0x87 codes.
And at the time the guide was written, this information had not yet been discovered by me.

Also, it is important you confirm you have a setup that actually results in the query methods for brightness keys actually being called (eg. confirmation of adequate _OSI spoofing, etc).

Well I respectfully recommend you mention it in the brightness guide. It should save a lot of time for some people and is quite easy to implement by comparison.
 
Status
Not open for further replies.
Back
Top