Contribute
Register

[solved] AppleBacklight.kext injector

the-braveknight

Moderator
Joined
Nov 24, 2015
Messages
1,225
Motherboard
Lenovo Legion Y520 (Clover)
CPU
i7-7700HQ
Graphics
HD 630 (1920x1080) + Nvidia GTX 1060
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Hello RehabMan,
I've been trying to create an injector kext for my display, I used your u430 patch_backlight.sh script and created the injector kext and installed, I've also installed SSDT-PNLF, SSDT-Config and set it to 1 (Use AppleBacklight), SSDT-IGPU but I'm still not able to get my backlight control to work, it works well without the injector kext but when I install it I lose the backlight control completely.
I would also like to know how to get the correct data for my display.
Btw, I'm using ig-platform-id 0x0a2e0008 so I don't know if it matters.
Also I used ACPIDebug to know my BIOS-initialized PWMMax and it turns out to be 0x3a903a9
I'm attaching my problem reporting files.
 

Attachments

  • AppleBacklightInjector.kext.zip
    1.2 KB · Views: 633
  • problem reporting.zip
    1.9 MB · Views: 150

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,247
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Hello RehabMan,
I've been trying to create an injector kext for my display, I used your u430 patch_backlight.sh script and created the injector kext and installed, I've also installed SSDT-PNLF, SSDT-Config and set it to 1 (Use AppleBacklight), SSDT-IGPU but I'm still not able to get my backlight control to work, it works well without the injector kext but when I install it I lose the backlight control completely.
I would also like to know how to get the correct data for my display.
Btw, I'm using ig-platform-id 0x0a2e0008 so I don't know if it matters.
Also I used ACPIDebug to know my BIOS-initialized PWMMax and it turns out to be 0x3a903a9
I'm attaching my problem reporting files.

0xa2e0008 assumes PWMMax of 0x56c. (look at the ig-platform-id data in the kext binary)

You will need a Backlight.plist template with that data range.
The Backlight.plist in the u430 repo is coded for 0xa260006 which assumes PWMMax of 0xad9.
Look in AppleBacklight.kext Info.plist for example data you can use...

You will also need to set LMAX in SSDT-Config to 0x56c, because it does not match the assumed default 0xad9.
Don't forget to set HIGH to 1 in SSDT-Config to select ig-platform-id 0xa2e0008 (refer to the code in SSDT_IGPU).

I will probably make some changes to SSDT-PNLF so it has no dependencies on SSDT-IGPU...
 

the-braveknight

Moderator
Joined
Nov 24, 2015
Messages
1,225
Motherboard
Lenovo Legion Y520 (Clover)
CPU
i7-7700HQ
Graphics
HD 630 (1920x1080) + Nvidia GTX 1060
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
0xa2e0008 assumes PWMMax of 0x56c. (look at the ig-platform-id data in the kext binary)

You will need a Backlight.plist template with that data range.
The Backlight.plist in the u430 repo is coded for 0xa260006 which assumes PWMMax of 0xad9.
Look in AppleBacklight.kext Info.plist for example data you can use...

You will also need to set LMAX in SSDT-Config to 0x56c, because it does not match the assumed default 0xad9.
Don't forget to set HIGH to 1 in SSDT-Config to select ig-platform-id 0xa2e0008 (refer to the code in SSDT_IGPU).

I will probably make some changes to SSDT-PNLF so it has no dependencies on SSDT-IGPU...
Cant find any data that uses 0x56c in AppleBackligt Info.plist, can you please provide more details?
My real MacBookPro11,1 uses 0xa2e0008 but its display profile in the Info.plist does not indicate it uses 0x56c.

Here is a photo...
 

Attachments

  • Screen Shot 2017-03-29 at 4.30.11 PM.png
    Screen Shot 2017-03-29 at 4.30.11 PM.png
    14.2 KB · Views: 471

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,247
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Cant find any data that uses 0x56c in AppleBackligt Info.plist, can you please provide more details?

You didn't look very carefully.
F10Ta033
F10Ta034
F15Ta01a
and more...

My real MacBookPro11,1 uses 0xa2e0008 but its display profile in the Info.plist does not indicate it uses 0x56c.
Here is a photo...

Clearly is 0x56c PWMMax.
Don't assume that Apple runs 100% brightness at full PWM duty cycle.
 
Last edited:

the-braveknight

Moderator
Joined
Nov 24, 2015
Messages
1,225
Motherboard
Lenovo Legion Y520 (Clover)
CPU
i7-7700HQ
Graphics
HD 630 (1920x1080) + Nvidia GTX 1060
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Cant seem to get it to work... Can you take a look at my injector kext and see if there is something wrong?
 

Attachments

  • AppleBacklightInjector.kext.zip
    1.2 KB · Views: 130
  • SSDT-Config.dsl
    2.4 KB · Views: 336
  • SSDT-IGPU.dsl
    13.6 KB · Views: 232
  • SSDT-PNLF.dsl
    2.9 KB · Views: 339

the-braveknight

Moderator
Joined
Nov 24, 2015
Messages
1,225
Motherboard
Lenovo Legion Y520 (Clover)
CPU
i7-7700HQ
Graphics
HD 630 (1920x1080) + Nvidia GTX 1060
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Your ACPI/patched has no SSDT-Config. And SSDT-IGPU, SSDT-PNLF are not from my hotpatch files...
Reverted SSDT-IGPU & SSDT-PNLF, added SSDT-Config, nothing changed :(
 

Attachments

  • Problem Reporting.zip
    2 MB · Views: 78
Top