Jump to content

ACPI Backlight Driver


  • Please log in to reply
198 replies to this topic

#61
bsides

bsides

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 104 posts
  • Gender:Male
  • Location:São Paulo, Brasil

"AAPL,HasPanel",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,Haslid",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                                                                        "@0,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        }, 						"@0,AAPL,boot-display",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },												"@0,built-in",                        Buffer ()                        {                            One                        },


Where can I inject this into my _DSM Method? I looked at your dsdt but I could not find the above code anywhere in your dsdt, are you injecting via graphics enabler or EFI string??

I have PNLF method in \_SB scope

Any help is appreciated

Attached is iogreg.txt.zip and DSDT.aml.zip

ASUS G53JW
Core I7 740QM
8GB DDR3 1333
Nvidia GTX 460M

Thanks.

I'm also failing to find where to patch this. You told about classic method for GPU0 but I don't think I know anything about that. Is it possible to release a DSDT patch for DSDT Editor? I'm really newbie at DSDTing =/

I'm having this at my log:
Oct 22 11:34:33 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: Found Backlight Device: DPOD
Oct 22 11:34:33 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: ACPI Method _DOS found. Device path: _SB.PCI0.PEG0.GFX0
Oct 22 11:34:33 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: ACPI Methods _BCL _BCM _BQC found. Device path: _SB.PCI0.PEG0.GFX0.DPOD
Oct 22 11:34:33 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: getIndexForLevel(10) not found in _BCL table !
Oct 22 11:34:33 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: Version 1.2

Attached File  dsdt_and_ioreg.zip   455.36KB   18 downloads

Any help is appreciated, thank you ;)

#62
jamezelle

jamezelle

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts

I'm also failing to find where to patch this. You told about classic method for GPU0 but I don't think I know anything about that. Is it possible to release a DSDT patch for DSDT Editor? I'm really newbie at DSDTing =/

I'm having this at my log:

Oct 22 11:34:33 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: Found Backlight Device: DPOD
Oct 22 11:34:33 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: ACPI Method _DOS found. Device path: _SB.PCI0.PEG0.GFX0
Oct 22 11:34:33 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: ACPI Methods _BCL _BCM _BQC found. Device path: _SB.PCI0.PEG0.GFX0.DPOD
Oct 22 11:34:33 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: getIndexForLevel(10) not found in _BCL table !
Oct 22 11:34:33 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: Version 1.2


Any help is appreciated, thank you :blink:


You should put it in the _DSM method of your PCI0.PEG0.GFX0 device. But I'm still not sure if your laptop is using DPOD or LCDD as the display.

Here is an example of my _DSM method for my GFX0 device, I still do not have brightness working but I am working on it...

Method (_DSM, 4, NotSerialized)                    {                        Store (Package (0x0C)                              "AAPL,HasPanel",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,Haslid",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                                                                        "@0,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        }, 			"@0,AAPL,boot-display",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },									"@0,built-in",                        Buffer ()                        {                            One                        },                            }, Local0)                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))                        Return (Local0)                    }

my default _DSM method had some checks for 3D panel, which I do not have so I removed those checks and added the injection code.

#63
bsides

bsides

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 104 posts
  • Gender:Male
  • Location:São Paulo, Brasil

You should put it in the _DSM method of your PCI0.PEG0.GFX0 device. But I'm still not sure if your laptop is using DPOD or LCDD as the display.

Here is an example of my _DSM method for my GFX0 device, I still do not have brightness working but I am working on it...

Method (_DSM, 4, NotSerialized)                    {                        Store (Package (0x0C)                              "AAPL,HasPanel",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,Haslid",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                                                                        "@0,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        }, 			"@0,AAPL,boot-display",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },									"@0,built-in",                        Buffer ()                        {                            One                        },                            }, Local0)                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))                        Return (Local0)                    }

my default _DSM method had some checks for 3D panel, which I do not have so I removed those checks and added the injection code.

Sorry for my newbieness but I can't find a way to insert this code within my DSDT. My _DSM method has a lot of stuff already and I tried to put this code in mine but when I try to compile I get a lot of errors. I mean, a lot. I tried to put it in every place possible, but couldn't, I'm always with an error. Could you *pretty please* show me where should I put it?

Here's my original _DSM for PCI0.PEG0.GFX0

