Jump to content

ACPI Backlight Driver


hotKoffy
 Share

224 posts in this topic

Recommended Posts

_BQC is returning an out of range 650 value. (not responsible of KP)

 

Method (_BQC, 0, NotSerialized)

{

If (IGDS)

{

Return (QBQC ())

}

Else

{

Return (Divide (Multiply (QBQC (), 0xFF), 0x64, ))

}

}

 

It is possible that IGDS is setup by BIOS. There is a lot of tests about it in the DSDT.

 

Edit:

Verbose KP corrected:

 

Any ideas about my issue posted above?

Link to comment
Share on other sites

Any ideas about my issue posted above?

 

Seems that your _BQC is returning an index. This causes initial value problem (defaults to 0) but should not be a problem doing a level change after.

 

I've replaced the Method (_BQC) with what you said and I still can't adjust brightness.

 

Here is my kernel.log

Log

 

Thanks,

xmath279

 

I have just copy your _BQC without changing it to illustrate my words. It is up to you to analyze how your DSDT works.

Link to comment
Share on other sites

Any ideas about my issue posted above?

 

I've an idea:

you have 3 times the methods _DOS _BCL... nested in 3 devices PEG1 PEG3 GFX0

I think all this objects are populated in the device tree even if only one is valid. So the driver takes the first it finds and it is not the good one. So no effect when you move the slider.

Locate in ioreg on which device the graphics drivers is on and then put this on PNLF, changing in my example \_SB.PCI0.IXVE.IGPU.LCDD with the good paths.

 

 

Device (PNLF)

{

Name (_HID, EisaId ("APP0002"))

Name (_CID, "backlight")

Name (_UID, 0x0A)

Name (_STA, 0x0B)

 

Method (_BCL, 0, NotSerialized)

{

return (\_SB.PCI0.IXVE.IGPU.LCDD._BCL())

}

 

Method (_BCM, 1, NotSerialized)

{

\_SB.PCI0.IXVE.IGPU.LCDD._BCM(Arg0)

}

 

Method (_BQC, 0, NotSerialized)

{

return (\_SB.PCI0.IXVE.IGPU.LCDD._BQC())

}

 

Method (_DOS, 1, NotSerialized)

{

\_SB.PCI0.IXVE.IGPU._DOS(Arg0)

}

 

}

Link to comment
Share on other sites

I've an idea:

you have 3 times the methods _DOS _BCL... nested in 3 devices PEG1 PEG3 GFX0

I think all this objects are populated in the device tree even if only one is valid. So the driver takes the first it finds and it is not the good one. So no effect when you move the slider.

Locate in ioreg on which device the graphics drivers is on and then put this on PNLF, changing in my example \_SB.PCI0.IXVE.IGPU.LCDD with the good paths.

 

 

Device (PNLF)

{

Name (_HID, EisaId ("APP0002"))

Name (_CID, "backlight")

Name (_UID, 0x0A)

Name (_STA, 0x0B)

 

Method (_BCL, 0, NotSerialized)

{

return (\_SB.PCI0.IXVE.IGPU.LCDD._BCL())

}

 

Method (_BCM, 1, NotSerialized)

{

\_SB.PCI0.IXVE.IGPU.LCDD._BCM(Arg0)

}

 

Method (_BQC, 0, NotSerialized)

{

return (\_SB.PCI0.IXVE.IGPU.LCDD._BQC())

}

 

Method (_DOS, 1, NotSerialized)

{

\_SB.PCI0.IXVE.IGPU._DOS(Arg0)

}

 

}

 

Thanks for the idea! The values were pointing to the wrong device(\_SB.PEG1.GFX0.LCDD instead of the correct one which is \_SB.PEG3.GFX0.LCDD), and I just fixed the paths by setting the path to the methods of my LCD in the PNLF Device, but the slider is still not changing the brightness.

 

I can change the brightness before it enters the system and when i do it reports the value i change it to (max is 0xa, when I turned the brightness down, but not all the way and it reported 0x3) So like you said it sems to be reporting indexes of the brightness levels instead of the actual levels.

 

Could that be a problem? Is there a way I could try to have _BCM set values of 0x0 through 0xa ? maybe from the terminal?

 

post-878923-1318886562_thumb.png

post-878923-1318886924_thumb.png

 

Kernel Log:

Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::probe()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::findDevices()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::hasBacklightMethods()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BCL
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BCM
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BQC
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: PNLF has backlight Methods
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: ACPI Methods _DOS _BCL _BCM _BQC found. Device path: _SB.PNLF
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: probe(devices found : true)
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: PNLF has backlight Methods
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::start()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::findDevices()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::getDeviceControl()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: BIOS control disabled: _DOS
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::setupIndexedLevels()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::queryACPISupportedBrightnessLevels()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: PNLF _BCL 13
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(36) is 3
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(72) is 7
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::queryACPICurentBrightnessLevel()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: queryACPICurentBrightnessLevel _BQC = 8
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(8) not found !
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: getBatteryDevice() matching not null
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: min = 0, max = 10, value = 3
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: Version 1.1
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setDisplay()
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)
Oct 17 17:13:38 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 17 17:13:38 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 17 17:13:38 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 17 17:13:38 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 17 17:13:38 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)

 

