Contribute
Register

[Guide] Patching DSDT/SSDT for LAPTOP backlight control

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,061
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
so now i must replacment code 0x0405, 0x0406 to 0x86,0x87 :(

You should use ACPIDebug to trace the code path all the way into BRT6 (to make sure it is running). Then you can patch BRT6.
 
Joined
Mar 22, 2016
Messages
30
Motherboard
Laptop make & model # > See Rules!
CPU
I5-3217U
Graphics
HD 4000, NVIDIA GT720M
Mac
  1. MacBook Pro
Classic Mac
  1. Portable
Mobile Phone
  1. Android
You should use ACPIDebug to trace the code path all the way into BRT6 (to make sure it is running). Then you can patch BRT6.
Screen_Shot_2016_09_29_at_10_34_30_PM.png

here , i check from console with ACPIdebug, fn+up, down
 
Joined
Mar 2, 2013
Messages
25
Motherboard
P8Z77-V Deluxe
CPU
i7-3770K
Graphics
XFX R7950 BE DD
Hi RehabMan,

Thank you very much for your guide. I now have brightness adjustment working on El Capitan with HD4400.

Following your guide, I used ACPIDebug and found out _Q11 and _Q12 are the EC methods called for brightness up and down respectively, and by searching for PNP0303 in DSDT I found that KBC0 should be the device name for my keyboard. However, now I am confused by all the keycode stuff. Could you explain what is ADB code and where can I find the appropriate keycode to use? I have ELAN touchpad, and I'm using EMlyDinEsH's driver version 4.6.5.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,061
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Hi RehabMan,

Thank you very much for your guide. I now have brightness adjustment working on El Capitan with HD4400.

Following your guide, I used ACPIDebug and found out _Q11 and _Q12 are the EC methods called for brightness up and down respectively, and by searching for PNP0303 in DSDT I found that KBC0 should be the device name for my keyboard. However, now I am confused by all the keycode stuff. Could you explain what is ADB code and where can I find the appropriate keycode to use? I have ELAN touchpad, and I'm using EMlyDinEsH's driver version 4.6.5.

Read post #1 carefully. The patches/codes required for the ELAN driver are explained.
 
Joined
Mar 2, 2013
Messages
25
Motherboard
P8Z77-V Deluxe
CPU
i7-3770K
Graphics
XFX R7950 BE DD
Read post #1 carefully. The patches/codes required for the ELAN driver are explained.

Thanks for the quick reply. I've read post #1 back and forth a few times. I also read the readme for ACPIKeyboard, and in my ioreg I found that indeed ADB code for Brightness up=0x4d, Brightness down=0x4f.

Some newer versions of the ELAN driver may have direct support with codes 0x10 and 0x20. So, no need for ACPIKeyboard.kext in this case.

But what is ADB code, and what are the codes 0x10 and 0x20? I want to try directly notifying the keyboard first.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,061
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
But what is ADB code, and what are the codes 0x10 and 0x20? I want to try directly notifying the keyboard first.

It is not an ADB code, but those are the codes requires by the ELAN driver (arbitrary choice by the driver author).
 
Joined
Oct 13, 2013
Messages
65
Motherboard
Sony Vaio SVZ13 / HM77
CPU
Intel Core i7 3612QM
Graphics
Intel HD4000, 1920 x 1080
Mac
  1. Mac mini
  2. Mac Pro
Mobile Phone
  1. iOS
Right - Slider works, but the brightness keys are still a challenge.

I followed the guide and enabled the key logging.

When I press the F5 an F6 keys on my vaio keyboard I can see a message in the console all.

F5 AppleP2Keyboard sending key 3f=60 down
F6 ApplePsKeyboard sending key 40=61 down

But when I add the "Fn" key no message appears on the console

Brightness control works with the "Pause" and "Fn+Del" key and I would like to map them to the original F5 & F6 keys

When pressing the "Pause" key for brightness up it reports

AppleP2Keyboard sending key e045=71 down

And when when pressing the "Fn+Del" key for brightness down it reports

AppleP2Keyboard sending key 46=6b down

How to proceed to map the current brightness keys to the printed ones?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,061
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Right - Slider works, but the brightness keys are still a challenge.

I followed the guide and enabled the key logging.

When I press the F5 an F6 keys on my vaio keyboard I can see a message in the console all.

F5 AppleP2Keyboard sending key 3f=60 down
F6 ApplePsKeyboard sending key 40=61 down

But when I add the "Fn" key no message appears on the console

Probably handled via ACPI. Read post #1.
 
Joined
Oct 13, 2013
Messages
65
Motherboard
Sony Vaio SVZ13 / HM77
CPU
Intel Core i7 3612QM
Graphics
Intel HD4000, 1920 x 1080
Mac
  1. Mac mini
  2. Mac Pro
Mobile Phone
  1. iOS
I went through the guide again and and again, but no luck.

I checked the ACPI debug patches EC, GPE, WKA and Lido but no message appears on the console when I press the printed keys for brightness down (Fn+F5) and brightness up (Fn+F6)

Any ideas on this?

Can I map the actual P2K keys on the right (printed on) keys Fn+F5 and Fn+F6 ?
 
Top