Jump to content

Finding the device ID for SSDT-PNLF.aml


aufuk1
 Share

18 posts in this topic

Recommended Posts

Upper function keys on the keyboard do not work. At the address below, he explained how to find it through windows. For laptop with Kablylake processor, it is necessary to use a different SSDT-PNLF.aml file. Or how can i find the device id via macOS so i will try to edit dsdt.

I am working on OC 0.8.3.

 

https://dortania.github.io/Getting-Started-With-ACPI/Laptops/backlight-methods/manual.html#finding-the-acpi-path

 

Elitebook 840 G4 Kaby lake

Link to comment
Share on other sites

for kabylake use it

 

Device (PNLF)
        {
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
            Name (_CID, "backlight")  // _CID: Compatible ID
            Name (_UID, 0x10)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
        }

  • Like 1
Link to comment
Share on other sites

Thanks;

 

When I enter the required values in this section, it gives an error, what can I do?

 

Device (_SB.PCI0.GFX0.PNLF)
    {
        Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
        Name (_CID, "backlight")  // _CID: Compatible ID
        Name (_UID, Zero)  // _UID: Unique ID
        Method (_STA, 0, NotSerialized)  // _STA: Status
        {

 

Attachment

SSDT-PNLF.aml.zip

Link to comment
Share on other sites

Guest 5T33Z0

1. You only need to adjust the ACPI path ot the device and

2. The UID for your CPU family as explained in the comments:

 Name (_CID, "backlight")
                // _UID is set depending on PWMMax to match profiles in WhateverGreen.kext https://github.com/acidanthera/WhateverGreen/blob/1.4.7/WhateverGreen/kern_weg.cpp#L32
                // 14: Sandy/Ivy 0x710
                // 15: Haswell/Broadwell 0xad9
                // 16: Skylake/KabyLake 0x56c (and some Haswell, example 0xa2e0008)
                // 17: custom LMAX=0x7a1
                // 18: custom LMAX=0x1499
                // 19: CoffeeLake 0xffff
                // 99: Other (requires custom profile using WhateverGreen.kext via DeviceProperties applbkl-name and applbkl-data)
                Name (_UID, 0) // <<<--- 14, 15, 16, ect…

PNLF only handles the screen brightness, NOT the shortcuts for changing it!

 

For the Brightness Keys use this: https://github.com/acidanthera/BrightnessKeys

Edited by 5T33Z0
Link to comment
Share on other sites

The _UID is not connected to IGU device-id nor to CPU.

This is ID of screen controller itself found on real MacBooks. If you have exactly same screen controller then use same value.

Else just test different values and see how the brightness changing by keys. 

Different _UIDs uses different brightness curves and so you will see different behaviour.

  • Like 3
Link to comment
Share on other sites

8 hours ago, MaLd0n said:

u don't need merge nothing. u can use this simple patch and done

 

I tried it alone, unfortunately it didn't work.

8 hours ago, 5T33Z0 said:

1. You only need to adjust the ACPI path ot the device and

2. The UID for your CPU family as explained in the comments:

 Name (_CID, "backlight")
                // _UID is set depending on PWMMax to match profiles in WhateverGreen.kext https://github.com/acidanthera/WhateverGreen/blob/1.4.7/WhateverGreen/kern_weg.cpp#L32
                // 14: Sandy/Ivy 0x710
                // 15: Haswell/Broadwell 0xad9
                // 16: Skylake/KabyLake 0x56c (and some Haswell, example 0xa2e0008)
                // 17: custom LMAX=0x7a1
                // 18: custom LMAX=0x1499
                // 19: CoffeeLake 0xffff
                // 99: Other (requires custom profile using WhateverGreen.kext via DeviceProperties applbkl-name and applbkl-data)
                Name (_UID, 0) // <<<--- 14, 15, 16, ect…

PNLF only handles the screen brightness, NOT the shortcuts for changing it!

 

For the Brightness Keys use this: https://github.com/acidanthera/BrightnessKeys

 

Thanks i will try.

1 hour ago, Slice said:

The _UID is not connected to IGU device-id nor to CPU.

This is ID of screen controller itself found on real MacBooks. If you have exactly same screen controller then use same value.

Else just test different values and see how the brightness changing by keys. 

Different _UIDs uses different brightness curves and so you will see different behaviour.

 

I am trying to understand :)

 

HP840 G4 CPU 7600U, UHD 620

Edited by aufuk1
Link to comment
Share on other sites

Guest 5T33Z0

Since _UID refers to specific brightness curves stored inside of WEG you can't just put any number in there! Only 14, 15, 16, 17, 18, 19 and 24 (nor listed in the SSDT) pont to actual existing brightness curves!

Link to comment
Share on other sites

1 hour ago, 5T33Z0 said:

Since _UID refers to specific brightness curves stored inside of WEG you can't just put any number in there! Only 14, 15, 16, 17, 18, 19 and 24 (nor listed in the SSDT) pont to actual existing brightness curves!

 

I'm testing on the attached SSDT-PNLF.aml, I hope I'm on the right track.

 

SSDT-PNLF.aml.zip

Link to comment
Share on other sites

------------------------

 

Yes it worked, it was necessary to press the FN key :)))

 

