Contribute
Register

[Guide] Patching DSDT/SSDT for LAPTOP backlight control

Your _BCM, _BQC, _BCL methods are in SSDT-5-SaSsdt.aml.
They are at _SB.PCI0.GFX0.DD1F, not DD02.
You most modify the patch (or the patched code) accordingly to use External and to match your DD1F path.

This is the modified (after applying the patch) PNLF._BCM as an example:
Code:
                        // _BCM/_BQC: set/get for brightness level
                        Method (_BCM, 1, NotSerialized)
                        {
                            // Update backlight via existing DSDT methods
                            External(^^DD1F._BCM, MethodObj)
                            ^^DD1F._BCM(Arg0)
                        }

Following that example, here is the complete set:
Code:
                        // _BCM/_BQC: set/get for brightness level
                        Method (_BCM, 1, NotSerialized)
                        {
                            // Update backlight via existing DSDT methods
                            External(^^DD1F._BCM, MethodObj)
                            ^^DD1F._BCM(Arg0)
                        }
                        Method (_BQC, 0, NotSerialized)
                        {
                            External(^^DD1F._BQC, MethodObj)
                            Return(^^DD1F._BQC())
                        }
                        Method (_BCL, 0, NotSerialized)
                        {
                            External(^^DD1F._BCL, MethodObj)
                            Return(^^DD1F._BCL())
                        }
                        Method (_DOS, 1, NotSerialized)
                        {
                            External(^^_DOS, MethodObj)
                            ^^_DOS(Arg0)
                        }
                        // extended _BCM/_BQC for setting "in between" levels
                        Method (XBCM, 1, NotSerialized)
                        {
                            // Update backlight via existing DSDT methods
                            ^^DD1F._BCM(Arg0)
                        }
                        Method (XBQC, 0, NotSerialized)
                        {
                            Return(^^DD1F._BQC())
                        }




ok thanks I did this to the patch idk if I'm doing something wrong but the theres no option to apply the patch to SSDT-5-SaSsdt


#Maintained by: RehabMan for: Laptop Patches

#graphics_PNLF-ACPI100.txt



# This patch enables the brightness slider in SysPrefs->Displays

# and will also enable activation of sleep mode by closing

# the laptop lid.

#

# This patch works well for laptops that have working

# ACPI methods with 64-or more levels (100 is common)

# for good support for Windows 2012 (Windows 8)

#

# Based on information from the normal laptop DSDT methods,

# optimized for use with ACPIBacklight.kext

#

# Note: This patch should be applied to the DSDT or SSDT that defines

# your integrated graphics device (always at _ADR 0x00020000)

# applied to one of the SSDTs, not DSDT.

#

# Note: Intended to be used with Windows 2012, so this should be done...

# if you previously patched for Windows 2006, undo that patch!



# sometimes in Scope (_SB.PCI0)

into method label _INI parent_label _SB.PCI0 code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched

begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;



# sometimes in Scope (_SB)

into method label _INI parent_label _SB code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched

begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;





into_all device label PNLF remove_entry;

into device name_adr 0x00020000 insert

begin

Device (PNLF)\n

