Contribute
Register

Full range of brightness using ACPIBacklight

Joined
Mar 12, 2013
Messages
283
Motherboard
HP ProBook 4530s
CPU
Intel Core i3 2330m
Graphics
Intel HD 3000
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
RehabMan, I just noticed you've pushed some new commits to your OS-X-ACPI-Backlight repo but unfortunately the link for downloads does not work anymore (404 error). Have you seen it?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,169
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
RehabMan, I just noticed you've pushed some new commits to your OS-X-ACPI-Backlight repo but unfortunately the link for downloads does not work anymore (404 error). Have you seen it?

It is not "new commits." It is an entirely new repo just put up today. And I haven't yet provided a build. You can build it from sources with xcode if you want.
 
Joined
Mar 12, 2013
Messages
283
Motherboard
HP ProBook 4530s
CPU
Intel Core i3 2330m
Graphics
Intel HD 3000
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
Ah alright then, will build it myself.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,169
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
One little issue in the makefile:

target distribute:
cp ./PatchCoconut.sh ./Distribute

It's not supposed to be here, right?

I haven't even looked at the 'distribute' target. The makefile was borrowed from the battery kext... When I get ready to push a ZIP, I'll look at it.
 
Joined
Mar 12, 2013
Messages
283
Motherboard
HP ProBook 4530s
CPU
Intel Core i3 2330m
Graphics
Intel HD 3000
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
I have just compiled it, installed the kext, repatched my DSDT (also got rid of blinkscreen) and - what a fantastic job, RehabMan. Everything is working smoothly, I love how the transitions look just like on a real macbook. The backlight setting is remembered after sleep/reboot as well. And what's most important for me - I can finally work during the night without having constant eye strain. Absolutely great job, thank you!
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,169
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
I have just compiled it, installed the kext, repatched my DSDT (also got rid of blinkscreen) and - what a fantastic job, RehabMan. Everything is working smoothly, I love how the transitions look just like on a real macbook. The backlight setting is remembered after sleep/reboot as well. And what's most important for me - I can finally work during the night without having constant eye strain. Absolutely great job, thank you!

Just FYI... This should be considered a work-in-progress, but yes it is better than the old native brightness + blinkscreen.

The data used on the 4530s can be improved. I think the curve is a little shallow at the beginning and too steep at the end. In addition, the lower values can be pushed lower (the top level could go higher too). I'm planning to calibrate against my MBA.

What is interesting is so far the brightness controls work better on my 4530s than they do on my 4540s. I'm not sure if it is the screen or something about the HD4000. With the 4530s, I can set arbitrary values and they always work. Where on the 4540s, if I set (for example) a value of 20, it will sometimes turn it black and sometimes have no effect at all (it seems to depend on what was the prior level). This makes the transitions on the 4540s seem a little more 'jerky', especially towards the lower brightness levels.

I guess I'll find out whether this is the screen or the HD4000 when I swap the screens (soon).

If you want to experiment with the raw values, use 'ioio' (build it via xcode, or grab the attached version here, put it in /usr/bin for easy access). Then you can change the value via property RawBrightness:
Code:
# example setting it to 100
ioio -s ACPIBacklightPanel RawBrightness 100

The upper/lower values are checked and corrected in DSDT, but you can disable that:
Code:
# from the patch...
    // extended _BCM/_BQC for setting "in between" levels\n
    Method (XBCM, 1, NotSerialized)\n
    {\n
        // initialize for consistent backlight level before/after sleep\n
        Store (0x80000000, LEVW)\n
    	Store (KLVX, LEVX)\n
        // store new backlight level\n
[B]        // comment this out.... If (LGreater(Arg0, XRGH)) { Store(XRGH, Arg0) }\n
        // and less so, this one.... If (LLess(Arg0, XRGL)) { Store(XRGL, Arg0) }\n[/B]
        Store(0x80000000, LEV2)\n
        Store(Arg0, LEVL)\n
    }\n
 

Attachments

  • ioio.zip
    2.8 KB · Views: 69
Joined
Mar 12, 2013
Messages
283
Motherboard
HP ProBook 4530s
CPU
Intel Core i3 2330m
Graphics
Intel HD 3000
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
(…)
The data used on the 4530s can be improved. I think the curve is a little shallow at the beginning and too steep at the end. In addition, the lower values can be pushed lower (the top level could go higher too). I'm planning to calibrate against my MBA.
(…)

Yeah, I agree. While I'm glad there's still room for improvement, I'm guessing it's going to be pretty difficult to set up the "steps" so that they're consistent in terms of a smooth, gradual brightness change.

Thanks for the instructions, I'm going to play with ioio straight away.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,169
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Yeah, I agree. While I'm glad there's still room for improvement, I'm guessing it's going to be pretty difficult to set up the "steps" so that they're consistent in terms of a smooth, gradual brightness change.

Thanks for the instructions, I'm going to play with ioio straight away.

The data I have in there now is based on data extracted under Windows using the brightness keys, plotting it on a graph, smoothing the curve out, then generating 64 levels along the resulting curve (well, along the lines connecting the points in the graph). If I find some good curve fitting/plotting software I'll try to generate better data.
 
Top