RehabMan / OS-X-Intel-Backlight

A backlight control kext replacing AppleBacklight for Intel integrated graphics hardware
Other
64 stars 11 forks source link

10.12.4. PB1 issue #4

Open tluck opened 7 years ago

tluck commented 7 years ago

with IntelBackLight - just keeps display at max level - doesn't change brightness with slider

T420 - SNB HD 3000 T460 - SKL HD 520 - x1916000

same result on either box?

jafd commented 7 years ago

Chiming in with an Ivy Bridge laptop (Thinkpad W530). The slider does not change brightness whatsoever and initially shows it at maximum.

Brightness, though, is not at maximum but at the level I have set it with before upgrade, which is approximately 65%. I can see it being set (very smoothly, by the way) during boot.

So, the kext itself works, it doesn't catch changes from the slider.

Relevant nvram contents at boot:

intel-backlight-level   %c0%01%00%00
backlight-level %ff%ff

If I set the intel-backlight-level variable to anything, it gets reset at reboot (I have real NVRAM).

tluck commented 7 years ago

that seems about right. at start up the brightness ramps up. but then my FN keys and SysPref slider have no effect. you can see the values ramp. but then they stay at 1024/354. this is a reboot and then hit brightness key.

kernel: (IntelBacklight) IntelBacklight: IntelBacklightPanel::probe()
kernel: (IntelBacklight) IntelBacklight: IntelBacklightPanel::start()
kernel: (IntelBacklight) IntelBacklight: Version 1.0.10 starting on OS X Darwin 16.5.
kernel: (IntelBacklight) IntelBacklight: no /chosen/nvram, trying IODTNVRAM
kernel: (IntelBacklight) IntelBacklight: read level from nvram = 1024
kernel: (IntelBacklight) IntelBacklight: loadFromNVRAM returns 1024
kernel: (IntelBacklight) IntelBacklight: Waiting for BacklightHandler
kernel: (IntelBacklight) IntelBacklight: pwmMax!=config.pwmMax, adjusting: pwmMax=354, 
...
kernel: (IntelBacklight) IntelBacklight: IntelBacklightPanel::setBrightnessLevel(1024)
kernel: (IntelBacklight) IntelBacklight: IntelBacklightPanel::setRawBrightnessLevel(), level=354
kernel: (IntelBacklight) IntelBacklight: IntelBacklightPanel::setBrightnessLevel(1024)
kernel: (IntelBacklight) IntelBacklight: IntelBacklightPanel::setRawBrightnessLevel(), level=354
RehabMan commented 7 years ago

If you install "Brightness" by bergdesign, it demonstrates that IntelBacklight.kext is still working.

Problem is the connection between the system and IntelBacklight.kext seems broken (although not broken from "Brightness" by bergdesign).

tluck commented 7 years ago

i see! yes.

codexss commented 7 years ago

so, how to solve this problem?

tluck commented 7 years ago

for me, I remove IntelBacklight.kext and use an alternate method to inject custom panel properties to define the brightness levels - aka AppleBacklightInjector - which BTW was developed by Rehabman several years ago. Thank you!

The result is nearly as good: 1) get full brightness range - but without the smooth transitions. 2) keyboard and sys-pref sliders are working of course.

RehabMan commented 7 years ago

Yes... the old AppleBacklightInjector method works as one would expect.

When I have time, I'd like to see what is wrong with IntelBacklight.kext though as the smooth transitions are nice, and it is, of course, a bit easier to setup.

codexss commented 7 years ago

Try this maybe work for 10.12.4, IntelBacklight-10.12.4.kext.zip from http://bbs.pcbeta.com/forum.php?mod=viewthread&tid=1735701

RehabMan commented 7 years ago

| Try this maybe work for 10.12.4,

No. This modified Info.plist is simply wrong and makes the kext not load at all... (typo in IOPCIFamily version, missing IOACPIFamily dependency)