{\n

// normal PNLF declares (note some of this probably not necessary)\n

Name (_ADR, Zero)\n

Name (_HID, EisaId ("APP0002"))\n

Name (_CID, "backlight")\n

Name (_UID, 10)\n

Name (_STA, 0x0B)\n

// _BCM/_BQC: set/get for brightness level\n

Method (_BCM, 1, NotSerialized)\n

{\n

// Update backlight via existing DSDT methods\n

^^DD1F._BCM(Arg0)\n

}\n

Method (_BQC, 0, NotSerialized)\n

{\n

Return(^^DD1F._BQC())\n

}\n

Method (_BCL, 0, NotSerialized)\n

{\n

Return(^^DD1F._BCL())\n

}\n

Method (_DOS, 1, NotSerialized)\n

{\n

^^_DOS(Arg0)\n

}\n

// extended _BCM/_BQC for setting "in between" levels\n

Method (XBCM, 1, NotSerialized)\n

{\n

// Update backlight via existing DSDT methods\n

^^DD1F._BCM(Arg0)\n

}\n

Method (XBQC, 0, NotSerialized)\n

{\n

Return(^^DD1F._BQC())\n

}\n

// Use XOPT=1 to disable smooth transitions\n

Name (XOPT, Zero)\n

// XRGL/XRGH: defines the valid range\n

Method (XRGL, 0, NotSerialized)\n

{\n

Store(_BCL(), Local0)\n

Store(DerefOf(Index(Local0, 2)), Local0)\n

Return(Local0)\n

}\n

Method (XRGH, 0, NotSerialized)\n

{\n

Store(_BCL(), Local0)\n

Store(DerefOf(Index(Local0, Subtract(SizeOf(Local0), 1))), Local0)\n

Return(Local0)\n

}\n

}\n

end;
 
ok thanks I did this to the patch idk if I'm doing something wrong but the theres no option to apply the patch to SSDT-5-SaSsdt


#Maintained by: RehabMan for: Laptop Patches

#graphics_PNLF-ACPI100.txt



# This patch enables the brightness slider in SysPrefs->Displays

# and will also enable activation of sleep mode by closing

# the laptop lid.

#

# This patch works well for laptops that have working

# ACPI methods with 64-or more levels (100 is common)

# for good support for Windows 2012 (Windows 8)

#

# Based on information from the normal laptop DSDT methods,

# optimized for use with ACPIBacklight.kext

#

# Note: This patch should be applied to the DSDT or SSDT that defines

# your integrated graphics device (always at _ADR 0x00020000)

# applied to one of the SSDTs, not DSDT.

#

# Note: Intended to be used with Windows 2012, so this should be done...

# if you previously patched for Windows 2006, undo that patch!



# sometimes in Scope (_SB.PCI0)

into method label _INI parent_label _SB.PCI0 code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched

begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;



# sometimes in Scope (_SB)

into method label _INI parent_label _SB code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched

begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;





into_all device label PNLF remove_entry;

into device name_adr 0x00020000 insert

begin

Device (PNLF)\n

{\n

// normal PNLF declares (note some of this probably not necessary)\n

Name (_ADR, Zero)\n

Name (_HID, EisaId ("APP0002"))\n

Name (_CID, "backlight")\n

Name (_UID, 10)\n

Name (_STA, 0x0B)\n

// _BCM/_BQC: set/get for brightness level\n

Method (_BCM, 1, NotSerialized)\n

{\n

// Update backlight via existing DSDT methods\n

^^DD1F._BCM(Arg0)\n

}\n

Method (_BQC, 0, NotSerialized)\n

{\n

Return(^^DD1F._BQC())\n

}\n

Method (_BCL, 0, NotSerialized)\n

{\n

Return(^^DD1F._BCL())\n

}\n

Method (_DOS, 1, NotSerialized)\n

{\n

^^_DOS(Arg0)\n

}\n

// extended _BCM/_BQC for setting "in between" levels\n

Method (XBCM, 1, NotSerialized)\n

{\n

// Update backlight via existing DSDT methods\n

^^DD1F._BCM(Arg0)\n

}\n

Method (XBQC, 0, NotSerialized)\n

{\n

Return(^^DD1F._BQC())\n

}\n

// Use XOPT=1 to disable smooth transitions\n

Name (XOPT, Zero)\n

// XRGL/XRGH: defines the valid range\n

Method (XRGL, 0, NotSerialized)\n

{\n

Store(_BCL(), Local0)\n

Store(DerefOf(Index(Local0, 2)), Local0)\n

Return(Local0)\n

}\n

Method (XRGH, 0, NotSerialized)\n

{\n

Store(_BCL(), Local0)\n

Store(DerefOf(Index(Local0, Subtract(SizeOf(Local0), 1))), Local0)\n

Return(Local0)\n

}\n

}\n

