- Joined
- Oct 22, 2013
- Messages
- 197
- Motherboard
- hm77
- CPU
- 4790k
- Graphics
- hd4000
Many laptops use calls to DSDT EC query methods to control brightness. On my system, for example, the brightness keys are Fn+LeftArrow (brightness down), and Fn+RightArrow (brightness up). When you press the brightness down key-combo it calls EC method _Q11, and calls _Q12 for brightness up.
The problem is that OS X has no idea what do with the results these methods produce when they are called. A DSDT patch is needed to fix the ACPI controlled brightness keys on a hackintosh.
To make brightness keys function as expected when using EMlyDinEsH's Smart Touchpad driver (v4.3+), you first need some information: which methods get called when the brightness buttons are pressed, and where EMlyDinEsH's driver is connecting to your machine.
Finding out where the driver is connecting is the simplest part. Launch IORegistryExplorer and search for keyboard. You should see something like this:
As you can see, ApplePS2Keyboard attaches to ApplePS2KeyboardDevice, which attaches to ps2controller, all of which attach to, on my machine, KBC0, the device name we are looking for. Another common place for a keyboard to attach is PS2K.
With that out of the way, we now need to figure out which EC methods get called when you press your brightness key combos. For this we need to use RehabMan's ACPIDebug kext, found here:
https://github.com/RehabMan/OS-X-ACPI-Debug
Install the kext, and apply the following DSDT patches:
Debug:
https://github.com/RehabMan/OS-X-ACPI-Debug/blob/master/debug.txt
Instrument Qxx:
https://github.com/RehabMan/OS-X-ACPI-Debug/blob/master/instrument_Qxx.txt
and reboot.
Now, open Console, and when you press your brightness key combos, the methods they call should be displayed in the system log.
In my case, the methods were _Q11 for brightness down, and _Q12 for brightness up.
Now that we have the three required pieces of information, which for me are:
KBC0, the device to which the keyboard attaches,
_Q11, the method called when the brightnes down button is pressed, and
_Q12, the method called when the brightnes up button is pressed,
we can now patch our DSDT at those methods to notify EMlyDinEsH's driver on key press.
First remove the ACPIDebug kext, and also remove the two debug patches you applied earlier using this patch:
https://github.com/RehabMan/OS-X-ACPI-Debug/blob/master/remove.txt
Next, apply this patch:
Replacing KBC0 in the lines
with the name of your device, and replacing _Q11 & _Q12 in the lines
with the name of your methods for brightness up, and for brightness down respectively.
Reboot, and your brightness keys should now be functional. Do note that by default the Smart Touchpad driver has FinerFNBrightnessControl enabled in its configuration plist. This breaks the brightness scale into 64 steps, instead of the normal 16 that OSX uses. To configure the keyboard driver, reference this thread: http://forum.osxlatitude.com/index....-enhanced-keyboard-for-smart-touchpad-driver/
Much thanks goes to EMlyDinEsH for taking the time to implement what was necessary to make this work on his side, and to RehabMan for his ACPIDebug kext.
The problem is that OS X has no idea what do with the results these methods produce when they are called. A DSDT patch is needed to fix the ACPI controlled brightness keys on a hackintosh.
To make brightness keys function as expected when using EMlyDinEsH's Smart Touchpad driver (v4.3+), you first need some information: which methods get called when the brightness buttons are pressed, and where EMlyDinEsH's driver is connecting to your machine.
Finding out where the driver is connecting is the simplest part. Launch IORegistryExplorer and search for keyboard. You should see something like this:
Code:
|
--[B]KBC0[/B]
|
--ps2controller
|
--ApplePS2KeyboardDevice
|
--ApplePS2Keyboard
With that out of the way, we now need to figure out which EC methods get called when you press your brightness key combos. For this we need to use RehabMan's ACPIDebug kext, found here:
https://github.com/RehabMan/OS-X-ACPI-Debug
Install the kext, and apply the following DSDT patches:
Debug:
https://github.com/RehabMan/OS-X-ACPI-Debug/blob/master/debug.txt
Instrument Qxx:
https://github.com/RehabMan/OS-X-ACPI-Debug/blob/master/instrument_Qxx.txt
and reboot.
Now, open Console, and when you press your brightness key combos, the methods they call should be displayed in the system log.
In my case, the methods were _Q11 for brightness down, and _Q12 for brightness up.
Now that we have the three required pieces of information, which for me are:
KBC0, the device to which the keyboard attaches,
_Q11, the method called when the brightnes down button is pressed, and
_Q12, the method called when the brightnes up button is pressed,
we can now patch our DSDT at those methods to notify EMlyDinEsH's driver on key press.
First remove the ACPIDebug kext, and also remove the two debug patches you applied earlier using this patch:
https://github.com/RehabMan/OS-X-ACPI-Debug/blob/master/remove.txt
Next, apply this patch:
Code:
#Edit methods _Q11 and _Q12 to interface with KBC0
into method label [B]_Q11[/B] replace_content
begin
// Brightness Down\n
Notify ([B]KBC0[/B], 0x20)\n
end;
into method label [B]_Q12[/B] replace_content
begin
// Brightness Up\n
Notify ([B]KBC0[/B], 0x10)\n
end
Code:
Notify ([B]KBC0[/B], 0x10)
Code:
into method label [B]_Q11[/B] replace_content
into method label [B]_Q12[/B] replace_content
Reboot, and your brightness keys should now be functional. Do note that by default the Smart Touchpad driver has FinerFNBrightnessControl enabled in its configuration plist. This breaks the brightness scale into 64 steps, instead of the normal 16 that OSX uses. To configure the keyboard driver, reference this thread: http://forum.osxlatitude.com/index....-enhanced-keyboard-for-smart-touchpad-driver/
Much thanks goes to EMlyDinEsH for taking the time to implement what was necessary to make this work on his side, and to RehabMan for his ACPIDebug kext.