Method (_DSM, 4, Serialized)                    {                        Name (T_0, Zero)                        If (LEqual (Arg0, Buffer (0x10)                                {                                    /* 0000 */    0x75, 0x0B, 0xA5, 0xD4, 0xC7, 0x65, 0xF7, 0x46,                                     /* 0008 */    0xBF, 0xB7, 0x41, 0x51, 0x4C, 0xEA, 0x02, 0x44                                }))                        {                            While (One)                            {                                Store (ToInteger (Arg2), T_0)                                If (LEqual (T_0, Zero))                                {                                    Return (Buffer (0x04)                                    {                                        0x33, 0x00, 0x50, 0x00                                    })                                }                                Else                                {                                    If (LEqual (T_0, One))                                    {                                        If (PA3D)                                        {                                            Return (Buffer (0x04)                                            {                                                0x00, 0x04, 0x00, 0x00                                            })                                        }                                        Else                                        {                                            If (NA3D)                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x04, 0x00, 0x00                                                })                                            }                                        }                                        Return (Buffer (0x04)                                        {                                            0x00, 0x00, 0x00, 0x00                                        })                                    }                                    Else                                    {                                        If (LEqual (T_0, 0x04))                                        {                                            ShiftRight (ToInteger (Arg3), 0x1C, Local0)                                            If (And (Local0, 0x04)) {}                                            Else                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x00, 0x00, 0x00                                                })                                            }                                            And (Local0, 0x03, Local1)                                            If (^^^SBRG.EC0.SW3D)                                            {                                                Store (Zero, ^^^SBRG.EC0.SW3D)                                                If (Local1)                                                {                                                    ^^^^ATKD.IANE (0x5A)                                                    Return (Buffer (0x04)                                                    {                                                        0x00, 0x00, 0x00, 0x40                                                    })                                                }                                                Else                                                {                                                    ^^^^ATKD.IANE (0x59)                                                    Return (Buffer (0x04)                                                    {                                                        0x00, 0x00, 0x00, 0x60                                                    })                                                }                                            }                                            If (Local1)                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x00, 0x00, 0x60                                                })                                            }                                            Return (Buffer (0x04)                                            {                                                0x00, 0x00, 0x00, 0x40                                            })                                        }                                        Else                                        {                                            If (LEqual (T_0, 0x05))                                            {                                                And (ToInteger (Arg3), 0x0FFF, Local1)                                                And (ToInteger (Arg3), 0x00FFF000, Local2)                                                ShiftRight (Local2, 0x0C, Local2)                                                If (LEqual (CHA1, One))                                                {                                                    Store (One, CHA3)                                                    Store (Local1, AVLD)                                                    Store (Local2, ACTD)                                                }                                                Store (Zero, CHA1)                                                Store (Zero, CHA2)                                                Return (Zero)                                            }                                            Else                                            {                                                If (LEqual (T_0, 0x14))                                                {                                                    Return (Package (0x09)                                                    {                                                        0x0110,                                                         0x0400,                                                         Zero,                                                         Zero,                                                         One,                                                         One,                                                         0xC8,                                                         Zero,                                                         0x03E8                                                    })                                                }                                                Else                                                {                                                    If (LEqual (T_0, 0x16))                                                    {                                                        If (NA3D)                                                        {                                                            If (LEqual (ToInteger (Arg3), One))                                                            {                                                                Return (TLKY)                                                            }                                                            Return (TLKY)                                                        }                                                        Else                                                        {                                                            If (LEqual (ToInteger (Arg3), One))                                                            {                                                                Return (LKY4)                                                            }                                                            Return (LKY3)                                                        }                                                    }                                                    Else                                                    {                                                    }                                                }                                            }                                        }                                    }                                }                                Break                            }                        }                        Return (Package (0x02)                        {                            Zero,                             Zero                        })                    }                }            }

and here's my DSDT.DSL:
Attached File  bsides_dsdt.dsl.zip   41.34KB   11 downloads

#64
jamezelle

jamezelle

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts

Sorry for my newbieness but I can't find a way to insert this code within my DSDT. My _DSM method has a lot of stuff already and I tried to put this code in mine but when I try to compile I get a lot of errors. I mean, a lot. I tried to put it in every place possible, but couldn't, I'm always with an error. Could you *pretty please* show me where should I put it?

Here's my original _DSM for PCI0.PEG0.GFX0

