Contribute
Register

[Guide] Laptop backlight control using AppleBacklightFixup.kext

thats fine you guys keep FN with EDID which absolutely isnt the right way to go about this when SSDT-PNLF and injector work for profile switching. i have posted more than enough data for this thread already showing different profiles without messing with EDID

Nobody is FN with EDID. Believe me I tried everything. Only way for me is to inject EDID. I tried to change _UID as you said with 0xA,0xF,0xB ,0xC they didn't solve my problem. My UID *IS* 10(0xA). Since it is Intel HD3000. The method I proposed worked on 2 configuration(Intel HD3000 and Intel HD4000). I am not trying to look down on your solution but when your solution works on your config(Intel HD4400) it doesn't mean that it works for everyone.
 
I use the graphics_Rename-GFX0.txt patch to rename GFX0 -> IGPU in DSDT. but it still has not brightness control and slider.

Your ioreg still shows GFX0.
You did not provide patchmatic output as per "Problem Reporting".
Strange that you're still booting from USB (as per your Clover bootlog extracted from ioreg).
 
@RehabMan me and @tmbt attached the files. Here is his file https://www.tonymacx86.com/threads/...ightinjector-kext.218222/page-24#post-1474617 I am attaching 2 more again. One with only with T patch and other with P and T patch. Only thing different between working and nonworking one is extra P patch. When P patch is there it selects P profile which is wrong. The reason I suspect is in the AppleBacklight binary first comparison succeeds and it doesn't select correct values. But again one more time, EDID patch,your kext, SSDT-PNLF.aml and SINGLE T kext patch fixes the problem. Please instead of speculating, just check the files and see yourself that only difference between two configuration is P patch. I also paste you diff result between two folders

Code:
MacBook-Pro:report3 mustafa$ diff -r nonworking1 working1 -x .DS_Store
diff -r -x .DS_Store nonworking1/CLOVER/config.plist working1/CLOVER/config.plist
276c276
<                <false/>
---
>                <true/>
Binary files nonworking1/MacBook Pro.ioreg and working1/MacBook Pro.ioreg differ
I really don't know what else I can do to convince you.

Thanks for the complete data (finally) to support your claim.
I will try to reproduce here (still prepping my [Kaby Lake] test system, and will probably go skiing for a bit before I can complete it)...

Test for you to try:
- with nonworking1 as a base...
- remove the matching F10Pxxxx profile from AppleBacklightInjector.kext Info.plist
- make sure you install the changed kext properly and rebuild cache
- reboot
- report result (and collect ioreg and attach)

Note that so far, your procedure/success is simply my original patch/kext/SSDT/etc + change to display-id in EDID...

BTW, easier way to modify the display-id in EDID:
- config.plist/Graphics/Inject/EDID/Inject=true
- config.plist/Graphics/Inject/EDID/ProductID=desired-product-id

You can specify ProductID either as a string (0xHHHH) or as a number (in Xcode you can type 0x prefix and it will do hex->decimal conversion for you).
 
Last edited:
thanks guide,I do as the guide and make success,but it too dark for me(hd530),so I going to change the PWM Max setting in ssdt-config.aml,as you write "LMAX indicates max for IGPU PWM backlight. Ones: Use default, other values must match framebuffer",I wander where to find my match framebuffer?
 

Attachments

  • crackself'sMacBook Pro.ioreg.zip
    700 KB · Views: 82
thanks guide,I do as the guide and make success,but it too dark for me(hd530),so I going to change the PWM Max setting in ssdt-config.aml,as you write "LMAX indicates max for IGPU PWM backlight. Ones: Use default, other values must match framebuffer",I wander where to find my match framebuffer?

It is P vs. T profile problem. Stay tuned.
 