Any more ideas? Thanks for all your help. ;)

Link to comment
Share on other sites

Thanks for the idea! The values were pointing to the wrong device(\_SB.PEG1.GFX0.LCDD instead of the correct one which is \_SB.PEG3.GFX0.LCDD), and I just fixed the paths by setting the path to the methods of my LCD in the PNLF Device, but the slider is still not changing the brightness.

 

I can change the brightness before it enters the system and when i do it reports the value i change it to (max is 0xa, when I turned the brightness down, but not all the way and it reported 0x3) So like you said it sems to be reporting indexes of the brightness levels instead of the actual levels.

 

Could that be a problem? Is there a way I could try to have _BCM set values of 0x0 through 0xa ? maybe from the terminal?

 

post-878923-1318886562_thumb.png

post-878923-1318886924_thumb.png

 

Kernel Log:

Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::probe()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::findDevices()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::hasBacklightMethods()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BCL
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BCM
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BQC
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: PNLF has backlight Methods
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: ACPI Methods _DOS _BCL _BCM _BQC found. Device path: _SB.PNLF
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: probe(devices found : true)
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: PNLF has backlight Methods
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::start()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::findDevices()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::getDeviceControl()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: BIOS control disabled: _DOS
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::setupIndexedLevels()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::queryACPISupportedBrightnessLevels()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: PNLF _BCL 13
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(36) is 3
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(72) is 7
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel::queryACPICurentBrightnessLevel()
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: queryACPICurentBrightnessLevel _BQC = 8
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(8) not found !
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: getBatteryDevice() matching not null
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: min = 0, max = 10, value = 3
Oct 17 17:13:12 localhost kernel[0]: ACPIBacklightPanel: Version 1.1
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setDisplay()
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 17 17:13:37 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)
Oct 17 17:13:38 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 17 17:13:38 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 17 17:13:38 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 17 17:13:38 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 17 17:13:38 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)

 

Any more ideas? Thanks for all your help. :)

 

for BQC change

Method (_BQC, 0, NotSerialized)

{

DBGR ("\n_BQC: ")

DBGR (LBTN)

Return (LBTN)

}

to

 

Method (_BQC, 0, NotSerialized)

{

Store (LBTN, Local0)

Store (BRTI, Local1)

ShiftLeft (Local1, 0x04, Local1)

Add (Local0, Local1, Local1)

Store (DerefOf (Index (PWAC, Local1)), Local0)

Return (Local0)

}

 

and verify than your embedded controller EC0 has the driver loaded

Link to comment
Share on other sites

for BQC change

Method (_BQC, 0, NotSerialized)

{

DBGR ("\n_BQC: ")

DBGR (LBTN)

Return (LBTN)

}

to

 

Method (_BQC, 0, NotSerialized)

{

Store (LBTN, Local0)

Store (BRTI, Local1)

ShiftLeft (Local1, 0x04, Local1)

Add (Local0, Local1, Local1)

Store (DerefOf (Index (PWAC, Local1)), Local0)

Return (Local0)

}

 

and verify than your embedded controller EC0 has the driver loaded

 

Ok, getting closer I think. now its reporting the correct brighness in ioreg when I move the slider but the brightness does not actually change on the screen, I suspect its not going to work :blink:. Maybe BCM isnt commiting the values correctly or perhaps the Nvidia driver is blocking it maybe?

 

EC0 Device is loaded in ioreg

post-878923-1318993874_thumb.png

Current DSDT:

dsdt.dsl.zip

 

For quick reference here are my brightness methods:

                        Method (_BCL, 0, NotSerialized)
                       {
                           DBGR ("\n_BCL: ")
                           Return (PCTG)    
                       }

                       Name (BCBH, Zero)
                       Method (_BCM, 1, NotSerialized)
                       {
                           DBGR ("\n_BCM: ")
                           DBGR (Arg0)
                           Store (GCBL (Arg0), Local0)
                           Subtract (0x0A, Local0, LBTN)
                           DBGR ("\n  LBTN = ")
                           DBGR (LBTN)
                           ^^^^SBRG.EC0.STBR ()
                       }

                       Method (_BQC, 0, NotSerialized)
                       {
                           Store (LBTN, Local0)
                           Store (BRTI, Local1)
                           ShiftLeft (Local1, 0x04, Local1)
                           Add (Local0, Local1, Local1)
                           Store (DerefOf (Index (^^^^SBRG.EC0.PWAC, Local1)), Local0)
                           Return (Local0)
                       }

