Contribute
Register

[Guide] Patching DSDT/SSDT for LAPTOP backlight control

Read post #312.

Done! all files uploaded.

Diegos-MacBook-Pro:~ diego$ kextstat|grep -y acpiplat
13 2 0xffffff7f825a8000 0x65000 0x65000 com.apple.driver.AppleACPIPlatform (3.1) <12 11 7 6 5 4 3 1>
Diegos-MacBook-Pro:~ diego$ kextstat|grep -y appleintelcpu
21 0 0xffffff7f8246e000 0x2b000 0x2b000 com.apple.driver.AppleIntelCPUPowerManagement (218.0.0) <7 6 5 4 3 1>
30 0 0xffffff7f82469000 0x3000 0x3000 com.apple.driver.AppleIntelCPUPowerManagementClient (218.0.0) <7 6 5 4 3 1>
 

Attachments

  • RehabMan.zip
    13.6 KB · Views: 58
  • IOReg.ioreg.zip
    374.5 KB · Views: 42
  • EFI.zip
    5 MB · Views: 67
Thanks for your answer... I've solved adding USB patch.

Now I'm facing another problem...
I've done all the steps to Debug my keys (install kext, modify my DSDT).

When I go into Console and press some key, nothing happens.
I've search in Console for ACPIDebug and says "Jul 12 19:53:36 localhost kernel[0]: ACPIDebug: Version 0.1.3 starting"

I'm attaching you my modify DSDT and my IOReg.


Thanks again.

Make sure "some key" is one of your brightness keys.

Make sure you're looking at system.log in Console.app and not some other thing in there. And filter for acpidebug (filtering is not the same as searching).
 
Make sure "some key" is one of your brightness keys.

Make sure you're looking at system.log in Console.app and not some other thing in there. And filter for acpidebug (filtering is not the same as searching).

Thanks for your help!!! I have brightness keys working!!!

I have two more questions.

1- The function brightness keys start working 2 minutes after I've logged. Before that time the brightness work but doesn't show up the sign in display (i'm attaching an example of what I mean with sign).

2- Is there any way to make more smooth the transition when increase the brightness? now I have 10 steps and Apple shows 16.


Thanks again!!
 

Attachments

  • sign.jpg
    sign.jpg
    145.7 KB · Views: 119
Thanks for your help!!! I have brightness keys working!!!

I have two more questions.

1- The function brightness keys start working 2 minutes after I've logged. Before that time the brightness work but doesn't show up the sign in display (i'm attaching an example of what I mean with sign).

2- Is there any way to make more smooth the transition when increase the brightness? now I have 10 steps and Apple shows 16.


Thanks again!!

1. sounds like some other problem... is brightness increasing/decreasing and you're just without the OSD?

2. your photo shows 16.

--

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.

And output from:
Code:
kextstat|grep -y acpiplat
kextstat|grep -y appleintelcpu

Also, post EFI/Clover folder.
 
1. sounds like some other problem... is brightness increasing/decreasing and you're just without the OSD?

2. your photo shows 16.

--

1- Brightness increase and decrease fine without OSD for the first 2 minutes. After 2 minutes OSD shows up.

2- My picture shows 16 but only on OSD. The brightness on my screen only have 10 steps of changes. There are some steps that doesn't shows any change. For example 3 - 4, 5-6, and there are others.


I'm attaching all files.

13 2 0xffffff7f825a8000 0x65000 0x65000 com.apple.driver.AppleACPIPlatform (3.1) <12 11 7 6 5 4 3 1>
Diegos-MacBook-Pro:~ diego$ kextstat|grep -y appleintelcpu
21 0 0xffffff7f8246e000 0x2b000 0x2b000 com.apple.driver.AppleIntelCPUPowerManagement (218.0.0) <7 6 5 4 3 1>
30 0 0xffffff7f82469000 0x3000 0x3000 com.apple.driver.AppleIntelCPUPowerManagementClient (218.0.0) <7 6 5 4 3 1>


Thanks again!
 

Attachments

  • RehabMan.zip
    13.2 KB · Views: 48
  • IOReg.ioreg.zip
    365.4 KB · Views: 73
  • EFI.zip
    5 MB · Views: 71
1- Brightness increase and decrease fine without OSD for the first 2 minutes. After 2 minutes OSD shows up.

Not sure what the cause is. Could be system is too busy to display it. A short delay is normal early in boot, but I use all SSDs and a faster/newer machine.

2- My picture shows 16 but only on OSD. The brightness on my screen only have 10 steps of changes. There are some steps that doesn't shows any change. For example 3 - 4, 5-6, and there are others.

It is because your ACPI implementation only has 10 levels + black:
Code:
                        Method (_BCL, 0, NotSerialized)  // _BCL: Brightness Control Levels
                        {
                            Return (Package (0x0D)
                            {
                                0x46, 
                                0x28, 
                                Zero, //black (or lowest level)
                                0x0A, //1
                                0x14, //2
                                0x1E, //3
                                0x28, //4
                                0x32, //5
                                0x3C, //6
                                0x46, //7
                                0x50, //8
                                0x5A, //9
                                0x64  //10
                            })
                        }

                        Method (_BCM, 1, NotSerialized)  // _BCM: Brightness Control Method
                        {
                            Divide (Arg0, 0x0A, Local0, Local1)
                            Store (Local1, ^^^^LPCB.EC0.BRTS)
                        }

                        Method (_BQC, 0, NotSerialized)  // _BQC: Brightness Query Current
                        {
                            Multiply (^^^^LPCB.EC0.BRTS, 0x0A, Local0)
                            Return (Local0)
                        }
 
Not sure what the cause is. Could be system is too busy to display it. A short delay is normal early in boot, but I use all SSDs and a faster/newer machine.



It is because your ACPI implementation only has 10 levels + black:
Code:
                        Method (_BCL, 0, NotSerialized)  // _BCL: Brightness Control Levels
                        {
                            Return (Package (0x0D)
                            {
                                0x46, 
                                0x28, 
                                Zero, //black (or lowest level)
                                0x0A, //1
                                0x14, //2
                                0x1E, //3
                                0x28, //4
                                0x32, //5
                                0x3C, //6
                                0x46, //7
                                0x50, //8
                                0x5A, //9
                                0x64  //10
                            })
                        }

                        Method (_BCM, 1, NotSerialized)  // _BCM: Brightness Control Method
                        {
                            Divide (Arg0, 0x0A, Local0, Local1)
                            Store (Local1, ^^^^LPCB.EC0.BRTS)
                        }

                        Method (_BQC, 0, NotSerialized)  // _BQC: Brightness Query Current
                        {
                            Multiply (^^^^LPCB.EC0.BRTS, 0x0A, Local0)
                            Return (Local0)
                        }

Can I change ACPI implementation from 10 to 16 levels? or it's a limitation of my laptop?
 
Can I change ACPI implementation from 10 to 16 levels? or it's a limitation of my laptop?

Looks like a limitation of your EC/laptop/ACPI. Look at the code.

0x64 is the top range (100), specified by _BCL. The code clearly takes the value passed to _BCM (which will be one of the entries from _BCL, therefore in a range of 0-100), and divides by 10, storing it to BRTS (clearly the EC register that controls your brightness).

100/10 is 10.
Therefore, valid values for BRTS are 0..10. Or... eleven unique settings.

There may be additional flexibility if you bypass the EC/ACPI and program the underlying hardware. Doing that would require more knowledge of what the actual mechanism is.

If one of the 11 levels meets your needs, no big deal...
 
Looks like a limitation of your EC/laptop/ACPI. Look at the code.

0x64 is the top range (100), specified by _BCL. The code clearly takes the value passed to _BCM (which will be one of the entries from _BCL, therefore in a range of 0-100), and divides by 10, storing it to BRTS (clearly the EC register that controls your brightness).

100/10 is 10.
Therefore, valid values for BRTS are 0..10. Or... eleven unique settings.

There may be additional flexibility if you bypass the EC/ACPI and program the underlying hardware. Doing that would require more knowledge of what the actual mechanism is.

If one of the 11 levels meets your needs, no big deal...


Thanks for you help!!

I don't have the knowledge to "program the underlying hardware" and with 11 levels it's good enough I think.
 
Hi,

I have had brightness controll working on my laptop (running yosemite) before according to this guide. However a bad system restore destroyed a lot of things before I backed up.

Long story short, there is no brightness control slider showing up.

I applyed the SSDT patch just as I did before. I did not need to apply any DSDT patches. Nor did I see anything in the instructions saying I had to. The ssdt patch is most likely being loaded because I have a null ethernet ssdt patch that is working just fine.

I installed ACPIBacklight.kext using kext wizard and kext utility, I also tried injecting it using clover. None of these ways caused a brightness slider to show up under displays in settings. I confirm that is loaded using kext wizards "Loaded" view.

This can work, I've done it on this computer before. However I am baffled as to why the brightness slider is not appearing.

Thanks for any help!
 
Back
Top