Code:
kextstat|grep -y acpiplat
   13    2 0xffffff7f82a20000 0x66000    0x66000    com.apple.driver.AppleACPIPlatform (5.0) 65E05472-6AE7-3308-8CC8-FA6CB0DB2AEE <12 11 7 6 5 4 3 1>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y appleintelcpu
   25    0 0xffffff7f82630000 0x2b000    0x2b000    com.apple.driver.AppleIntelCPUPowerManagement (219.0.0) C2841490-D1F6-30D4-AC81-48D63A8FA04C <7 6 5 4 3 1>
   34    0 0xffffff7f8262b000 0x3000     0x3000     com.apple.driver.AppleIntelCPUPowerManagementClient (219.0.0) B802638B-251C-3602-BA8C-001F87228765 <7 6 5 4 3 1>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y applelpc
  107    0 0xffffff7f82304000 0x3000     0x3000     com.apple.driver.AppleLPC (3.1) F51595F0-F9B1-3B85-A1C3-F984DAD4107E <92 12 5 4 3>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y applehda
  101    1 0xffffff7f826d5000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (279.48) ED51F180-19C8-3DE1-AF81-0E389D98ADDE <100 99 83 12 7 6 5 4 3 1>
  124    0 0xffffff7f82857000 0xb5000    0xb5000    com.apple.driver.AppleHDA (279.48) 806B8C17-50CA-3C6B-90B3-195F38D8FB89 <123 102 101 100 99 83 6 5 4 3 1>
Hi Rehabman,
here is what i did.
Deleted the project folder and use the git command again to obtain an updated version of your repository and i followed the instruction on post #1.

Injected the modded EDID as suggested
I used the new all in one patch, copied the kext in S/L/E and copied the AML in Clover/Patched.
Reboot
Rebuild cache
Reboot

Brightness levels were adjustable but dark as before

Then the only thing i changed was to disable your all-in-one patch (change %04x to xxxx for AppleBacklightInjector.kext (credit RehabMan)) and used the old one (the one who change the T profile) and now I have brightness levels correct again.

I'm attaching all files here :

Code:
kextstat|grep -y acpiplat
   13    2 0xffffff7f82a20000 0x66000    0x66000    com.apple.driver.AppleACPIPlatform (5.0) 65E05472-6AE7-3308-8CC8-FA6CB0DB2AEE <12 11 7 6 5 4 3 1>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y appleintelcpu
   25    0 0xffffff7f82630000 0x2b000    0x2b000    com.apple.driver.AppleIntelCPUPowerManagement (219.0.0) C2841490-D1F6-30D4-AC81-48D63A8FA04C <7 6 5 4 3 1>
   34    0 0xffffff7f8262b000 0x3000     0x3000     com.apple.driver.AppleIntelCPUPowerManagementClient (219.0.0) B802638B-251C-3602-BA8C-001F87228765 <7 6 5 4 3 1>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y applelpc
  107    0 0xffffff7f82304000 0x3000     0x3000     com.apple.driver.AppleLPC (3.1) F51595F0-F9B1-3B85-A1C3-F984DAD4107E <92 12 5 4 3>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y applehda
  101    1 0xffffff7f826d5000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (279.48) ED51F180-19C8-3DE1-AF81-0E389D98ADDE <100 99 83 12 7 6 5 4 3 1>
  124    0 0xffffff7f82857000 0xb5000    0xb5000    com.apple.driver.AppleHDA (279.48) 806B8C17-50CA-3C6B-90B3-195F38D8FB89 <123 102 101 100 99 83 6 5 4 3 1>

Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /
Password:
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext toledaARPT.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext Lilu.kext
kext file:///System/Library/Extensions/AtherosL1cEthernet.kext/ is in hash exception list, allowing to load
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AppleBacklightInjector.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
KernelCache ID: EE86E753BD01FC04E34A7D2EF322DA98
 

Attachments

  • CLOVER.zip
    1.9 MB · Views: 90
  • Mattia’s MacBook Pro.zip
    527.8 KB · Views: 79
  • rehabman.zip
    39.9 KB · Views: 76
Code:
kextstat|grep -y acpiplat
   13    2 0xffffff7f82a20000 0x66000    0x66000    com.apple.driver.AppleACPIPlatform (5.0) 65E05472-6AE7-3308-8CC8-FA6CB0DB2AEE <12 11 7 6 5 4 3 1>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y appleintelcpu
   25    0 0xffffff7f82630000 0x2b000    0x2b000    com.apple.driver.AppleIntelCPUPowerManagement (219.0.0) C2841490-D1F6-30D4-AC81-48D63A8FA04C <7 6 5 4 3 1>
   34    0 0xffffff7f8262b000 0x3000     0x3000     com.apple.driver.AppleIntelCPUPowerManagementClient (219.0.0) B802638B-251C-3602-BA8C-001F87228765 <7 6 5 4 3 1>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y applelpc
  107    0 0xffffff7f82304000 0x3000     0x3000     com.apple.driver.AppleLPC (3.1) F51595F0-F9B1-3B85-A1C3-F984DAD4107E <92 12 5 4 3>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y applehda
  101    1 0xffffff7f826d5000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (279.48) ED51F180-19C8-3DE1-AF81-0E389D98ADDE <100 99 83 12 7 6 5 4 3 1>
  124    0 0xffffff7f82857000 0xb5000    0xb5000    com.apple.driver.AppleHDA (279.48) 806B8C17-50CA-3C6B-90B3-195F38D8FB89 <123 102 101 100 99 83 6 5 4 3 1>
