Contribute
Register

[Guide] Patching DSDT/SSDT for LAPTOP backlight control

Feartech

Moderator
Joined
Aug 3, 2013
Messages
23,659
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
Actually, Lilu is not missing. I installed it in /Library/Extensions/ to enable Brightness slider as per the requirements stated in here.

Fortunately, I've fixed the issue. In this guide, RahabMan guided to apply this patch:
Code:
into method label _Q0E replace_content
begin
// Brightness Down\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0405)\n
end;
into method label _Q0F replace_content
begin
// Brightness Up\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0406)\n
end;

In another guide elsewhere, I've got this patch to apply:
Code:
#Edit methods _Q11 and _Q12 to interface with KBC0 (or PS2K in some systems),
into method label _Q0E replace_content
begin
// Brightness Down\n
Notify (PS2K, 0x20)\n
end;

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

And now, brightness shortcut is working well.

Thanks you all.

P.S.: I've attached the file you've asked.
thing is, you only have a few kexts in /L/E and not all, but newer versions of macOS, Catalina, you would be best to have them all just in clover/kexts/other
 
Joined
Feb 20, 2016
Messages
15
Motherboard
Asus P552LJ (Laptop)
CPU
Intel Core i3-5010U
Graphics
Intel HD 5500
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
thing is, you only have a few kexts in /L/E and not all, but newer versions of macOS, Catalina, you would be best to have them all just in clover/kexts/other

So, you are suggesting me to include all kexts which are required to patch audio, brightness, graphics in Clover/kexts/Others? Will it work the same way as if they were in /L/E?
 

Feartech

Moderator
Joined
Aug 3, 2013
Messages
23,659
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
So, you are suggesting me to include all kexts which are required to patch audio, brightness, graphics in Clover/kexts/Others? Will it work the same way as if they were in /L/E?
yep, i have tested both ways and see no issues :)

i used to always have all my 3rd party kexts in /L/E and now with Catalina, i have all my 3rd party kexts in clover/kexts/other (actually, i am now on OpenCore so they are all in OC/kexts
 
Joined
May 11, 2015
Messages
262
Motherboard
Dell 7348-Clover
CPU
i7-5500U
Graphics
HD 5500
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
So, you are suggesting me to include all kexts which are required to patch audio, brightness, graphics in Clover/kexts/Others? Will it work the same way as if they were in /L/E?
You can use in /L/E but you will need to use a LiluFriend kext too.
Older kexts can not work properly on /Clover/Kexts but all the newer kexts works fine.
 
Joined
Sep 5, 2012
Messages
99
Motherboard
Metabox Alpha (Clevo)
CPU
i7-9750H
Graphics
UHD 630
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
Hey guys,
Would my brightness keys be in PS2K or PS2M. PS2M has the SYNA1201 device and PS2K has the PNP0303.
Code:
Scope (_SB.PCI0.LPCB)
    {
        Device (PS2K)
        {
            Name (_HID, "MSFT0001")  // _HID: Hardware ID
            Name (_CID, EisaId ("PNP0303"))  // _CID: Compatible ID
            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
            {
                IO (Decode16,
                    0x0060,             // Range Minimum
                    0x0060,             // Range Maximum
                    0x01,               // Alignment
                    0x01,               // Length
                    )
                IO (Decode16,
                    0x0064,             // Range Minimum
                    0x0064,             // Range Maximum
                    0x01,               // Alignment
                    0x01,               // Length
                    )
                IRQ (Edge, ActiveHigh, Exclusive, )
                    {1}
            })
            Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
            {
                StartDependentFn (0x00, 0x00)
                {
                    FixedIO (
                        0x0060,             // Address
                        0x01,               // Length
                        )
                    FixedIO (
                        0x0064,             // Address
                        0x01,               // Length
                        )
                    IRQNoFlags ()
                        {1}
                }
                EndDependentFn ()
            })
        }
    }

    Scope (_SB.PCI0.LPCB)
    {
        Device (PS2M)
        {
            Name (_HID, "SYNA1201")  // _HID: Hardware ID
            Method (_UID, 0, Serialized)  // _UID: Unique ID
            {
                Return (Zero)
            }

            Name (_CID, EisaId ("PNP0F13"))  // _CID: Compatible ID
            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
            {
                IRQ (Edge, ActiveHigh, Exclusive, )
                    {12}
            })
            Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
            {
                StartDependentFn (0x00, 0x00)
                {
                    IRQNoFlags ()
                        {12}
                }
                EndDependentFn ()
            })
        }
    }
 
