If you have a working Brightness Slider and you might be using Brightness slider or manual hotkeys to control brightness then this guide may help you to use your Native hotkeys of laptop.
(All the Credits goes to @RehabMan For OS-X-ACPI-Debug Kext and DSDT Patches.)
This step assumes that you are using RehabMan's VoodooPS2Controller or Acidanthera's PS2Controller
Install the kext: https://github.com/RehabMan/OS-X-ACPI-Debug
Open MaciASL and click on patch.(Add rehab man repo)
Apply "Add DSDT Debug Methods" and "Instrument EC Queries" that are under Brightness Fix.
Save the DSDT and restart
Look in Syslog as you press the key corresponding to brightness to determine which _QXX methods handle the keys
(UPDATE: From Sierra Apple changed logging process. So you won't find ACPIdebug result using syslog command. Instead use following command )
log show --last 5 | grep ACPIDebug
6. Then patch DSDT:
into method label _Q1D replace_content
begin
// Brightness Down\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0205)\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0285)\n
end;
into method label _Q1C replace_content
begin
// Brightness Up\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0206)\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0286)\n
end;
Change the variable _Q1D/_Q1C as per the log. 7. Try compiling and check if it generates errors 8. If it does, then change the PS2M to PS2X according to the one found in your DSDT.
You can find your keyboard device simply by checking on IOReg. Note the device name from "IONameMatched" under ps2controller and then search that name in your DSDT. 9. Save and place the compiled DSDT. 10. Now you should see that you have your corresponding keys to change your brightness http://www.tonymacx86.com/images/smilies/smile_osx.png
Create SSDT HotPatch (Preferred for Opencore users)
1. Proceed with above steps till 5 in order to figure out which EC Methods are used for brightness hot keys.
2. The first thing we need to do is to block the default methods from DSDT by renaming them from _Q11 & _Q12 to XQ11 & XQ12 respectively.
(Considering my keys are method _Q11 & _Q12). To do this create two ACPI rename patch.
Find : 5F513131 //hex value of _Q11
Replace : 58513131 //hex value of XQ11
Comment: _Q11 to XQ11 rename
Find: 5F513132
replace: 58513132
Comment: _Q12 to XQ12 rename
3. Now create a hot patch SSDT with two methods named _Q11 and _Q12 to control brightness in Mac OS and for other OS we can just redirect to the earlier renamed methods XQ11 & XQ12.
DefinitionBlock ("", "SSDT", 2, "hack", "BRKEYS", 0x00000000)
{
External (_SB_.PCI0.LPCB.EC0_, DeviceObj)
External (_SB_.PCI0.LPCB.EC0_.XQ11, MethodObj) // Brightness down method
External (_SB_.PCI0.LPCB.EC0_.XQ12, MethodObj) // Brightness up method
External (_SB_.PCI0.LPCB.PS2M, DeviceObj) //rename to your keyboard device
Scope (_SB.PCI0.LPCB.EC0)
{
Method (_Q11, 0, NotSerialized) // _Qxx: EC Query, xx=0x00-0xFF
{
If (_OSI ("Darwin"))
{
Notify (PS2M, 0x0365) //send f14,rename to your keyboard device.
}
Else
{
\_SB.PCI0.LPCB.EC0.XQ11 () //redirects to original method for other OS.
}
}
Method (_Q12, 0, NotSerialized) // _Qxx: EC Query, xx=0x00-0xFF
{
If (_OSI ("Darwin"))
{
Notify (PS2M, 0x0366) //sends f15, rename to your keyboard device.
}
Else
{
\_SB.PCI0.LPCB.EC0.XQ12 ()
}
}
}
}
FOR more detail and Queries,Check Out original Post of @RehabMan Here;
http://www.insanelym...18#entry1997112
Get Latest Version of OS-X-ACPI-Debug kext here:
https://bitbucket.org/RehabMan/os-x-acpi-debug/downloads