Method (_DSM, 4, Serialized)                    {                        Name (T_0, Zero)                        If (LEqual (Arg0, Buffer (0x10)                                {                                    /* 0000 */    0x75, 0x0B, 0xA5, 0xD4, 0xC7, 0x65, 0xF7, 0x46,                                     /* 0008 */    0xBF, 0xB7, 0x41, 0x51, 0x4C, 0xEA, 0x02, 0x44                                }))                        {                            While (One)                            {                                Store (ToInteger (Arg2), T_0)                                If (LEqual (T_0, Zero))                                {                                    Return (Buffer (0x04)                                    {                                        0x33, 0x00, 0x50, 0x00                                    })                                }                                Else                                {                                    If (LEqual (T_0, One))                                    {                                        If (PA3D)                                        {                                            Return (Buffer (0x04)                                            {                                                0x00, 0x04, 0x00, 0x00                                            })                                        }                                        Else                                        {                                            If (NA3D)                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x04, 0x00, 0x00                                                })                                            }                                        }                                        Return (Buffer (0x04)                                        {                                            0x00, 0x00, 0x00, 0x00                                        })                                    }                                    Else                                    {                                        If (LEqual (T_0, 0x04))                                        {                                            ShiftRight (ToInteger (Arg3), 0x1C, Local0)                                            If (And (Local0, 0x04)) {}                                            Else                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x00, 0x00, 0x00                                                })                                            }                                            And (Local0, 0x03, Local1)                                            If (^^^SBRG.EC0.SW3D)                                            {                                                Store (Zero, ^^^SBRG.EC0.SW3D)                                                If (Local1)                                                {                                                    ^^^^ATKD.IANE (0x5A)                                                    Return (Buffer (0x04)                                                    {                                                        0x00, 0x00, 0x00, 0x40                                                    })                                                }                                                Else                                                {                                                    ^^^^ATKD.IANE (0x59)                                                    Return (Buffer (0x04)                                                    {                                                        0x00, 0x00, 0x00, 0x60                                                    })                                                }                                            }                                            If (Local1)                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x00, 0x00, 0x60                                                })                                            }                                            Return (Buffer (0x04)                                            {                                                0x00, 0x00, 0x00, 0x40                                            })                                        }                                        Else                                        {                                            If (LEqual (T_0, 0x05))                                            {                                                And (ToInteger (Arg3), 0x0FFF, Local1)                                                And (ToInteger (Arg3), 0x00FFF000, Local2)                                                ShiftRight (Local2, 0x0C, Local2)                                                If (LEqual (CHA1, One))                                                {                                                    Store (One, CHA3)                                                    Store (Local1, AVLD)                                                    Store (Local2, ACTD)                                                }                                                Store (Zero, CHA1)                                                Store (Zero, CHA2)                                                Return (Zero)                                            }                                            Else                                            {                                                If (LEqual (T_0, 0x14))                                                {                                                    Return (Package (0x09)                                                    {                                                        0x0110,                                                         0x0400,                                                         Zero,                                                         Zero,                                                         One,                                                         One,                                                         0xC8,                                                         Zero,                                                         0x03E8                                                    })                                                }                                                Else                                                {                                                    If (LEqual (T_0, 0x16))                                                    {                                                        If (NA3D)                                                        {                                                            If (LEqual (ToInteger (Arg3), One))                                                            {                                                                Return (TLKY)                                                            }                                                            Return (TLKY)                                                        }                                                        Else                                                        {                                                            If (LEqual (ToInteger (Arg3), One))                                                            {                                                                Return (LKY4)                                                            }                                                            Return (LKY3)                                                        }                                                    }                                                    Else                                                    {                                                    }                                                }                                            }                                        }                                    }                                }                                Break                            }                        }                        Return (Package (0x02)                        {                            Zero,                             Zero                        })                    }                }            }

and here's my DSDT.DSL:
Attached File  bsides_dsdt.dsl.zip   41.34KB   11 downloads



You should be able to remove the

Zero,
Zero

return values at the bottom and change the package size to 0x0C and then put the values inside that like this