end;

The patch should be applied to DSDT.
Then the resulting code modified.
Read post #1357. Carefully.
 
The patch should be applied to DSDT.
Then the resulting code modified.
Read post #1357. Carefully.

thanks I got the patch to work and the the patch to work and the Brightness Slider to come up to the not working at all its still can't change the level of Brighness its the same that happen when I tried using the AppleBacklightInjector and the IntelBacklight the only difference was that when I was trying to use AppleBacklightInjector Brightness Slider was able to turn the backlight on and off but the others can't do anything idk what to do :crazy::?:
 

Attachments

  • DSDT.aml
    151.6 KB · Views: 179
thanks I got the patch to work and the the patch to work and the Brightness Slider to come up to the not working at all its still can't change the level of Brighness its the same that happen when I tried using the AppleBacklightInjector and the IntelBacklight the only difference was that when I was trying to use AppleBacklightInjector Brightness Slider was able to turn the backlight on and off but the others can't do anything idk what to do :crazy::?:

"Problem Reporting" files are incomplete.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the tool mentioned in the FAQ, that way it is less likely you'll omit something.
 

Attachments

  • CLOVER.zip
    3 MB · Views: 86
  • MSI’s MacBook Pro.ioreg
    6.1 MB · Views: 210
  • Terminal Saved Output.txt
    3.5 KB · Views: 498
  • Screen Shot 2017-12-13 at 6.06.05 PM.png
    Screen Shot 2017-12-13 at 6.06.05 PM.png
    3.5 MB · Views: 176

ACPIBacklight.kext should NOT be installed to both /S/L/E and /L/E (as shown in your kextcache output).
Install it only to a single location, typically /L/E.

Your kextcache output proves kexts are not installed correctly.
All kexts you need must be installed to the system volume.
Read post #2 of the Clover guide for details:
https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/

Your ACPI configuration is wrong.
Dynamic SSDTs should not be placed in ACPI/patched.
Remove all these dynamic SSDTs:
SSDT-x6_6-HwpLvt.aml
SSDT-x6_5-ApHwp.aml
SSDT-x6_4-Cpu0Hwp.aml
SSDT-x6_3-ApCst.aml
SSDT-x6_2-Cpu0Cst.aml
SSDT-x6_1-ApIst.aml
SSDT-x6_0-Cpu0Ist.aml

Also, no reason for any of the other SSDTs.
All common renames are in config.plist, so you only need the patched SSDTs necessary to disable the Nvidia.
I looked at ACPI/origin, and SSDT-8.aml has _OFF.
There is no associated _INI, so it can just be added to SSDT-8, eg. right before _OFF:
Code:
        Method(_INI) { _OFF() }
        Method (_OFF, 0, Serialized)  // _OFF: Power Off
        {
...
        }

Then only patched DSDT.aml and SSDT-8.aml need to be in ACPI/patched.

No need for any settings in config.plist/DSDT/DropOEM_DSM.
Remove the entire DropOEM_DSM section.

For _OSI fixing, I recommend using _OSI->XOSI, + SSDT_XOSI.aml.
No need for the patches you applied for _OSI in your patched/DSDT.aml.
Also, avoid doing renames to the files you have in ACPI/patched that are already being done in config.plist/ACPI/DSDT/Patches... it is just more diffs to look at when trying to figure out what you're really doing.

No need for SSDT.aml in ACPI/patched. You're already implementing CPU PM with config.plist/ACPI/SSDT/Generate/PluginType=true. Those two solutions are mutually exclusive. Best to use only the PluginType=true method.

Your ioreg shows you're running 10.13.2.
You should not expect to be able to use ACPIBacklight.kext with the brightness slider in SysPrefs->Displays, nor the brightness keys. Those mechanisms don't work with ACPIBacklight.kext (or IntelBacklight.kext) since 10.12.4. You must instead use Brightness by bergdesign, and change brightness through its menu bar control.
 