Joined
Feb 20, 2016
Messages
15
Motherboard
Asus P552LJ (Laptop)
CPU
Intel Core i3-5010U
Graphics
Intel HD 5500
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
Hey guys,
Would my brightness keys be in PS2K or PS2M. PS2M has the SYNA1201 device and PS2K has the PNP0303.
Code:
Scope (_SB.PCI0.LPCB)
    {
        Device (PS2K)
        {
            Name (_HID, "MSFT0001")  // _HID: Hardware ID
            Name (_CID, EisaId ("PNP0303"))  // _CID: Compatible ID
            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
            {
                IO (Decode16,
                    0x0060,             // Range Minimum
                    0x0060,             // Range Maximum
                    0x01,               // Alignment
                    0x01,               // Length
                    )
                IO (Decode16,
                    0x0064,             // Range Minimum
                    0x0064,             // Range Maximum
                    0x01,               // Alignment
                    0x01,               // Length
                    )
                IRQ (Edge, ActiveHigh, Exclusive, )
                    {1}
            })
            Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
            {
                StartDependentFn (0x00, 0x00)
                {
                    FixedIO (
                        0x0060,             // Address
                        0x01,               // Length
                        )
                    FixedIO (
                        0x0064,             // Address
                        0x01,               // Length
                        )
                    IRQNoFlags ()
                        {1}
                }
                EndDependentFn ()
            })
        }
    }

    Scope (_SB.PCI0.LPCB)
    {
        Device (PS2M)
        {
            Name (_HID, "SYNA1201")  // _HID: Hardware ID
            Method (_UID, 0, Serialized)  // _UID: Unique ID
            {
                Return (Zero)
            }

            Name (_CID, EisaId ("PNP0F13"))  // _CID: Compatible ID
            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
            {
                IRQ (Edge, ActiveHigh, Exclusive, )
                    {12}
            })
            Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
            {
                StartDependentFn (0x00, 0x00)
                {
                    IRQNoFlags ()
                        {12}
                }
                EndDependentFn ()
            })
        }
    }

This should be PS2K. K stands for Keyboard, where M for Mouse. Anyway, you can ensure it by using IORegistryExplorer app.
 
Joined
Apr 7, 2014
Messages
4
Motherboard
Toshiba PT10FG DSC MB Rev 2.1 (Clover)
CPU
i5-3230M
Graphics
HD 4000 + GT 710M (1366x768)
Mobile Phone
  1. Android
Hi, i can't get my brightness Key working, in console i see:

fn + F2 = Brightness Low
fn + F3 = Brightness High


When Press fn + F2 = ACPIDebug: EC _Q0B enter
When Release fn + F2 = ACPIDebug: EC _Q2B enter
When Press fn + F3 = ACPIDebug: EC _Q0C enter
When Release fn + F3 = ACPIDebug: EC _Q2C enter

How can i fix It in DSDT, i'm a bit confusing because the event when i release the Key didn't exit but generate another enter event as you can see...
 
Joined
May 11, 2015
Messages
262
Motherboard
Dell 7348-Clover
CPU
i7-5500U
Graphics
HD 5500
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
Hi, i can't get my brightness Key working, in console i see:

fn + F2 = Brightness Low
fn + F3 = Brightness High


When Press fn + F2 = ACPIDebug: EC _Q0B enter
When Release fn + F2 = ACPIDebug: EC _Q2B enter
When Press fn + F3 = ACPIDebug: EC _Q0C enter
When Release fn + F3 = ACPIDebug: EC _Q2C enter

How can i fix It in DSDT, i'm a bit confusing because the event when i release the Key didn't exit but generate another enter event as you can see...

Use only _Q0B and _Q0C

If using hotpatch, rename to XQ0B and XQ0C and implement the brightness code.
If not using hotpatch, remove body code for these methods and implement the brightness code.
 
Joined
Apr 7, 2014
Messages
4
Motherboard
Toshiba PT10FG DSC MB Rev 2.1 (Clover)
CPU
i5-3230M
Graphics
HD 4000 + GT 710M (1366x768)
Mobile Phone
  1. Android
Use only _Q0B and _Q0C

If using hotpatch, rename to XQ0B and XQ0C and implement the brightness code.
If not using hotpatch, remove body code for these methods and implement the brightness code.
Using Only _Q0B for Brightness down and _Q0C for Brightness up It works Only for the First click...

Then nothing, the keys didn't response more...

For the hotpatch i don't know how to Do It, i know how to rename the keys but i don't know how to implement Brightness code, can you explain me how to Do It?...

Thanks a lot
 
Top