Contribute
Register

Full range of brightness using ACPIBacklight

Status
Not open for further replies.
I used a different version. Sorry about that. Now it is from the version you linked. I verified from preview page before posting.

View attachment 105583

There are two possibilities:
1. Your laptop does not use the Intel IGPU backlight controls (it is rare, but there are a few...)
2. Your DSDT is out-of-sync with your native DSDT.

To determine which it is:
- remove ACPIBacklight.kext, rebuild cache (DPCIManager)
- reboot and test backlight control via SysPrefs->Displays

If it works, then your laptop uses the IGPU backlight controls and your DSDT is out-of-sync (case #2). If it does not work, then it is case #1.

In the event of case #1, apply: "Brightness Fix" to attempt to use OEM brightness methods. They may/may not work. Additional debugging of DSDT brightness methods may be required.

In the event of #2, re-extract native DSDT and re-patch. Re-install ACPIBacklight.kext and test again.
 
There are two possibilities:
1. Your laptop does not use the Intel IGPU backlight controls (it is rare, but there are a few...)
2. Your DSDT is out-of-sync with your native DSDT.

To determine which it is:
- remove ACPIBacklight.kext, rebuild cache (DPCIManager)
- reboot and test backlight control via SysPrefs->Displays

If it works, then your laptop uses the IGPU backlight controls and your DSDT is out-of-sync (case #2). If it does not work, then it is case #1.

In the event of case #1, apply: "Brightness Fix" to attempt to use OEM brightness methods. They may/may not work. Additional debugging of DSDT brightness methods may be required.

In the event of #2, re-extract native DSDT and re-patch. Re-install ACPIBacklight.kext and test again.

OK. Thanks. It did not work with "Brightness fix". I tried using and not using ACPIBacklight.kext. So I switch back to GenericBrightness for a while. May be later I try to re-patch DSDT.

Thanks the help and your work. Although, It does not work me, but many patch of yours work pretty well and help me a lot to enjoy my hackintosh laptop. I really appreciate your time.
 
OK. Thanks. It did not work with "Brightness fix". I tried using and not using ACPIBacklight.kext. So I switch back to GenericBrightness for a while. May be later I try to re-patch DSDT.

Thanks the help and your work. Although, It does not work me, but many patch of yours work pretty well and help me a lot to enjoy my hackintosh laptop. I really appreciate your time.

For every case where you can use GenericBrightness, you should be able to use ACPIBacklight.kext.

With your GenericBrightness config, post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html
 
For every case where you can use GenericBrightness, you should be able to use ACPIBacklight.kext.

With your GenericBrightness config, post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html

Thanks your reply. So there is hope. It sounds good. Currently I applied the "Brightness fix" patch that you suggested me before.

And I installed this GenericBrightness.kext:
View attachment GenericBrightness.kext.zip

And this is my ioreg:
View attachment Macbook.ioreg.zip
 
Thanks your reply. So there is hope. It sounds good. Currently I applied the "Brightness fix" patch that you suggested me before.

And I installed this GenericBrightness.kext:
View attachment 105630

And this is my ioreg:
View attachment 105629

If you were to use the _BCL/_BQC at _SB.PCI0.IGPU.DD02, you might be able to use that code with ACPIBacklight.kext. The code there lacks a _BQC implementation, but that is easy to provide.

Replacement PNLF device:
Code:
        Device (PNLF)
        {
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
            Name (_CID, "backlight")  // _CID: Compatible ID
            Name (_UID, 0x0A)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
            Method(_BCL, 0, NotSerialized) { Return(\_SB.PCI0.IGPU.DD02._BCL()) }
            Method(_BCM, 1, NotSerialized) { \_SB.PCI0.IGPU.DD02._BCM(Arg0) }
            Method(_BQC, 0, NotSerialized) { Return(\_SB.PCI0.LPCB.EC0.BRTS) }
        }

Note: You might get better results with your native brightness methods by simulating "Windows 2012".

This patch:
Code:
into method label _INI parent_label PCI0 code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched
begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;

Simulating "Windows 2012" (Win8) gives you 100 levels instead of 16.

From there, you could use a slight tweak to "Brightness Fix (ACPI 100)":
Code:
into device label PNLF remove_entry;
into definitionblock code_regex . insert
begin
Scope (\_SB)\n
{\n
    Device (PNLF)\n
    {\n
        // normal PNLF declares (note some of this probably not necessary)\n
        Name (_HID, EisaId ("APP0002"))\n
        Name (_CID, "backlight")\n
        Name (_UID, 10)\n
        Name (_STA, 0x0B)\n
        // _BCM/_BQC: set/get for brightness level\n
        Method (_BCM, 1, NotSerialized)\n
        {\n
            // Update backlight via existing DSDT methods\n
            ^^PCI0.IGPU.DD02._BCM(Arg0)\n
        }\n
        Method (_BQC, 0, NotSerialized)\n
        {\n
            Return(\_SB.PCI0.LPCB.EC0.BRTS)\n
        }\n
        Method (_DOS, 1, NotSerialized)\n
        {\n
            ^^PCI0.IGPU._DOS(Arg0)\n
        }\n
        Method (_BCL, 0, NotSerialized)\n
        {\n
            Return(^^PCI0.IGPU.DD02._BCL())\n
        }\n
        // extended _BCM/_BQC for setting "in between" levels\n
        Method (XBCM, 1, NotSerialized)\n
        {\n
            // Update backlight via existing DSDT methods\n
            ^^PCI0.IGPU.DD02._BCM(Arg0)\n
        }\n
        Method (XBQC, 0, NotSerialized)\n
        {\n
            Return(\_SB.PCI0.LPCB.EC0.BRTS)\n
        }\n
        // Use XOPT=1 to disable smooth transitions\n
        Name (XOPT, Zero)\n
        // XRGL/XRGH: defines the valid range\n
        Method (XRGL, 0, NotSerialized)\n
        {\n
            Store(_BCL(), Local0)\n
            Store(DerefOf(Index(Local0, 2)), Local0)\n
            Return(Local0)\n
        }\n
        Method (XRGH, 0, NotSerialized)\n
        {\n
            Store(_BCL(), Local0)\n
            Store(DerefOf(Index(Local0, Subtract(SizeOf(Local0), 1))), Local0)\n
            Return(Local0)\n
        }\n
    }\n
}\n
end;
 
If you were to use the _BCL/_BQC at _SB.PCI0.IGPU.DD02, you might be able to use that code with ACPIBacklight.kext. The code there lacks a _BQC implementation, but that is easy to provide.

Replacement PNLF device:
Code:
        Device (PNLF)
        {
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
            Name (_CID, "backlight")  // _CID: Compatible ID
            Name (_UID, 0x0A)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
            Method(_BCL, 0, NotSerialized) { Return(\_SB.PCI0.IGPU.DD02._BCL()) }
            Method(_BCM, 1, NotSerialized) { \_SB.PCI0.IGPU.DD02._BCM(Arg0) }
            Method(_BQC, 0, NotSerialized) { Return(\_SB.PCI0.LPCB.EC0.BRTS) }
        }

Note: You might get better results with your native brightness methods by simulating "Windows 2012".

This patch:
Code:
into method label _INI parent_label PCI0 code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched
begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;

Simulating "Windows 2012" (Win8) gives you 100 levels instead of 16.

From there, you could use a slight tweak to "Brightness Fix (ACPI 100)":
Code:
into device label PNLF remove_entry;
into definitionblock code_regex . insert
begin
Scope (\_SB)\n
{\n
    Device (PNLF)\n
    {\n
        // normal PNLF declares (note some of this probably not necessary)\n
        Name (_HID, EisaId ("APP0002"))\n
        Name (_CID, "backlight")\n
        Name (_UID, 10)\n
        Name (_STA, 0x0B)\n
        // _BCM/_BQC: set/get for brightness level\n
        Method (_BCM, 1, NotSerialized)\n
        {\n
            // Update backlight via existing DSDT methods\n
            ^^PCI0.IGPU.DD02._BCM(Arg0)\n
        }\n
        Method (_BQC, 0, NotSerialized)\n
        {\n
            Return(\_SB.PCI0.LPCB.EC0.BRTS)\n
        }\n
        Method (_DOS, 1, NotSerialized)\n
        {\n
            ^^PCI0.IGPU._DOS(Arg0)\n
        }\n
        Method (_BCL, 0, NotSerialized)\n
        {\n
            Return(^^PCI0.IGPU.DD02._BCL())\n
        }\n
        // extended _BCM/_BQC for setting "in between" levels\n
        Method (XBCM, 1, NotSerialized)\n
        {\n
            // Update backlight via existing DSDT methods\n
            ^^PCI0.IGPU.DD02._BCM(Arg0)\n
        }\n
        Method (XBQC, 0, NotSerialized)\n
        {\n
            Return(\_SB.PCI0.LPCB.EC0.BRTS)\n
        }\n
        // Use XOPT=1 to disable smooth transitions\n
        Name (XOPT, Zero)\n
        // XRGL/XRGH: defines the valid range\n
        Method (XRGL, 0, NotSerialized)\n
        {\n
            Store(_BCL(), Local0)\n
            Store(DerefOf(Index(Local0, 2)), Local0)\n
            Return(Local0)\n
        }\n
        Method (XRGH, 0, NotSerialized)\n
        {\n
            Store(_BCL(), Local0)\n
            Store(DerefOf(Index(Local0, Subtract(SizeOf(Local0), 1))), Local0)\n
            Return(Local0)\n
        }\n
    }\n
}\n
end;

This is perfect. :) It works like a charm. You are the best. I would have never figured out this solution. Thank you very much.
 
This is perfect. :) It works like a charm. You are the best. I would have never figured out this solution. Thank you very much.

Which solution out of the two did you settle on?
 
Which solution out of the two did you settle on?

I tried the 2 patches first, and it works. So I did not try shorter version of PNLF. But now I am going to do that.
 
Which solution out of the two did you settle on?

So I use the Darwin OS patch with both PNLF versions. And both PNLF work very well. I can use 100 levels of brightness in both case. Which PNLF should I prefer? What do you think?
 
Status
Not open for further replies.
Back
Top