Method (_DSM, 4, Serialized)                    {                        Name (T_0, Zero)                        If (LEqual (Arg0, Buffer (0x10)                                {                                    /* 0000 */    0x75, 0x0B, 0xA5, 0xD4, 0xC7, 0x65, 0xF7, 0x46,                                     /* 0008 */    0xBF, 0xB7, 0x41, 0x51, 0x4C, 0xEA, 0x02, 0x44                                }))                        {                            While (One)                            {                                Store (ToInteger (Arg2), T_0)                                If (LEqual (T_0, Zero))                                {                                    Return (Buffer (0x04)                                    {                                        0x33, 0x00, 0x50, 0x00                                    })                                }                                Else                                {                                    If (LEqual (T_0, One))                                    {                                        If (PA3D)                                        {                                            Return (Buffer (0x04)                                            {                                                0x00, 0x04, 0x00, 0x00                                            })                                        }                                        Else                                        {                                            If (NA3D)                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x04, 0x00, 0x00                                                })                                            }                                        }                                        Return (Buffer (0x04)                                        {                                            0x00, 0x00, 0x00, 0x00                                        })                                    }                                    Else                                    {                                        If (LEqual (T_0, 0x04))                                        {                                            ShiftRight (ToInteger (Arg3), 0x1C, Local0)                                            If (And (Local0, 0x04)) {}                                            Else                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x00, 0x00, 0x00                                                })                                            }                                            And (Local0, 0x03, Local1)                                            If (^^^SBRG.EC0.SW3D)                                            {                                                Store (Zero, ^^^SBRG.EC0.SW3D)                                                If (Local1)                                                {                                                    ^^^^ATKD.IANE (0x5A)                                                    Return (Buffer (0x04)                                                    {                                                        0x00, 0x00, 0x00, 0x40                                                    })                                                }                                                Else                                                {                                                    ^^^^ATKD.IANE (0x59)                                                    Return (Buffer (0x04)                                                    {                                                        0x00, 0x00, 0x00, 0x60                                                    })                                                }                                            }                                            If (Local1)                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x00, 0x00, 0x60                                                })                                            }                                            Return (Buffer (0x04)                                            {                                                0x00, 0x00, 0x00, 0x40                                            })                                        }                                        Else                                        {                                            If (LEqual (T_0, 0x05))                                            {                                                And (ToInteger (Arg3), 0x0FFF, Local1)                                                And (ToInteger (Arg3), 0x00FFF000, Local2)                                                ShiftRight (Local2, 0x0C, Local2)                                                If (LEqual (CHA1, One))                                                {                                                    Store (One, CHA3)                                                    Store (Local1, AVLD)                                                    Store (Local2, ACTD)                                                }                                                Store (Zero, CHA1)                                                Store (Zero, CHA2)                                                Return (Zero)                                            }                                            Else                                            {                                                If (LEqual (T_0, 0x14))                                                {                                                    Return (Package (0x09)                                                    {                                                        0x0110,                                                         0x0400,                                                         Zero,                                                         Zero,                                                         One,                                                         One,                                                         0xC8,                                                         Zero,                                                         0x03E8                                                    })                                                }                                                Else                                                {                                                    If (LEqual (T_0, 0x16))                                                    {                                                        If (NA3D)                                                        {                                                            If (LEqual (ToInteger (Arg3), One))                                                            {                                                                Return (TLKY)                                                            }                                                            Return (TLKY)                                                        }                                                        Else                                                        {                                                            If (LEqual (ToInteger (Arg3), One))                                                            {                                                                Return (LKY4)                                                            }                                                            Return (LKY3)                                                        }                                                    }                                                    Else                                                    {                                                    }                                                }                                            }                                        }                                    }                                }                                Break                            }                        }                                                  Store (Package (0x0C)                        {                        "AAPL,HasPanel",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,Haslid",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                                                                        "@0,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        }, 			"@0,AAPL,boot-display",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },									"@0,built-in",                        Buffer ()                        {                            One                        }                            }, Local0)                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))                        Return (Local0)                    }                }            }


#65
bsides

bsides

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 104 posts
  • Gender:Male
  • Location:São Paulo, Brasil

You should be able to remove the

Zero,
Zero

return values at the bottom and change the package size to 0x0C and then put the values inside that like this

Method (_DSM, 4, Serialized)                    {                        Name (T_0, Zero)                        If (LEqual (Arg0, Buffer (0x10)                                {                                    /* 0000 */    0x75, 0x0B, 0xA5, 0xD4, 0xC7, 0x65, 0xF7, 0x46,                                     /* 0008 */    0xBF, 0xB7, 0x41, 0x51, 0x4C, 0xEA, 0x02, 0x44                                }))                        {                            While (One)                            {                                Store (ToInteger (Arg2), T_0)                                If (LEqual (T_0, Zero))                                {                                    Return (Buffer (0x04)                                    {                                        0x33, 0x00, 0x50, 0x00                                    })                                }                                Else                                {                                    If (LEqual (T_0, One))                                    {                                        If (PA3D)                                        {                                            Return (Buffer (0x04)                                            {                                                0x00, 0x04, 0x00, 0x00                                            })                                        }                                        Else                                        {                                            If (NA3D)                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x04, 0x00, 0x00                                                })                                            }                                        }                                        Return (Buffer (0x04)                                        {                                            0x00, 0x00, 0x00, 0x00                                        })                                    }                                    Else                                    {                                        If (LEqual (T_0, 0x04))                                        {                                            ShiftRight (ToInteger (Arg3), 0x1C, Local0)                                            If (And (Local0, 0x04)) {}                                            Else                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x00, 0x00, 0x00                                                })                                            }                                            And (Local0, 0x03, Local1)                                            If (^^^SBRG.EC0.SW3D)                                            {                                                Store (Zero, ^^^SBRG.EC0.SW3D)                                                If (Local1)                                                {                                                    ^^^^ATKD.IANE (0x5A)                                                    Return (Buffer (0x04)                                                    {                                                        0x00, 0x00, 0x00, 0x40                                                    })                                                }                                                Else                                                {                                                    ^^^^ATKD.IANE (0x59)                                                    Return (Buffer (0x04)                                                    {                                                        0x00, 0x00, 0x00, 0x60                                                    })                                                }                                            }                                            If (Local1)                                            {                                                Return (Buffer (0x04)                                                {                                                    0x00, 0x00, 0x00, 0x60                                                })                                            }                                            Return (Buffer (0x04)                                            {                                                0x00, 0x00, 0x00, 0x40                                            })                                        }                                        Else                                        {                                            If (LEqual (T_0, 0x05))                                            {                                                And (ToInteger (Arg3), 0x0FFF, Local1)                                                And (ToInteger (Arg3), 0x00FFF000, Local2)                                                ShiftRight (Local2, 0x0C, Local2)                                                If (LEqual (CHA1, One))                                                {                                                    Store (One, CHA3)                                                    Store (Local1, AVLD)                                                    Store (Local2, ACTD)                                                }                                                Store (Zero, CHA1)                                                Store (Zero, CHA2)                                                Return (Zero)                                            }                                            Else                                            {                                                If (LEqual (T_0, 0x14))                                                {                                                    Return (Package (0x09)                                                    {                                                        0x0110,                                                         0x0400,                                                         Zero,                                                         Zero,                                                         One,                                                         One,                                                         0xC8,                                                         Zero,                                                         0x03E8                                                    })                                                }                                                Else                                                {                                                    If (LEqual (T_0, 0x16))                                                    {                                                        If (NA3D)                                                        {                                                            If (LEqual (ToInteger (Arg3), One))                                                            {                                                                Return (TLKY)                                                            }                                                            Return (TLKY)                                                        }                                                        Else                                                        {                                                            If (LEqual (ToInteger (Arg3), One))                                                            {                                                                Return (LKY4)                                                            }                                                            Return (LKY3)                                                        }                                                    }                                                    Else                                                    {                                                    }                                                }                                            }                                        }                                    }                                }                                Break                            }                        }                                                  Store (Package (0x0C)                        {                        "AAPL,HasPanel",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,Haslid",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                                                                        "@0,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        }, 			"@0,AAPL,boot-display",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },									"@0,built-in",                        Buffer ()                        {                            One                        }                            }, Local0)                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))                        Return (Local0)                    }                }            }