SSDT-PNLF.aml.zip


            Device (PNLF)
            {
                Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
                Name (_CID, "backlight")  // _CID: Compatible ID
                Name (_UID, 0x10)  // _UID: Unique ID
                Name (_STA, 0x0B)  // _STA: Status
                Field (^RMP3, AnyAcc, NoLock, Preserve)
                {

Edited by aufuk1
Link to comment
Share on other sites

13 hours ago, 5T33Z0 said:

Since _UID refers to specific brightness curves stored inside of WEG you can't just put any number in there! Only 14, 15, 16, 17, 18, 19 and 24 (nor listed in the SSDT) pont to actual existing brightness curves!

Not WEG, they are Apple properties

image.png

First two bytes are the number of steps. Next 16-bit words are brightness steps.

  • Like 1
Link to comment
Share on other sites

Guest 5T33Z0

To quote the text in SSDT-PNLF:

_UID is set depending on PWMMax to match profiles in WhateverGreen.kext https://github.com/acidanthera/WhateverGreen/blob/1.4.7/WhateverGreen/kern_weg.cpp#L32
Link to comment
Share on other sites

On 7/21/2022 at 4:45 PM, 5T33Z0 said:

1. You only need to adjust the ACPI path ot the device and

2. The UID for your CPU family as explained in the comments:

 Name (_CID, "backlight")
                // _UID is set depending on PWMMax to match profiles in WhateverGreen.kext https://github.com/acidanthera/WhateverGreen/blob/1.4.7/WhateverGreen/kern_weg.cpp#L32
                // 14: Sandy/Ivy 0x710
                // 15: Haswell/Broadwell 0xad9
                // 16: Skylake/KabyLake 0x56c (and some Haswell, example 0xa2e0008)
                // 17: custom LMAX=0x7a1
                // 18: custom LMAX=0x1499
                // 19: CoffeeLake 0xffff
                // 99: Other (requires custom profile using WhateverGreen.kext via DeviceProperties applbkl-name and applbkl-data)
                Name (_UID, 0) // <<<--- 14, 15, 16, ect…

PNLF only handles the screen brightness, NOT the shortcuts for changing it!

 

For the Brightness Keys use this: https://github.com/acidanthera/BrightnessKeys

 

@5T33Z0 I have been using Acidanthera's SSDT-PNLF without mods and it has been working for me on my HackBookPro15,2 without any problems.  My ACPI path is as specified in the pre-built SSDT-PNLF (so I don't need to change that, although I agree it should be changed if necessary) and I have never changed _UID.  I'm eager to learn, because your post makes me realize I may have been incorrectly using SSDT-PNLF.  If as you say, we need to manually set _UID, what is the purpose of the following code at the end of SSDT-PNLF?

 

                    // Now Local2 is the new PWMMax, set _UID accordingly
                    // The _UID selects the correct entry in WhateverGreen.kext
                    If (Local2 == SANDYIVY_PWMMAX) { _UID = 14 }
                    ElseIf (Local2 == HASWELL_PWMMAX) { _UID = 15 }
                    ElseIf (Local2 == SKYLAKE_PWMMAX) { _UID = 16 }
                    ElseIf (Local2 == CUSTOM_PWMMAX_07a1) { _UID = 17 }
                    ElseIf (Local2 == CUSTOM_PWMMAX_1499) { _UID = 18 }
                    ElseIf (Local2 == COFFEELAKE_PWMMAX) { _UID = 19 }
                    Else { _UID = 99 } 

 

EDIT: I re-read this thread and think I understand your point now.  It appears that we only need to manually set _UID if we're not using the Acidanthera SSDT-PNLF that sets this for us (with the code above).  Please let me know if I understand correctly.  Thank you.

 

EDIT2: @aufuk1  I'm not sure where you are with your diagnosis of your issue, but the "old style" SSDT-PNLF (not Acidanthera's SSDT-PNLF) did not work for my HackBookPro15,2 (i5-8250u/UHD620 Kabylake R).  I needed to use Acidanthera's SSDT-PNLF for working backlight.

Edited by deeveedee
  • Like 1
Link to comment
Share on other sites

Guest 5T33Z0

@deeveedee From my understanding, you don't have to set the _UID, it's optional. These are just pre-defined brightness curves. You can try using a different curve by changing the _UID in your .aml file for testing, but you have to use the hex equivalents of the numbers. For example: 14 would be 0x0E, 15 = 0x0F, 16=10, etc.

 

The old SSDT is from the Clover era where the "OSI" method didn't need to be implemented since clover injects tables into macOS only. Not recommended when using OpenCore…

Link to comment
Share on other sites

@5T33Z0 On my Kabylake R (i5-8250u / UHD620), Method (_INI) in the unmodified SSDT-PNLF sets _UID to 16 (0x10).  I don't think the dsl cares whether we specify the value as decimal or hex.

 

Spoiler

1141535637_ScreenShot2022-07-23at2_44_57PM.png.dc18b09edda943524980900ab9f1b5e2.png

 

 

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...