And since it doesn't load, AppleBacklight.kext does, which works "sort of" OOB, but really requires an injector and specific ACPI patches to work correctly...

krim404 commented 7 years ago

Problem still exists in 10.12.4 release.

slikie commented 7 years ago

I wonder is Lilu is a way of working around.

scottsanett commented 7 years ago

I wonder is Lilu is a way of working around.

Doesn't seem to be working for me. I simply copied those two kexts to Clover kexts folder and nothing changed. I might have done it wrong.

krim404 commented 7 years ago

lilu is just a library for manipulating several things. obviousy has nothing to do with the available kexts. R-L-T-Y just mentioned a fix could be done using lilu.

shawnhwei commented 7 years ago

Does the kext override a system call or something that might've changed in the last update? If so, could we intercept the calls to the original backlight kext?

RehabMan commented 7 years ago

The kext works as a replacement for AppleBacklight.kext (higher IOProbeScore). It is loading/starting/etc. But doIntergerSet is never called with "brightness", although it is called with "commit". No idea why yet, and no real time to look into it. Using an AppleBacklightInjector and appropriate ACPI patches is not difficult.

krim404 commented 7 years ago

The problem with AppleBacklightInjector is, that it's not as smooth as IntelBacklight. For example on my machine with your kext i was able to dim the screen below 1 with CMD+Shift+Brightness. With the ACPI patches this is (as far as i know) not possible.

RehabMan commented 7 years ago

| The problem with AppleBacklightInjector is, that it's not as smooth as IntelBacklight.

Yes. It is one of the reasons I created IntelBacklight.kext.

| For example on my machine with your kext i was able to dim the screen below 1 with CMD+Shift+Brightness.

Yes. It is a bug in AppleBacklight.kext. Or per Apple design (not possible to know which).

gymnae commented 7 years ago

Would be so great to have IntelBacklight back - the 9550 is just way to bright now

RehabMan commented 7 years ago

For now, use AppleBacklight.kext... https://www.tonymacx86.com/threads/guide-laptop-backlight-control-using-applebacklightinjector-kext.218222/

gymnae commented 7 years ago

Yeah, I followed that and brightness keys are working, just it doesn't remains too bright again even on lower settings. This is something Intelbacklight solved nicely in the past

RehabMan commented 7 years ago

It means you made a mistake. Read guide, post # 1, "Problem Reporting". Reply in guide thread.

gymnae commented 7 years ago

I think it's more like what chris also notices, since we have the same notebook. there is a big range, but just that intelbacklight went lower and allowed the display to be darker. there's a bit of range missing. the clover patch, ssdt and injector are in place and working

RehabMan commented 7 years ago

I think you made a mistake. Reply in guide thread with "Problem Reporting" files.

Please note that AppleBacklight.kext does not allow lower levels than the lowest "main" level. I guess because Macs work the same way, we can conclude this is as Apple intended. But note that you can change the data in the Info.plist (AppleBacklightInjector.kext) to set the lowest level to whatever value you want...

krim404 commented 7 years ago

this is exactly what he meant. Lowest main level is still too bright on usage without any ambiant light. the posibility to get even darker than the lowest brightness was really great and we would really love to see a patched intelbacklight kext.

RehabMan commented 7 years ago

You guys are not paying attention. You can change the lowest brightness level to whatever you want... It is a simple edit of the Info.plist. Further discussion is off-topic here.

gymnae commented 7 years ago

Changing the value for low to 0,1 or 10 does not make a difference from the default 40 as the patcher originally produced:

<key>brightness</key>
                <dict>
                    <key>max</key>
                    <integer>255</integer>
                    <key>min</key>
                    <integer>1</integer>
                </dict>

edit: will report on tonymac as well, to keep with the desired norm and with desired files

RehabMan commented 7 years ago

You are not changing the correct part of the Info.plist. You should be looking at the data in FxxTxxxx profiles.