Thank you, I just did it. Somehow now the kext didn't load on my boot... I'll reset cache and all stuff again to see the effects. Will edit the post once done.

Driver is loaded, but same error :)
Oct 22 21:07:04 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: Found Backlight Device: DPOD
Oct 22 21:07:04 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: ACPI Method _DOS found. Device path: _SB.PCI0.PEG0.GFX0
Oct 22 21:07:04 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: ACPI Methods _BCL _BCM _BQC found. Device path: _SB.PCI0.PEG0.GFX0.DPOD
Oct 22 21:07:04 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: getIndexForLevel(10) not found in _BCL table !
Oct 22 21:07:04 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: Version 1.2


#66
jamezelle

jamezelle

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts

Thank you, I just did it. Somehow now the kext didn't load on my boot... I'll reset cache and all stuff again to see the effects. Will edit the post once done.

Driver is loaded, but same error :)

Oct 22 21:07:04 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: Found Backlight Device: DPOD
Oct 22 21:07:04 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: ACPI Method _DOS found. Device path: _SB.PCI0.PEG0.GFX0
Oct 22 21:07:04 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: ACPI Methods _BCL _BCM _BQC found. Device path: _SB.PCI0.PEG0.GFX0.DPOD
Oct 22 21:07:04 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: getIndexForLevel(10) not found in _BCL table !
Oct 22 21:07:04 bsides-Macbook-Pro kernel[0]: ACPIBacklightPanel: Version 1.2


Yea I'm getting that same error but its getIndexForLevel(4) not found in _BCL table!

did you set index to true in the Info.plist for the acpibacklight kext?

#67
bsides

bsides

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 104 posts
  • Gender:Male
  • Location:São Paulo, Brasil

Yea I'm getting that same error but its getIndexForLevel(4) not found in _BCL table!

did you set index to true in the Info.plist for the acpibacklight kext?

I don't think so, no. Will try that and will post back.

#68
jamezelle

jamezelle

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts

I don't think so, no. Will try that and will post back.


Ive been playing with my DSM method and putting the injection stuff were we put yours makes it never get injected, because one of the other if statments returns before it gets to the injection, you can put it at the beginning of the DSM method but then the if statements do not get called, so I don't know what to do. I don't know if those If statements are important or not.

Regardless of where i put the injection code and what I change I cannot get brigntness to change


@HotKoffy I tried setting OSFG to OSW7 for Darwin, I have noticed a difference in that I can no longer change brightness as soon after the dsdt is loaded (apple logo) where as before I could change brightness until the Nvidia driver is loaded (when the display flickers and mouse cursor shows).

#69
bsides

bsides

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 104 posts
  • Gender:Male
  • Location:São Paulo, Brasil