Hi Rehabman,
here is what i did.
Deleted the project folder and use the git command again to obtain an updated version of your repository and i followed the instruction on post #1.

Injected the modded EDID as suggested
I used the new all in one patch, copied the kext in S/L/E and copied the AML in Clover/Patched.
Reboot
Rebuild cache
Reboot

Brightness levels were adjustable but dark as before

Then the only thing i changed was to disable your all-in-one patch (change %04x to xxxx for AppleBacklightInjector.kext (credit RehabMan)) and used the old one (the one who change the T profile) and now I have brightness levels correct again.

I'm attaching all files here :

Code:
kextstat|grep -y acpiplat
   13    2 0xffffff7f82a20000 0x66000    0x66000    com.apple.driver.AppleACPIPlatform (5.0) 65E05472-6AE7-3308-8CC8-FA6CB0DB2AEE <12 11 7 6 5 4 3 1>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y appleintelcpu
   25    0 0xffffff7f82630000 0x2b000    0x2b000    com.apple.driver.AppleIntelCPUPowerManagement (219.0.0) C2841490-D1F6-30D4-AC81-48D63A8FA04C <7 6 5 4 3 1>
   34    0 0xffffff7f8262b000 0x3000     0x3000     com.apple.driver.AppleIntelCPUPowerManagementClient (219.0.0) B802638B-251C-3602-BA8C-001F87228765 <7 6 5 4 3 1>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y applelpc
  107    0 0xffffff7f82304000 0x3000     0x3000     com.apple.driver.AppleLPC (3.1) F51595F0-F9B1-3B85-A1C3-F984DAD4107E <92 12 5 4 3>
Mattias-MacBook-Pro:Downloads mattia$ kextstat|grep -y applehda
  101    1 0xffffff7f826d5000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (279.48) ED51F180-19C8-3DE1-AF81-0E389D98ADDE <100 99 83 12 7 6 5 4 3 1>
  124    0 0xffffff7f82857000 0xb5000    0xb5000    com.apple.driver.AppleHDA (279.48) 806B8C17-50CA-3C6B-90B3-195F38D8FB89 <123 102 101 100 99 83 6 5 4 3 1>

Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /
Password:
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext toledaARPT.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext Lilu.kext
kext file:///System/Library/Extensions/AtherosL1cEthernet.kext/ is in hash exception list, allowing to load
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AppleBacklightInjector.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
KernelCache ID: EE86E753BD01FC04E34A7D2EF322DA98

Try with the generic patch, but matching "P profile" removed from AppleBacklightInjector.kext.
 
It is P vs. T profile problem. Stay tuned.
is that mean I need to test whici one can work for me? And I don't understan what isFxxPxxxx (P profile) or T profile,can I find it in ssdt.aml or clover config file(config.plist)? sorry for ask such stupid question.

EDIT:wonderfull guide,I find that p file in the kext,after remove it and reboo,it work.
 
Last edited:
Try with the generic patch, but matching "P profile" removed from AppleBacklightInjector.kext.
Here is what i did:
removed from the plisti in kext injector the profile i found was working in my ioreg (it was F10Txxxx).
Disable the patch i was using in clover and enabled your all-in-one patch.
At reboot i have the brightness problem and in ioreg i see i'm using F10Pxxxx
 
Here is 2 more set. I removed P profile from Kext and installed it.

First Set
======
Fixed EDID
First restart --> Default Profile
Fix kextcache second restart --> T Profile

Second Set
=======
Changed EDID back to original
Profile --> T Profile but brightness controls doesn't have any effect on brightness.

I think for successful brightness, EDID or productId must be changed and P profile must be removed. That is my conclusion.
 

Attachments

  • Archive.zip
    6.3 MB · Views: 95
Back
Top