Also, no idea what you mean by "the patcher" ... (I think you haven't read the backlight guide linked above).

scottsanett commented 7 years ago

@RehabMan Could you specify on modifying the FxxTxxxx profiles? Where do I change and how do I change it?

RehabMan commented 7 years ago

Look at the Info.plist data carefully. You will notice that it is an array of 16-bit values (first 16-bit value is the count 0x11), increasing. Each of the 17 entries in the array represent the brightness level for each "major" level (16 levels + black).

scottsanett commented 7 years ago

@RehabMan Yep, tuned the lowest brightness to 0x0A and it worked as expected. With ApplePS2SmartTouchpad I get 4 levels of finer control for each major level. Thanks for your help.

gymnae commented 7 years ago

@scottsanett - I'm not too deep in these kind of things. is this your profile?

<key>F10T143e</key>
                <data>ABEAAAA0AFIAcwCUAL4A+gE2AXIBxQIvArkDYAQaBQoGDgcQ</data>

if it is, how did you "see" 0x11 in there, because I am too dump to translate it into any value represented in these 49 chars. Or is this the wrong place? I wanted to message you directly to not disturb the desired flow on this issue tracker, but can't through github.

krim404 commented 7 years ago

ABEAAAAEAFIAcwCUAL4A+gE2AXIBxQIvArkDYAQaBQoGDgcQ should be first "brighness" to 04 (was 0x32 before)

RehabMan commented 7 years ago

Basic procedures: Use a plist editor (Xcode or PlistEdit Pro), never a text editor when editing plist files.

scottsanett commented 7 years ago

@Gymnae I've attached a screenshot so it's easier to see. This is the info.plist in the AppleBacklightInjector.kext.

screen shot 2017-04-24 at 9 50 41 am
jjzazuet commented 7 years ago

Hi. Looks like macOS 10.12.5 got released today. Maybe it brings any changes to this issue? Thanks!

RehabMan commented 7 years ago

10.12.5 was released May 15. Nothing has changed. IntelBacklight.kext still broken.

jjzazuet commented 7 years ago

@RehabMan ah yes, my apologies. Well, if anybody is interested, in addition to the tools mentioned above, I also found that this tool can also set brightness values via the command line:

https://github.com/nriley/brightness

Installing it via homebrew is sufficient to manually set a brightness value. I added a few notes on my particular Dell Inspiron model guide. Thanks!

RehabMan commented 7 years ago

No need... see guide... https://www.tonymacx86.com/threads/guide-laptop-backlight-control-using-applebacklightinjector-kext.218222/

al3xtjames commented 7 years ago

According to some users on MacRumors, some real Macs are also affected. Rolling back AppleBacklight.kext/AppleBacklightExpert.kext/DisplayServices.framework to the 10.12.3 versions fixes it (just tried with XPS 15 9560 on 10.12.6). Currently reversing the kexts + the framework to see what changed...

Edit: According to /u/Lost_My_Bananas on reddit, DisplayServices.framework doesn't have to be downgraded to the 10.12.3 version (only the AppleBacklight/AppleBacklightExpert kexts do).

RehabMan commented 7 years ago

Probably something to do with night shift that was implemented in 10.12.4 (if I remember correctly). Perhaps some new protocol details for doIntegerSet or doUpdate? Unfortunately, none of this is documented (that I could find).

sonvirgo commented 6 years ago

change the 1st level after the count 0x11, from 00 to 02, completely eliminate the black

RehabMan commented 6 years ago

The black screen at the lowest level is by design (same on real Macs).

gnpaone commented 3 years ago

Hey, can anyone please look at my issue too and help me https://github.com/RehabMan/OS-X-Intel-Backlight/issues/7

gnpaone commented 3 years ago

@RehabMan Hey, can anyone please look at my issue too and help me https://github.com/RehabMan/OS-X-Intel-Backlight/issues/7