Contribute
Register

[Guide] Patching DSDT/SSDT for LAPTOP backlight control

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
Also you need to inject a right PNLF device.
Are your hardware information updated?

How can I inject right PNLF device? Can you guide me through, please?

Yes. I've updated my H/W info now.

Thanks.
 
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
RehabMan is no longer actively contributing here.
This is truly sad. I've learnt much from his guides. Wish He comes back!
 

Feartech

Moderator
Joined
Aug 3, 2013
Messages
22,810
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
How can I inject right PNLF device? Can you guide me through, please?

Yes. I've updated my H/W info now.

Thanks.
you seem to be missing lilu.kext in clover/kexts/other

actually, in terminal:
Code:
sudo kextcache -i /
and copy and paste the result here
 
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
you seem to be missing lilu.kext in clover/kexts/other

actually, in terminal:
Code:
sudo kextcache -i /
and copy and paste the result here

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.
 

Attachments

  • kextcache.txt
    3.4 KB · Views: 48

Feartech

Moderator
Joined
Aug 3, 2013
Messages
22,810
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
22,810
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
102
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.
 
Top