Jump to content
MaLd0n

[Guide] Easy Brightness Hotkey Remapping

Recommended Posts

  • Administrators

Donation with Paypal https://tinyurl.com/r7fchn9

Donation with Stripe https://tinyurl.com/2ssnydn6

Donation with BuyMeaCoffee https://tinyurl.com/bvsbpf6e

Donation with BTC 33HeGCuCSh4tUBqdYkQqKpSDa1E7WeAJQ3

Donation with PicPay @danielnmaldonado

Donation with PiX @danielnmaldonado@gmail.com

Donation with Mercado Livre https://tinyurl.com/y9evkj5u

 

-Check our tutorial, How to create a Vanilla installer with MacOS-

https://tinyurl.com/y9pvz6ta

-Clover Vanilla Guide-

https://tinyurl.com/ydhgntcz

-OpenCore Vanilla Guide-

https://tinyurl.com/ycvcnp8h

 

Let's Start

 

Download Maciasl from here

https://tinyurl.com/yd8qst6z

Download Lilu and WhateverGreen

Lilu https://tinyurl.com/ya657fxl

WhateverGreen https://tinyurl.com/ybtahbf3

 

1- Apply PNLF Patch or use SSDT PNLF

 --Patch PNLF SandyBridge / IvyBridge--

a- SSDT SSDT-PNLF IVY.aml.zip

b- Patch Maciasl

into_all device label PNLF remove_entry;
into scope label _SB insert
begin
Device (PNLF)\n
        {\n
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID\n
            Name (_CID, "backlight")  // _CID: Compatible ID\n
            Name (_UID, 0x0E)  // _UID: Unique ID\n
            Name (_STA, 0x0B)  // _STA: Status\n
        }\n
end

 

 --Patch PNLF Haswell / Broadwell--

a- SSDT SSDT-PNLF HSL.aml.zip

b- Patch Maciasl

into_all device label PNLF remove_entry;
into scope label _SB insert
begin
Device (PNLF)\n
        {\n
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID\n
            Name (_CID, "backlight")  // _CID: Compatible ID\n
            Name (_UID, 0x0F)  // _UID: Unique ID\n
            Name (_STA, 0x0B)  // _STA: Status\n
        }\n
end

 

--Patch PNLF SkyLake / Kabylake--

a- SSDT SSDT-PNLF SKL.aml.zip

b- Patch Maciasl

into_all device label PNLF remove_entry;
into scope label _SB insert
begin
Device (PNLF)\n
        {\n
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID\n
            Name (_CID, "backlight")  // _CID: Compatible ID\n
            Name (_UID, 0x10)  // _UID: Unique ID\n
            Name (_STA, 0x0B)  // _STA: Status\n
        }\n
end


--Patch PNLF Coffelake / WhiskeyLake / CometLake / Ice Lake--

a- SSDT SSDT-PNLF CFL.aml.zip

b- Patch Maciasl

into_all device label PNLF remove_entry;
into scope label _SB insert
begin
Device (PNLF)\n
        {\n
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID\n
            Name (_CID, "backlight")  // _CID: Compatible ID\n
            Name (_UID, 0x13)  // _UID: Unique ID\n
            Name (_STA, 0x0B)  // _STA: Status\n
        }\n
end

After this patch Brightness Slider is done, now let's check a Brightness Hotkey Remapping

 

2- Brightness Keys Patch

a- Open your DSDT with Maciasl

EmgRYfg.png

b- Search 0x86 entry inside Method _Qxx | We need 0x86 and 0x87 entries

*** in some cases these Methods are in some SSDT ***

*** have some other interesting entries like DD1F, BRTN, DD02, etc inside Methods ***

Y8PNA64.png

c- We need patch _Q11 and _Q12 Methods

 

d- Applying patch | This patch work with VoodooPS2Controller.kext

into method label _Q11 replace_content
begin
// Brightness Down\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0405)\n
end;
into method label _Q12 replace_content
begin
// Brightness Up\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0406)\n
end

e- This patch work with ApplePS2SmartTouchPad.kext

into method label _Q11 replace_content
begin
// Brightness Down\n
Notify (PS2K, 0x20)\n
end;

into method label _Q12 replace_content
begin
// Brightness Up\n
Notify (PS2K, 0x10)\n
end;

 

In some cases LPCB and PS2K devices have a different names. Check ioreg and enjoy.

a- LPCB or LPC or SBRG, etc

b- PS2K or KBD or KBD0, etc

 

-Credits

Slice, Kabyl, usr-sse2, jadran, Blackosx, dmazar, STLVNUB, pcj, apianti, JrCs, pene, FrodoKenny, skoczy, ycr.ru, Oscar09, xsmile, SoThOr, RehabMan, Download-Fritz, Zenit432, cecekpawon, Intel, Apple, Oracle, Chameleon Team, crazybirdy, Mieze, Mirone, Oldnapalm, netkas, Elconiglio, artut-pt, ErmaC, Pavo, Toleda, Master Chief and family, bcc9, The King, PMheart, Sherlocks, Micky1979, vit9696, vandroiy2013, Voodoo Team, Pike R. Alpha, lvs1974, Austere.J, CVad, headkaze, onemanosx, erroruser, Jenny David, Sampath007, Facebook Hackintosh community, Facebook Olarila community and many, many, many others!

 

We're all here to have fun and learn from each other!

  • Like 1