Kernel Log (grep ACPiBack)

Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::probe()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::findDevices()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::hasBacklightMethods()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BCL
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BCM
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BQC
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: PNLF has backlight Methods
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: ACPI Methods _DOS _BCL _BCM _BQC found. Device path: _SB.PNLF
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: probe(devices found : true)
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: PNLF has backlight Methods
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::start()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::findDevices()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::getDeviceControl()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: BIOS control disabled: _DOS
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::setupIndexedLevels()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::queryACPISupportedBrightnessLevels()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: PNLF _BCL 13
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(36) is 3
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(72) is 7
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::queryACPICurentBrightnessLevel()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: queryACPICurentBrightnessLevel _BQC = 167
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(167) not found !
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: getBatteryDevice() matching not null
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: min = 0, max = 10, value = 3
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: Version 1.1
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setDisplay()
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(commit)
Oct 18 23:00:17 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 18 23:00:17 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 18 23:00:17 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)

Link to comment
Share on other sites

Ok, getting closer I think. now its reporting the correct brighness in ioreg when I move the slider but the brightness does not actually change on the screen, I suspect its not going to work :) . Maybe BCM isnt commiting the values correctly or perhaps the Nvidia driver is blocking it maybe?

 

EC0 Device is loaded in ioreg

post-878923-1318993874_thumb.png

Current DSDT:

dsdt.dsl.zip

Kernel Log (grep ACPiBack)

Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::probe()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::findDevices()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::hasBacklightMethods()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BCL
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BCM
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: ACPI device PNLF has _BQC
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: PNLF has backlight Methods
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: ACPI Methods _DOS _BCL _BCM _BQC found. Device path: _SB.PNLF
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: probe(devices found : true)
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: PNLF has backlight Methods
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::start()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::findDevices()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::getDeviceControl()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: BIOS control disabled: _DOS
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::setupIndexedLevels()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::queryACPISupportedBrightnessLevels()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: PNLF _BCL 13
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(36) is 3
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(72) is 7
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel::queryACPICurentBrightnessLevel()
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: queryACPICurentBrightnessLevel _BQC = 167
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(167) not found !
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: getBatteryDevice() matching not null
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: min = 0, max = 10, value = 3
Oct 18 22:59:47 localhost kernel[0]: ACPIBacklightPanel: Version 1.1
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setDisplay()
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 18 23:00:15 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doUpdate()
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPILevel min 0, max 10, value 3
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)
Oct 18 23:00:16 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(commit)
Oct 18 23:00:17 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::doIntegerSet(brightness)
Oct 18 23:00:17 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel::setACPIBrightnessLevel()
Oct 18 23:00:17 Jamezelles-Mac-Pro kernel[0]: ACPIBacklightPanel: setACPIBrightnessLevel _BCM(36)

 

try this

Method (_BCM, 1, NotSerialized)

{

DBGR ("\n_BCM: ")

DBGR (Arg0)

Store (GCBL (Arg0), Local0)

Subtract (0x0A, Local0, LBTN)

DBGR ("\n LBTN = ")

DBGR (LBTN)

//^^^^SBRG.EC0.STBR ()

^^^^SBRG.EC0.ECCB ()

}

Link to comment
Share on other sites

try this

Method (_BCM, 1, NotSerialized)

{

DBGR ("\n_BCM: ")

DBGR (Arg0)

Store (GCBL (Arg0), Local0)

Subtract (0x0A, Local0, LBTN)

DBGR ("\n LBTN = ")

DBGR (LBTN)

//^^^^SBRG.EC0.STBR ()

^^^^SBRG.EC0.ECCB ()

}

 

Tried this also, brightness does not actually change on the screen, I think the Nvidia driver is blocking the change for the brightness to the screen.

Link to comment
Share on other sites

Tried this also, brightness does not actually change on the screen, I think the Nvidia driver is blocking the change for the brightness to the screen.

 

No the Nvidia has nothing to do with it.

I think there is something OS specific in your DSDT. You have to understand how the DSDT behave depending on the value returned by _OSI or _OS.

 

I think the best way is to follow windows 7 specificities

If (_OSI ("Windows 2009"))

{

Store (OSW7, OSFG)

}

using

If (_OSI ("Darwin"))

{

Store (OSW7, OSFG)

}

Link to comment
Share on other sites

                        "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

 

dsdt_and_ioreg.zip

 

Any help is appreciated, thank you ;)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:

bsides_dsdt.dsl.zip

Link to comment
Share on other sites

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:

bsides_dsdt.dsl.zip

 

 

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)
                   }
               }
           }

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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):

post-237333-1319339667_thumb.png

 

EDIT: Now the control at the Preferences Pane does show a brightness bar - but nothing happens when I slide it :(

post-237333-1319341608_thumb.png

Link to comment
Share on other sites

Here's what I changed (was false):

post-237333-1319339667_thumb.png

 

EDIT: Now the control at the Preferences Pane does show a brightness bar - but nothing happens when I slide it :(

post-237333-1319341608_thumb.png

 

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.

Link to comment
Share on other sites

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.

post-237333-1319343093_thumb.png

 

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 =/

post-237333-1319343222_thumb.png

post-237333-1319343355_thumb.png

Link to comment
Share on other sites

Here it shows true, but nothing changes.

post-237333-1319343093_thumb.png

 

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 =/

post-237333-1319343222_thumb.png

post-237333-1319343355_thumb.png

 

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.

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

 Share

×
×
  • Create New...