Contribute
Register

[Guide] Laptop backlight control using AppleBacklightFixup.kext

This worked for me. Brightness control with full range of brightness.

With a simple PNLF in DSDT and no injectors/patches, I get brightness control but restricted max brightness.

I remember you saying somewhere else that a custom EDID to match AppleBacklight would fix the brightness range issue. Would you mind elaborating on what that entails. I have some experience patching and overriding EDID.
 
This worked for me. Brightness control with full range of brightness.

With a simple PNLF in DSDT and no injectors/patches, I get brightness control but restricted max brightness.

I remember you saying somewhere else that a custom EDID to match AppleBacklight would fix the brightness range issue. Would you mind elaborating on what that entails. I have some experience patching and overriding EDID.

You need to read post #1.
 
You need to read post #1.

I did read but I didn't think that was all of it. My mistake.

Anyway, here are the results of my experimentation:
- Simple PNLF in DSDT = brightness control - limited range
- SSDT-PNLF = brightness control - full range

I find it interesting that I don't seem to need a "custom EDID", "injector", or "Clover patch".

The only remaining issue is that brightness restore on boot seems broken. Without the brightness key in config.plist, it always boots to max brightness. With it set to 0x0000, it boots to about 80% brightness regardless of nvram. I think clover needs some improvement in this regard (inject value in nvram, instead of override it).

I'm really happy now. Thanks a million RehabMan. I'm always amazed by your capacity to help.
 
- Simple PNLF in DSDT = brightness control - limited range
- SSDT-PNLF = brightness control - full range

You also need the patch for AppleBacklight in your config.plist.
Brightness range will be incorrect without it.

The only remaining issue is that brightness restore on boot seems broken.

Read post #1.
The requirements to implement it correctly are not under debate.
 
I have a few question after reading the guide (a few times) and applying the patches.
I am able to adjust the brightness (slider or keyboard shortcuts) without problem.

however:

1. the brightness does not persist upon reboots (I don't have a ALS0 device in my original dsdt but I've included the hotpatch and I can see the device from the ioreg. I tried adding the _STA method that returns 0 but no difference noticed.

2. It still confuses me about where you get the value of PWMMax (or should i say LMAX?) from. In the guide you mentioned that it should match the framebuffer but i have no idea where should I look at. I have also tried "Adjust 0x0d260007 PWMMax from 0x07a1 to 0x0ad9" for com.apple.driver.AppleIntelFramebufferAzul but still no luck.

3. and is the ig-platform-id hardware specific just like device-id, something already there we just need to fake/inject or is it more like a configuration identifier that used by apple to apply different rules to the hardware? I'm currently using 0xa260006 so does that mean my PWMMax is 0xad9 or do i still need to look up for it?

4. my graphic card works but not perfectly, everything seems fine on mac os 10.12.6 (my current install) (except for a brief moment during boot i get 8 garbled apple logos, second stage?), however when booting installer (for both 10.12 or 10.13), recovery, mac os 10.13, the screen is all garbled and distorted. I have to put the device into sleep and wake up then everything seems fine.


attached is everything I think of related.
 

Attachments

  • Archive.zip
    5.2 MB · Views: 76
Last edited:
I have a few question after reading the guide (a few times) and applying the patches.
I am able to adjust the brightness (slider or keyboard shortcuts) without problem.

however:

1. the brightness does not persist upon reboots (I don't have a ALS0 device in my original dsdt but I've included the hotpatch and I can see the device from the ioreg. I tried adding the _STA method that returns 0 but no difference noticed.

2. It still confuses me about where you get the value of PWMMax (or should i say LMAX?) from. In the guide you mentioned that it should match the framebuffer but i have no idea where should I look at. I have also tried "Adjust 0x0d260007 PWMMax from 0x07a1 to 0x0ad9" for com.apple.driver.AppleIntelFramebufferAzul but still no luck.

3. and is the ig-platform-id hardware specific just like device-id, something already there we just need to fake/inject or is it more like a configuration identifier that used by apple to apply different rules to the hardware? I'm currently using 0xa260006 so does that mean my PWMMax is 0xad9 or do i still need to look up for it?

4. my graphic card works but not perfectly, everything seems fine on mac os 10.12.6 (my current install) (except for a brief moment during boot i get 8 garbled apple logos, second stage?), however when booting installer (for both 10.12 or 10.13), recovery, mac os 10.13, the screen is all garbled and distorted. I have to put the device into sleep and wake up then everything seems fine.

5. some other issues that I haven't get around to look into, such as applealc having different error with/without hotpatch, and issue with sleep: Wake reason: GLAN



attached is everything I think of related.

"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/
 
"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/

I updated the attachment to include patchmatic dump and clover, as well as the terminal output for the certain commands
everything is up to date

I managed to get audio working by using HDEF/HDAU hot-patch, however, my first preference is to inject the properties with clover, however, it fails every time. At this point, I suspect it's more of an applealc issue rather than anything else, but I'll still state it here just for a reference. Both the scenarios listed here are with the up-to-date version of lilu and applealc.

1. repeating message of "alc @ codec entry misses properties, skipping" during boot.
able to boot with appalealc disabled and ioreg shows the info were successfully injected
this sometimes happens when no dsdt patch applied (only clover renaming patches such as gfx0->igpu, hdef etc)
however codec was not recognized by the system

2. boot stuck with message like: "busy timeout[0] 60s, kextd wait(0): 'IGPU', 'IOHDACodecFunction' 'PNLF' 'IOResources'"
note: the exact items listed differs from time to time but seem they all have IOHDACodecFunction among them.
this mostly happens when using hotpatches but excludes audio parts (HDEF/HDAU) or disables via config.dsl

it seems like a dead resource lock to me
 

Attachments

  • Archive.zip
    4.3 MB · Views: 74
Last edited:
I updated the attachment to include patchmatic dump and clover, as well as the terminal output for the certain commands
everything is up to date

I managed to get audio working by using HDEF/HDAU hot-patch, however, my first preference is to inject the properties with clover, however, it fails every time. At this point, I suspect it's more of an applealc issue rather than anything else, but I'll still state it here just for a reference. Both the scenarios listed here are with the up-to-date version of lilu and applealc.

1. repeating message of "alc @ codec entry misses properties, skipping" during boot.
able to boot with appalealc disabled and ioreg shows the info were successfully injected
this sometimes happens when no dsdt patch applied (only clover renaming patches such as gfx0->igpu, hdef etc)
however codec was not recognized by the system

2. boot stuck with message like: "busy timeout[0] 60s, kextd wait(0): 'IGPU', 'IOHDACodecFunction' 'PNLF' 'IOResources'"
note: the exact items listed differs from time to time but seem they all have IOHDACodecFunction among them.
this mostly happens when using hotpatches but excludes audio parts (HDEF/HDAU) or disables via config.dsl

it seems like a dead resource lock to me

"Problem Reporting" files must represent exactly the problem scenario.
You imply you cannot boot, but then you provide ioreg, which contradicts that (you cannot get ioreg without booting).
You will need to clarify your situation and files.
 
"Problem Reporting" files must represent exactly the problem scenario.
You imply you cannot boot, but then you provide ioreg, which contradicts that (you cannot get ioreg without booting).
You will need to clarify your situation and files.

i did managed to get audo working (it boots and everything) by using hotpatch, I was only curious why didn't clover patch work.

However I still have all the questions listed in my original post:
https://www.tonymacx86.com/threads/...ightinjector-kext.218222/page-89#post-1575595
 
i did managed to get audo working (it boots and everything) by using hotpatch, I was only curious why didn't clover patch work.

Not possible to diagnose a scenario when you haven't provided the "Problem Reporting" files for that specific scenario.
Off-topic here anyway.
You should open a separate thread.

However I still have all the questions listed in my original post:
https://www.tonymacx86.com/threads/...ightinjector-kext.218222/page-89#post-1575595

Will address separately.
 
Back
Top