Support Olarila Vanilla Hackintosh by making a donation HERE

About Premium Users you can check HERE

Problems with Paypal HERE

Link to comment
Share on other sites

  • Administrators
7 hours ago, Deihmos said:

How can I do this patch with an SSDT? I am looking for a way to just use SSDTs with OpenCore.

in this case u need use rename

example

_Q11 to _Q1x and inject SSDT with new remap

Support Olarila Vanilla Hackintosh by making a donation HERE

About Premium Users you can check HERE

Problems with Paypal HERE

Link to comment
Share on other sites

25 minutes ago, MaLd0n said:

in this case u need use rename

example

_Q11 to _Q1x and inject SSDT with new remap

I have made some progress but not there as yet. This is my final issue that I am trying to resolve. The brightness keys should be fn+f3 for up and fn+f2 for down.

I have the renames but the SSDT has an issue. What am I doing wrong?

 

SSDT-BLCT.dsl DSDT.dsl config.plist.zip

Link to comment
Share on other sites

2 hours ago, MaLd0n said:

first u need check what methods _Qxx u need rename

check the name of the device ps2 too

I have done that. It is _Q1C and _Q1D  and I have already done the renames. I am not sure what code I need for fn+f2 and fn+f3.

DefinitionBlock("", "SSDT", 2, "hack", "BrightFN", 0)
{
    External(_SB.PCI0.LPCB.KBD0, DeviceObj)
    External(_SB.PCI0.LPCB.EC0, DeviceObj)
    External(_SB.PCI0.LPCB.EC0.XQ1C, MethodObj)
    External(_SB.PCI0.LPCB.EC0.XQ1D, MethodObj)
    
    Scope (_SB.PCI0.LPCB.EC0)
    {
        Method (_Q1C, 0, NotSerialized)//down
        {
            If (_OSI ("Darwin"))
            {
                Notify(\_SB.PCI0.LPCB.KBD0, 0x0405)
                Notify(\_SB.PCI0.LPCB.KBD0, 0x20)
            }
            Else
            {
                \_SB.PCI0.LPCB.EC0.XQ1C()
            }
        }
    
        Method (_Q1D, 0, NotSerialized)//up
        {
            If (_OSI ("Darwin"))
            {
                Notify(\_SB.PCI0.LPCB.KBD0, 0x0406)
                Notify(\_SB.PCI0.LPCB.KBD0, 0x10)
            }
            Else
            {
                \_SB.PCI0.LPCB.EC0.XQ1D()
            }
        }
    }
}
//EOF
 

Edited by Deihmos
Link to comment
Share on other sites

  • Administrators
3 hours ago, Deihmos said:

When I press the brightness keys the PC reboots. I did the rename _Q1C to XQ1C and _Q1D to XQ1D. IS that incorrect ? If not, what should it be?

u have a dual boot?

Support Olarila Vanilla Hackintosh by making a donation HERE

About Premium Users you can check HERE

Problems with Paypal HERE

Link to comment
Share on other sites

46 minutes ago, MaLd0n said:

u have a dual boot?

Yes I have a dual boot but just wanted to see if I can get everything working with SSDTs. This is the only thing I have outstanding and I just can't figure it out. Everything else is working fine. 

I do have a DSDT that you did.

 

Link to comment
Share on other sites

On 9/9/2020 at 10:38 AM, MaLd0n said:

if u dont use dual boot why use a incomplete solution provide by SSDT. use full DSDT patched

I use dual boot. I also have the DSDT but I don't see any difference between using the SSDTs vs DSDT. I get the same results but can dual boot with the SSDTs.

 

voodoops2 now handles ACPI notification for brightness keys without any patches.

Edited by Deihmos
Link to comment
Share on other sites

  • Administrators
1 hour ago, Deihmos said:

I use dual boot. I also have the DSDT but I don't see any difference between using the SSDTs vs DSDT. I get the same results but can dual boot with the SSDTs.

have many difference. with ssdt the system is always a little slippery

but if u reaaly need dual boot and need boot windows from opencore, use ssdt

i'm using bootkey

 

Support Olarila Vanilla Hackintosh by making a donation HERE

About Premium Users you can check HERE

Problems with Paypal HERE

Link to comment
Share on other sites

On 9/9/2020 at 1:28 AM, Deihmos said:

I got it done. The code was not correct. Now I have everything working with SSDTs.

I don't use OpenCore for dual boot because I don't want my PC to act like a Mac. Hopefully an option is added to disable it. 

@Deihmos could you please share the ssdt code (and oc renames) that worked for you?

Im trying to do the same thing with SSDT for HP Elitebook 840 G6.

Edited by miki1987
Link to comment
Share on other sites

Thank you for the quick reply @MaLd0n!

I dont know what is my problem exactly, my special keys (fn+f3 and fn+f4) controls brightness perfectly, but everytime I reboot from Windows, it doesn't work anymore (if I hold power button for 30secs to reset my EC, or something :)... then it works again, but always after windows stops working).

I tried this kext but reboots always when I try to load it. I dont use any special SSDT or DSDT patches for this. I tried booting with "-v" and "-brkeysdbg" for debug output, but I got nothing meaningful. Just freezes while booting with this kext.

TY

https://github.com/lonacluka/HP-EliteBook-840-G6-Hackintosh

Edited by miki1987
added github link
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.





×
  • Create New...
The popup will be closed in 15 seconds...