Ive been playing with my DSM method and putting the injection stuff were we put yours makes it never get injected, because one of the other if statments returns before it gets to the injection, you can put it at the beginning of the DSM method but then the if statements do not get called, so I don't know what to do. I don't know if those If statements are important or not.

Regardless of where i put the injection code and what I change I cannot get brigntness to change


@HotKoffy I tried setting OSFG to OSW7 for Darwin, I have noticed a difference in that I can no longer change brightness as soon after the dsdt is loaded (apple logo) where as before I could change brightness until the Nvidia driver is loaded (when the display flickers and mouse cursor shows).

Here's what I changed (was false):
Attached File  Captura_de_Tela_2011_10_23___s_1.01.24_.png   52.14KB   102 downloads

EDIT: Now the control at the Preferences Pane does show a brightness bar - but nothing happens when I slide it :(
Attached File  Captura_de_Tela_2011_10_23___s_1.45.45_.png   51.66KB   75 downloads

#70
jamezelle

jamezelle

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts

Here's what I changed (was false):
Attached File  Captura_de_Tela_2011_10_23___s_1.01.24_.png   52.14KB   102 downloads

EDIT: Now the control at the Preferences Pane does show a brightness bar - but nothing happens when I slide it :(
Attached File  Captura_de_Tela_2011_10_23___s_1.45.45_.png   51.66KB   75 downloads


Yea same here, our asus' have something irregular going on.By the way that setting seems to not actually change anything

It might be a bug in the kext


The setting in IOReg still shows false. That is after a rebuild of the caches and a reboot of course.


Edit: after another reboot its showing true now.

#71
bsides

bsides

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 104 posts
  • Gender:Male
  • Location:São Paulo, Brasil

Yea same here, our asus' have something irregular going on. By the way that setting seems to not actually change anything

It might be a bug in the kext



The setting in IOReg still shows false. That is after a rebuild of the caches and a reboot of course.

Here it shows true, but nothing changes.
Attached File  Captura_de_Tela_2011_10_23___s_2.10.43_.png   85.68KB   98 downloads

I'm now using a software called Spark just to make some combination of keys change Volume Up, Down, Mute and Play/Pause, Next Track, Previous Track and Stop working. I couldn't use my function key because it seems to be turned off (I can't seem to find a fix for this!). Even though this software has a brightness control keystroke, it doesn't change the brightness (the control goes down by 2 squares then stop going down... and the screen never changes). Must be something going on =/
Attached File  Captura_de_Tela_2011_10_23___s_2.13.26_.png   65.4KB   89 downloads
Attached File  Captura_de_Tela_2011_10_23___s_2.14.55_.png   84.95KB   32 downloads

#72
jamezelle

jamezelle

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts

Here it shows true, but nothing changes.
Attached File  Captura_de_Tela_2011_10_23___s_2.10.43_.png   85.68KB   98 downloads

I'm now using a software called Spark just to make some combination of keys change Volume Up, Down, Mute and Play/Pause, Next Track, Previous Track and Stop working. I couldn't use my function key because it seems to be turned off (I can't seem to find a fix for this!). Even though this software has a brightness control keystroke, it doesn't change the brightness (the control goes down by 2 squares then stop going down... and the screen never changes). Must be something going on =/
Attached File  Captura_de_Tela_2011_10_23___s_2.13.26_.png   65.4KB   89 downloads
Attached File  Captura_de_Tela_2011_10_23___s_2.14.55_.png   84.95KB   32 downloads


depending on what keyboard kext your using you can use fn pause and fn scroll lock to toggle brightness but of course it doesnt actually do anything for us.

for you volume controls you can use AsusHotkeys.kext it will also enable itunes controls, google for it.

#73
bsides

bsides

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 104 posts
  • Gender:Male
  • Location:São Paulo, Brasil

depending on what keyboard kext your using you can use fn pause and fn scroll lock to toggle brightness but of course it doesnt actually do anything for us.

for you volume controls you can use AsusHotkeys.kext it will also enable itunes controls, google for it.

Already tried that AsusHotkeys.kext, didn't work either =/
Funny that my PrintScreen really raises the brightness (althou doesnt work) without the Fn key. I don't have a Scroll Lock to test the other one thou... lol. so screwed up.

#74
sw170

sw170

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:UK
Hi 'hotKoffy'
Thanks again for your brilliant work and sharing results here !
I have couple of questions regarding your driver:

Is it suppose to restore brightness value after restart/reboot ?
or is this still 'work in progress' ?

On my dv9000 it seems to read correct (previous) values on start up:
25/10/2011 00:20:16	kernel	ACPIBacklightPanel: getIndexForLevel(43) is 5
25/10/2011 00:20:16	kernel	ACPIBacklightPanel::queryACPICurentBrightnessLevel()
25/10/2011 00:20:16	kernel	ACPIBacklightPanel: queryACPICurentBrightnessLevel _BQC = 69
25/10/2011 00:20:16	kernel	ACPIBacklightPanel: getIndexForLevel(69) is 8
but then in next lines:
25/10/2011 00:20:38	kernel	ACPIBacklightPanel::setDisplay()
25/10/2011 00:20:38	kernel	ACPIBacklightPanel::doUpdate()
25/10/2011 00:20:38	kernel	ACPIBacklightPanel: ACPILevel min 0, max 10, value 10
25/10/2011 00:20:38	kernel	ACPIBacklightPanel::doUpdate()
25/10/2011 00:20:38	kernel	ACPIBacklightPanel: ACPILevel min 0, max 10, value 10
25/10/2011 00:20:38	kernel	ACPIBacklightPanel::doIntegerSet(brightness)
25/10/2011 00:20:38	kernel	ACPIBacklightPanel::setACPIBrightnessLevel()
25/10/2011 00:20:38	kernel	ACPIBacklightPanel: setACPIBrightnessLevel _BCM(95)
25/10/2011 00:20:38	kernel	ACPIBacklightPanel::doIntegerSet(brightness)
25/10/2011 00:20:38	kernel	ACPIBacklightPanel::setACPIBrightnessLevel()
25/10/2011 00:20:38	kernel	ACPIBacklightPanel: setACPIBrightnessLevel _BCM(95)
and system boots on max brightness,

there was also something like that:
24/10/2011 23:46:54	kernel	ACPIBacklightPanel: queryACPICurentBrightnessLevel _BQC = 31
24/10/2011 23:46:54	kernel	ACPIBacklightPanel: getIndexForLevel(31) not found in _BCL table !
??

'look at power supply status at start up' most of the time gives correct values, but I had also this:
ACPIBacklightPanel: getACStatus() unable to get "ExternalConnected" property

One more thing: sometimes after 5-7 sleep/wake-up cycles driver stops working, then it starts again either after another sleep/wake-up cycle or I have to restart system.
any ideas, clues ?

Best wishes
swavek

#75
fc bayern

fc bayern

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 210 posts
  • Gender:Male
  • Location:Macedonia

One more thing: sometimes after 5-7 sleep/wake-up cycles driver stops working, then it starts again either after another sleep/wake-up cycle or I have to restart system.
any ideas, clues ?


same here, nice finding
I solved that adding the load and unload line for acpibacklight.kext in sleepwatcher

#76
fc bayern

fc bayern

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 210 posts
  • Gender:Male
  • Location:Macedonia
hotKoffy,
Tell me is it possible to change the default brightness value when the system starts. For instance, here on mine lappy is 70 % , but I want to be on 50%(just the matter of taste). I manually set it on 50% after every restart or new boot (in System preferences >Display>Brightnes slider), but I would be so much happier if it is to stay by default on 50%.Also the keyboard shortcuts with the Fn button works fine - i also used them , but default would be nicer.
thanks

#77
sw170

sw170

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:UK

same here, nice finding
I solved that adding the load and unload line for acpibacklight.kext in sleepwatcher

Hi 'fc bayern'
Yeah, sleepwatcher is ok workaround-er but I wonder if with hotKoffy's help we could do without it..

#78
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

Is it suppose to restore brightness value after restart/reboot ?
or is this still 'work in progress' ?

No, the drivers can't save anything. The sortage of the current value is made by DSDT in the PC CMOS NVRAM and so shall work in a multiboot environment.

On my dv9000 it seems to read correct (previous) values on start up:

25/10/2011 00:20:16	kernel	ACPIBacklightPanel: getIndexForLevel(43) is 5
	 25/10/2011 00:20:16	kernel	ACPIBacklightPanel::queryACPICurentBrightnessLevel()
	 25/10/2011 00:20:16	kernel	ACPIBacklightPanel: queryACPICurentBrightnessLevel _BQC = 69
	 25/10/2011 00:20:16	kernel	ACPIBacklightPanel: getIndexForLevel(69) is 8
but then in next lines:
25/10/2011 00:20:38	kernel	ACPIBacklightPanel::setDisplay()
	 25/10/2011 00:20:38	kernel	ACPIBacklightPanel::doUpdate()
	 25/10/2011 00:20:38	kernel	ACPIBacklightPanel: ACPILevel min 0, max 10, value 10
	 25/10/2011 00:20:38	kernel	ACPIBacklightPanel::doUpdate()
	 25/10/2011 00:20:38	kernel	ACPIBacklightPanel: ACPILevel min 0, max 10, value 10
	 25/10/2011 00:20:38	kernel	ACPIBacklightPanel::doIntegerSet(brightness)
	 25/10/2011 00:20:38	kernel	ACPIBacklightPanel::setACPIBrightnessLevel()
	 25/10/2011 00:20:38	kernel	ACPIBacklightPanel: setACPIBrightnessLevel _BCM(95)
	 25/10/2011 00:20:38	kernel	ACPIBacklightPanel::doIntegerSet(brightness)
	 25/10/2011 00:20:38	kernel	ACPIBacklightPanel::setACPIBrightnessLevel()
	 25/10/2011 00:20:38	kernel	ACPIBacklightPanel: setACPIBrightnessLevel _BCM(95)
and system boots on max brightness,

I think the first 2 entries in BCL shall be corrected. You can find explaination in the topic.

there was also something like that:

24/10/2011 23:46:54	kernel	ACPIBacklightPanel: queryACPICurentBrightnessLevel _BQC = 31
	 24/10/2011 23:46:54	kernel	ACPIBacklightPanel: getIndexForLevel(31) not found in _BCL table !

Do you have made modifications on your DSDT related to backlight levels ? The level returned by BQC must exist in BCL.

'look at power supply status at start up' most of the time gives correct values, but I had also this:

ACPIBacklightPanel: getACStatus() unable to get "ExternalConnected" property

The drivers seek the battery driver to see if the AC plug is connected. On all IOreg I've read, this property exists. Which driver do you use for your battery ?

One more thing: sometimes after 5-7 sleep/wake-up cycles driver stops working, then it starts again either after another sleep/wake-up cycle or I have to restart system.
any ideas, clues ?

I will test it.

hotKoffy,
Tell me is it possible to change the default brightness value when the system starts. For instance, here on mine lappy is 70 % , but I want to be on 50%(just the matter of taste). I manually set it on 50% after every restart or new boot (in System preferences >Display>Brightnes slider), but I would be so much happier if it is to stay by default on 50%.Also the keyboard shortcuts with the Fn button works fine - i also used them , but default would be nicer.
thanks


look at post 36

#79
sw170

sw170

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:UK
Hi 'hotKoffy'
Thanks for reply, and as I realised by reading topic more carefully, that now I have to say sorry for repetitive questions !

I had two BCL sections in my DSDT, not sure what PTPE stands for but I replaced this:

Method (_BCL, 0, NotSerialized)
					{
						If (LEqual (PTPE, One))
						{
							Return (BCL1)
						}
						Else
						{
							Return (BCL2)
						}
					}
..........

			Name (BCL1, Package (0x0D)
			{
				0x5F, 
				0x2B, 
				0x14, 
				0x18, 
				0x1C, 
				0x20, 
				0x25, 
				0x2B, 
				0x32, 
				0x3B, 
				0x45, 
				0x51, 
				0x5F
			})
			Name (BCL2, Package (0x0D)
			{
				0x64, 
				0x2E, 
				0x14, 
				0x19, 
				0x1F, 
				0x24, 
				0x29, 
				0x2E, 
				0x34, 
				0x3D, 
				0x48, 
				0x55, 
				0x64
			})

with that:

Method (_BCL, 0, NotSerialized)
			{
				Return (Package (0x13)
				{
					0x2D, 
					0x1E, 
					0xF, 
					0x14, 
					0x19, 
					0x1E, 
					0x23, 
					0x28, 
					0x2D, 
					0x32, 
					0x37, 
					0x3C, 
					0x41, 
					0x46, 
					0x4B, 
					0x50, 
					0x55, 
					0x5A,
					0x5F
				})
			}

and now I have nice - smoothly working brightness control, with desired level on start-up. Thanks to you!

I use 'gsly' battery driver on my system and I suspect that start-up message (unable to get "ExternalConnected" property) may be connected to "BatteryPollingPeriodOverride" which is 30sec. now, but Im not that bothered about that anymore as after changing BCL code I'm happy with brightness levels on start-up

Problem with the driver not working after wake-up is so random that is hard to recall what previous action may caused it. It happened again today and I think (and vaguely remember from last times) that this was triggered on AC connect - disconnect while PC was asleep,but not sure..

Thanks again!
Regards
swavek

#80
weizh126

weizh126

    InsanelyMac Protégé

  • Members
  • PipPip
  • 64 posts
Hi hotKoffy
After wakeup from sleep, sometimes I can't adjust brightness. The brightness value changes in IOReg, but the brightness don't change.
BTW, I'm using 10.7.2

Edit:
When brightness adjusting is OK, your kext shows in the Kext Wizard and System Information
Attached File  Screen_Shot_2011_10_30_at_6.15.23_PM.png   84.43KB   50 downloads
When brightness adjusting is lost as I described before, your kext only shows in the Kext Wizard.





1 user(s) are reading this topic

1 members, 0 guests, 0 anonymous users


© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy