Contribute
Register

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

Joined
May 17, 2013
Messages
8
Mac
Classic Mac
Mobile Phone
Not sure what your question is... The data is right inside the injector's Info.plist.
Ahh figured it out i should be using xcode, i was editing the values with a text editor so the data was showing up as a weird string ,

What do you mean by "cant seem to get the injector kext"?
the script only produced the AppleBacklight.kext and not the AppleBacklightInjector.kext, but im happy using the non injector one

On the other hand, tried experimenting with the values, apparently the macbook panel can go down to ridiculously low values (currently set the minimum at 0x5 havent tried going lower though but im sure it can) the ideal low value for me is 0x10 then i will have to figure out how to fill in the other values manually.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,259
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Ahh figured it out i should be using xcode, i was editing the values with a text editor so the data was showing up as a weird string ,
Not a "weird string"... <data> values are base64 encoded. You should always use a plist editor (such as Xcode).

the script only produced the AppleBacklight.kext and not the AppleBacklightInjector.kext, but im happy using the non injector one
The v2 script generates the Injector (second attachment).

It is best to use an injector. Otherwise, system updates will overwrite your patched AppleBacklight.kext.
 
Joined
Jan 11, 2014
Messages
104
Motherboard
Samsung NP530U3B
CPU
i5-2467M
Graphics
Intel HD 3000
Mac
Classic Mac
Mobile Phone
iOS
Hi RehabMan, do you remember me? The guy with the weird backlight problems... and we finally managed to solve it on Mavericks by using ACPIBacklight to inject a value to a memory register :)

now with El Capitan it doesn't work anymore: I'm using the newest ACPIBacklight (2015-08-13) and the same DSDT and Clover config as I use on Mavericks. Decided to give this new method a try then (yes, I did patch my DSDT with 13_Brightness before running the script), but no success, my maximal brightness is still very low. I then uninstalled ACPIBacklight and kept AppleBacklightInjector, but the only difference is that now I can change the brightness levels, however the max is still the same very low... :(

I believe it's just a matter of injecting that value again and for some reason this is not working anymore. Any tips? Any debug info you'd like me to share? Thanks once again!

edit: small detail I've just noticed... Any reason why you're using BAR1 offset by 4 in relation to what you previously used? My old DSDT has BAR1 defined at 0xE1180 so the values inside Field (BRIT) are also offset by 4 in relation to the new 13_Brightness patch, where BAR1 is defined at 0xE1184.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,259
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi RehabMan, do you remember me? The guy with the weird backlight problems... and we finally managed to solve it on Mavericks by using ACPIBacklight to inject a value to a memory register :)