Last edited:
ACPIBacklight.kext should NOT be installed to both /S/L/E and /L/E (as shown in your kextcache output).
Install it only to a single location, typically /L/E.

Your kextcache output proves kexts are not installed correctly.
All kexts you need must be installed to the system volume.
Read post #2 of the Clover guide for details:
https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/

Your ACPI configuration is wrong.
Dynamic SSDTs should not be placed in ACPI/patched.
Remove all these dynamic SSDTs:
SSDT-x6_6-HwpLvt.aml
SSDT-x6_5-ApHwp.aml
SSDT-x6_4-Cpu0Hwp.aml
SSDT-x6_3-ApCst.aml
SSDT-x6_2-Cpu0Cst.aml
SSDT-x6_1-ApIst.aml
SSDT-x6_0-Cpu0Ist.aml

Also, no reason for any of the other SSDTs.
All common renames are in config.plist, so you only need the patched SSDTs necessary to disable the Nvidia.
I looked at ACPI/origin, and SSDT-8.aml has _OFF.
There is no associated _INI, so it can just be added to SSDT-8, eg. right before _OFF:
Code:
        Method(_INI) { _OFF() }
        Method (_OFF, 0, Serialized)  // _OFF: Power Off
        {
...
        }

Then only patched DSDT.aml and SSDT-8.aml need to be in ACPI/patched.

No need for any settings in config.plist/DSDT/DropOEM_DSM.
Remove the entire DropOEM_DSM section.

For _OSI fixing, I recommend using _OSI->XOSI, + SSDT_XOSI.aml.
No need for the patches you applied for _OSI in your patched/DSDT.aml.
Also, avoid doing renames to the files you have in ACPI/patched that are already being done in config.plist/ACPI/DSDT/Patches... it is just more diffs to look at when trying to figure out what you're really doing.

No need for SSDT.aml in ACPI/patched. You're already implementing CPU PM with config.plist/ACPI/SSDT/Generate/PluginType=true. Those two solutions are mutually exclusive. Best to use only the PluginType=true method.

Your ioreg shows you're running 10.13.2.
You should not expect to be able to use ACPIBacklight.kext with the brightness slider in SysPrefs->Displays, nor the brightness keys. Those mechanisms don't work with ACPIBacklight.kext (or IntelBacklight.kext) since 10.12.4. You must instead use Brightness by bergdesign, and change brightness through its menu bar control.


ok thank but I was told by you on the AppleBacklightInjector thread to use the ACPIBacklight

I and told you that I running high Serbia and that I was told that it wasn't work

here is the post this is the only reason why I even tried it

https://www.tonymacx86.com/threads/...g-applebacklightinjector-kext.218222/page-110

so idk what options do I have with fixing this problem on high Sierra ?
 
ok thank but I was told by you on the AppleBacklightInjector thread to use the ACPIBacklight

I and told you that I running high Serbia and that I was told that it wasn't work

here is the post this is the only reason why I even tried it

https://www.tonymacx86.com/threads/...g-applebacklightinjector-kext.218222/page-110

so idk what options do I have with fixing this problem on high Sierra ?

ACPIBacklight.kext works fine in versions 10.12.3 and prior.
For versions 10.12.4 and later, it also "works" but only with Brightness by bergdesign.
 
ACPIBacklight.kext works fine in versions 10.12.3 and prior.
For versions 10.12.4 and later, it also "works" but only with Brightness by bergdesign.
Ok are there anyways for me to get the backlight working on high sierra with my current set up ?
 
Ok are there anyways for me to get the backlight working on high sierra with my current set up ?

I already answered your question.
again: Use Brightness by bergdesign.

In fact, that was my answer in the other thread (you just ignored the Brightness by berg design part).
(alternative is ACPIBacklight.kext + "Brightness Fix (ACPI 100)" + Brightness by bergdesign)
 
Back
Top