Native Brightness working without 'blinkscreen' using patched AppleBacklight.kext

Discussion in 'HP ProBook - Mavericks' started by RehabMan, Jan 5, 2014.

  1. TashDev

    TashDev

    Joined:
    Mar 26, 2015
    Messages:
    7
    Mobo:
    HP Pavilion 15, OS X 10.10
    CPU:
    Intel i5-4288U
    Graphics:
    Intel HD 5100 Iris
    Aug 29, 2015 at 3:44 PM #251
    TashDev

    TashDev

    Joined:
    Mar 26, 2015
    Messages:
    7
    Mobo:
    HP Pavilion 15, OS X 10.10
    CPU:
    Intel i5-4288U
    Graphics:
    Intel HD 5100 Iris
    Maybe you're right I will check my SortedOrder and reimplement ACPIBacklight to see what happens.
    I have native UEFI NVRAM but I also tried with EmuVariable and still the same results. Following Pokenguyen's guide I installed RC Scripts. All was working fine with the NVRAM being saved (older version of CLOVER) before I updated my CLOVER version.
    Please see attached.
    Please see attached.

    View attachment Patchmatic Results.zip
    View attachment TashDev MacBook Pro.ioreg
     
  2. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,038
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Aug 29, 2015 at 3:51 PM #252
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,038
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Not only SortedOrder, but also that your files are patched from a recent native extract. Any BIOS change, BIOS update, hardware change can cause the native ACPI files to change... hence, re-extract/re-patch required.

    No problem with latest Clover here. I'm using v3262 built from source.

    Your problem may stem from using OsxAptioFix2Drv-64.efi instead of OsxAptioFixDrv-64.efi.

    Wrong PNLF patch for using ACPIBacklight.kext (Note: correct patch can be used both for AppleBacklight and ACPIBacklight as it is a superset).

    And no injector for using AppleBacklight.kext.

    For a while, ACPIBacklight.kext was not working in 10.11. I published some information for using AppleBacklight.kext (with injector) including the proper data for Haswell. See here: http://www.tonymacx86.com/el-capitan-laptop-support/167963-backlight-control.html

    But ACPIBacklight.kext (with correct DSDT patch) is the recommended method.
     
  3. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,038
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Sep 3, 2015 at 6:07 PM #253
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,038
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Please note I'm going to be making some changes to this patch that will probably impact you...

    This setting of PCHL has been shown to cause a problem when you boot with the lid closed. Details here: https://github.com/RehabMan/OS-X-ACPI-Backlight/issues/8

    Diffs to the patch coming:
    Code (Text):

    Speedy-OSX:laptop.git RehabMan$ git diff
    diff --git a/graphics/graphics_PNLF_ivy_sandy.txt b/graphics/graphics_PNLF_ivy_sandy.txt
    index 523910b..cd56a62 100644
    --- a/graphics/graphics_PNLF_ivy_sandy.txt
    +++ b/graphics/graphics_PNLF_ivy_sandy.txt
    @@ -65,12 +65,15 @@ Device (PNLF)\n
         // KMAX: defines the unscaled range in the _BCL table below\n
         Name (KMAX, 0x710)\n
         // KPCH: saved value for PCHL\n
    -    Name(KPCH, 0)\n
    +    //   use Ones if PCHL does not need to be set (normal)\n
    +    //   use Zero if your laptop nees PCHL set on every brightness set\n
    +    //   you can also use a custom value (not Ones, not Zero)\n
    +    Name(KPCH, Ones)\n
         // _INI deals with differences between native setting and desired\n
         Method (_INI, 0, NotSerialized)\n
         {\n
             // save value of PCHL for later\n
    -        Store(PCHL, KPCH)\n
    +        If (LNot(KPCH)) { Store(PCHL, KPCH) }\n
             // determine LMAX to use\n
             If (LNot(LMAX)) { Store(ShiftRight(LEVX,16), LMAX) }\n
             If (LNot(LMAX)) { Store(KMAX, LMAX) }\n
    @@ -110,7 +113,7 @@ Device (PNLF)\n
         Method (_BCM, 1, NotSerialized)\n
         {\n
             // initialize for consistent backlight level before/after sleep\n
    -        If (LNotEqual(PCHL, KPCH)) { Store(KPCH, PCHL) }\n
    +        If (LAnd(LNotEqual(KPCH, Ones),LNotEqual(PCHL, KPCH))) { Store(KPCH, PCHL) }\n
             If (LNotEqual(LEVW, 0x80000000)) { Store (0x80000000, LEVW) }\n
             If (LNotEqual(LEVX, KLVX)) { Store (KLVX, LEVX) }\n
             // store new backlight level\n
    @@ -136,7 +139,7 @@ Device (PNLF)\n
         Method (XBCM, 1, NotSerialized)\n
         {\n
             // initialize for consistent backlight level before/after sleep\n
    -        If (LNotEqual(PCHL, KPCH)) { Store(KPCH, PCHL) }\n
    +        If (LAnd(LNotEqual(KPCH, Ones),LNotEqual(PCHL, KPCH))) { Store(KPCH, PCHL) }\n
             If (LNotEqual(LEVW, 0x80000000)) { Store (0x80000000, LEVW) }\n
             If (LNotEqual(LEVX, KLVX)) { Store (KLVX, LEVX) }\n
             // store new backlight level\n
     
    So, by default KPCH will be Ones (-1), and so will not write on every _BCM/XBCM call. The same is already implemented in the IntelBacklightHandler.

    You can set it to Zero and it will revert to the old behavior.

    Advanced users can also set KPCH to a fixed value (other than -1), and _BCM/XBCM (and IntelBacklightHandler) will write it on each brightness set. Requires using ACPIDebug to determine the normal value. Using this technique will help someone with both issues fix them.
     
  4. locomacg6

    locomacg6

    Joined:
    Nov 17, 2010
    Messages:
    43
    Mobo:
    Pavilion 17 e040us (10.11.1)
    CPU:
    2.40 GHz Intel Core i3
    Graphics:
    Intel HD Graphics 4600 1536 MB
    Oct 1, 2015 at 8:09 PM #254
    locomacg6

    locomacg6

    Joined:
    Nov 17, 2010
    Messages:
    43
    Mobo:
    Pavilion 17 e040us (10.11.1)
    CPU:
    2.40 GHz Intel Core i3
    Graphics:
    Intel HD Graphics 4600 1536 MB
    Is this still working for el capitan. Thank you and have a nice day :)
     
  5. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,038
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Oct 1, 2015 at 8:22 PM #255
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,038
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
  6. ben9923

    ben9923

    Joined:
    Apr 21, 2016
    Messages:
    522
    Mobo:
    ASUS X556UA (Clover)
    CPU:
    i5-6200U
    Graphics:
    Intel HD 520, 15.6" 1366x768
    Mobile Phone:
    iOS
    Mar 28, 2017 at 9:13 PM #256
    ben9923

    ben9923

    Joined:
    Apr 21, 2016
    Messages:
    522
    Mobo:
    ASUS X556UA (Clover)
    CPU:
    i5-6200U
    Graphics:
    Intel HD 520, 15.6" 1366x768
    Mobile Phone:
    iOS
    Hi @RehabMan
    It seems that to make brightness control work (with preferences slider and keys) is to use an AppleBacklight.kext injector (or patching the kext itself)

    How can I edit the 4x40s plist to make it fit my display and newer hardware (like skylake)?
    Is the only thing I should do is edit the plist file and create an injector, or I also need an ACPI patch (or another SSDT)?

    Thank you!
     
  7. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,038
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Mar 28, 2017 at 10:42 PM #257
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,038
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    The PWMMax value is determined by the data associated with your ig-platform-id. Look in the kext binary for these values.
    Once you determine the PWMMax value, you can look for "example" data in native AppleBacklight Info.plist.
    That will also help you configure SSDT-PNLF.dsl and SSDT-Config.dsl to set PWMMax correctly at boot (see my ACPI hotpatch guide/repo).
     
    ben9923 likes this.

Share This Page