now with El Capitan it doesn't work anymore: I'm using the newest ACPIBacklight (2015-08-13) and the same DSDT and Clover config as I use on Mavericks. Decided to give this new method a try then (yes, I did patch my DSDT with 13_Brightness before running the script), but no success, my maximal brightness is still very low. I then uninstalled ACPIBacklight and kept AppleBacklightInjector, but the only difference is that now I can change the brightness levels, however the max is still the same very low... :(
Correct patching procedure here: http://www.tonymacx86.com/yosemite-laptop-support/152659-guide-patching-dsdt-ssdt-laptop-backlight-control.html

If you want me to check what you have...

Download patchmatic: https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/RehabMan-patchmatic-2015-0107.zip
Extract the 'patchmatic' binary from the ZIP. Copy it to /usr/bin, such that you have the binary at /usr/bin/patchmatic.

In terminal,
Code:
if [ -d ~/Downloads/RehabMan ]; then rm -R ~/Downloads/RehabMan; fi
mkdir ~/Downloads/RehabMan
cd ~/Downloads/RehabMan
patchmatic -extract
Note: It is easier if you use copy/paste instead of typing the commands manually.

Post contents of Downloads/RehabMan directory (as ZIP).

Also, post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.


edit: small detail I've just noticed... Any reason why you're using BAR1 offset by 4 in relation to what you previously used? My old DSDT has BAR1 defined at 0xE1180 so the values inside Field (BRIT) are also offset by 4 in relation to the new 13_Brightness patch, where BAR1 is defined at 0xE1184.
Low bits are various flags, not part of the address. They are masked with And.
 
Joined
Jan 11, 2014
Messages
104
Motherboard
Samsung NP530U3B
CPU
i5-2467M
Graphics
Intel HD 3000
Mac
Classic Mac
Mobile Phone
iOS
Thank you very much, I've reapplied the PNLF patch for Sandy Bridge and it worked now fine for both Mavericks and El Capitan. Seems there have been some changes to the patch :)
I need to use ACPIBacklight though (nearly obvious). And currently the AppleBacklightInjector is installed together without any problems. Should I remove it?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,259
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Thank you very much, I've reapplied the PNLF patch for Sandy Bridge and it worked now fine for both Mavericks and El Capitan. Seems there have been some changes to the patch :)
I need to use ACPIBacklight though (nearly obvious).
Yes/Yes. And lots of changes to ACPIBacklight.kext, as on 10.11, it doesn't use ACPI to set the backlight. You'll notice IntelBacklightHandler in your IGPU tree in ioreg, which handles backlight for ACPIBacklight.kext instead of _BCM/_BQC.

And currently the AppleBacklightInjector is installed together without any problems. Should I remove it?
AppleBacklightInjector.kext will only be used when ACPIBacklight.kext is not present. It does no harm to keep it, and it is a nice fallback for the case ACPIBacklight.kext does something strange and you want to test with native AppleBacklight.kext.
 
Joined
Mar 26, 2015
Messages
7
Motherboard
HP Pavilion 15, OS X 10.10
CPU
Intel i5-4288U
Graphics
Intel HD 5100 Iris
Mac
Classic Mac
Mobile Phone
I've applied the native patch to my SSDT and AppleBacklight*.kexts are loading. However I have a question, Is the patched AppleBacklight.kext required?

I ask because I have not patched it, yet my screen brightness is changing (also with ACPI brightness buttons). So I'm wondering what the purpose of the patched AppleBacklight.kext is?

I have native CPU Management and AGPM is loading.

My laptop specs:
Make/Model - HP Pavilion 15-p199sa
Graphics - Intel Iris 5100 (ig-platform-id: 0x0a2e000a + InjectEDID both via CLOVER)
Processor: Haswell i5-4288U
RAM: 8GB
OSX: Yosemite 10.10 - Clean install

EDIT: It seems the levels are enabled after waking from sleep and are not available after initial login. I will try the patch AppleBacklight.kext and report back.
 
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,259
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I've applied the native patch to my SSDT and AppleBacklight*.kexts are loading. However I have a question, Is the patched AppleBacklight.kext required?

I ask because I have not patched it, yet my screen brightness is changing (also with ACPI brightness buttons). So I'm wondering what the purpose of the patched AppleBacklight.kext is?

I have native CPU Management and AGPM is loading.

My laptop specs:
Make/Model - HP Pavilion 15-p199sa
Graphics - Intel Iris 5100 (ig-platform-id: 0x0a2e000a + InjectEDID both via CLOVER)
Processor: Haswell i5-4288U
RAM: 8GB
OSX: Yosemite 10.10 - Clean install

EDIT: It seems the levels are enabled after waking from sleep and are not available after initial login. I will try the patch AppleBacklight.kext and report back.
Patched AppleBacklight.kext is not needed, preferred method is a backlight injector kext. It is created by the script.

You will not get the full range of brightness using un-patched AppleBacklight.kext (without injector).

But the best method is to use ACPIBacklight.kext.

There is a guide: http://www.tonymacx86.com/yosemite-laptop-support/152659-guide-patching-dsdt-ssdt-laptop-backlight-control.html
 
Joined
Mar 26, 2015
Messages
7
Motherboard
HP Pavilion 15, OS X 10.10
CPU
Intel i5-4288U
Graphics
Intel HD 5100 Iris
Mac
Classic Mac
Mobile Phone
Patched AppleBacklight.kext is not needed, preferred method is a backlight injector kext. It is created by the script.

You will not get the full range of brightness using un-patched AppleBacklight.kext (without injector).

But the best method is to use ACPIBacklight.kext.

There is a guide: http://www.tonymacx86.com/yosemite-laptop-support/152659-guide-patching-dsdt-ssdt-laptop-backlight-control.html
I've implemented the ACPI Backlight, i tried this method because it made my boot time increase by some 30-40 seconds.

Also I believe CLOVER r3259 shutdown NVRAM is not working correctly so ACPIBacklight level is never saved when shutdown. I have tested NVRAM by setting my own variable 'MyVar=TestForNVRAM' and its persistent after a reboot/shutdown.

I tested the patched/injector AppleBacklight.kext and the brightness range was less than an un-patched AppleBacklight.kext. With an un-patched AppleBacklight.kext I am getting, what seems to be identical, brightness range as my earlier ACPIBacklight implementation.

With the brightness with the native fix and un-patched AppleBacklight.kext, the brightness levels are persistent after reboot/shutdown/sleep.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,259
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I've implemented the ACPI Backlight, i tried this method because it made my boot time increase by some 30-40 seconds.
ACPIBacklight.kext will not increase boot time. Your boot problems are something else (perhaps your patched ACPI files not in sync with native files).

Also I believe CLOVER r3259 shutdown NVRAM is not working correctly so ACPIBacklight level is never saved when shutdown. I have tested NVRAM by setting my own variable 'MyVar=TestForNVRAM' and its persistent after a reboot/shutdown.
If you're using EmuVariable, you need to install "RC scripts" to the boot volume. You can also go without EmuVariable to use native UEFI NVRAM.

I tested the patched/injector AppleBacklight.kext and the brightness range was less than an un-patched AppleBacklight.kext. With an unmatched AppleBacklight.kext I am getting, what seems to be identical, brightness range as my earlier ACPIBacklight implementation.
You probably did something wrong... Keep in mind guide in post #1 is for HD3000/HD4000. Haswell requires different data.

Download patchmatic: https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/RehabMan-patchmatic-2015-0107.zip
Extract the 'patchmatic' binary from the ZIP. Copy it to /usr/bin, such that you have the binary at /usr/bin/patchmatic.

In terminal,
Code:
if [ -d ~/Downloads/RehabMan ]; then rm -R ~/Downloads/RehabMan; fi
mkdir ~/Downloads/RehabMan
cd ~/Downloads/RehabMan
patchmatic -extract
Note: It is easier if you use copy/paste instead of typing the commands manually.

Post contents of Downloads/RehabMan directory (as ZIP).

Also, post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.
 
Top