Jump to content

ACPI Backlight Driver


hotKoffy
 Share

224 posts in this topic

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

post-611522-1319969892_thumb.png

When brightness adjusting is lost as I described before, your kext only shows in the Kext Wizard.

Link to comment
Share on other sites

Just a helpful hint ...

 

I used this on an Asus N81Vg laptop with a GeForce GT 120M and to get brightness level saved on boot and proper levels when using hotkeys, I had to do a little adjustment to the original code in the _BCL method of my DSDT ...

 

BEFORE:

Method (_BCL, 0, NotSerialized)
					{
						Return (Package (0x10)
						{
							0x0F, 
							0x0E, 
							0x0D, 
							0x0C, 
							0x0B, 
							0x0A, 
							0x09, 
							0x08, 
							0x07, 
							0x06, 
							0x05, 
							0x04, 
							0x03, 
							0x02, 
							One, 
							Zero
						})
					}

 

AFTER:

Method (_BCL, 0, NotSerialized)
					{
						Return (Package (0x12)
						{
							0x02, 
							0x02, 
							Zero,
							One, 
							0x02, 
							0x03, 
							0x04, 
							0x05, 
							0x06, 
							0x07, 
							0x08, 
							0x09, 
							0x0A, 
							0x0B, 
							0x0C, 
							0x0D, 
							0x0E, 
							0x0F 
						})
					}

 

The first 2 hex values are personal set values so that my brightness at boot are at level 2 on both AC and Battery.

 

Notice the other 16 values are the regular values in the original _BCL code BUT inverted to match the way a Mac DSDT might be coded ...

 

NB: The hotkeys that work for me are FN + Pause for Brightness Up and FN + Delete for Brightness Down (aka F15 and F14 ??). The OSD (sun) also shows up on value change ...

 

End of useful hint and BIG THANKS to hotKoffy for the driver ...

Link to comment
Share on other sites

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.

 

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

 

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

 

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 ?

 

I will test it.

 

 

 

look at post 36

 

Ok , post 36 it is , solved the brightness level after every restart or wake, good thing all the way.

Thanks

Link to comment
Share on other sites

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:

 

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

 

You should check your dsdt battery _STA

post-740414-1320144842_thumb.png

And ask 'gsly' for the sources.

On the original driver _STA is used for battery state.

 

I've no problem with sleep so I can only help with ideas.

I've notice in some dsdt that there are two registers for setting the brightness in EC: one for AC and one for DC.

I'm also surprise that the driver can be unloaded. once AppleBacklightDisplay find it, it retains it (because it use it) which prevents unloaded (which is painful for testing !). The only moment when the AppleBacklightDisplay is unloaded is when I plug an external display but a new instance is created immediately. It would be interesting to test the wake / sleep behavior with ioregisteryexplorer (with option to show terminated objects) open to see what's happening.

Link to comment
Share on other sites

Hi 'hotKoffy',

 

Thanks a lot for your help and suggestions !

I sorted problem with getting AC status at start-up by changing BatteryPollingPeriod time to 5sec (had previously 30sec)

 

going to watch for changes in IORegistryExplorer and report if Ill spot anything !

 

 

Best wishes

swavek

Link to comment
Share on other sites

  • 2 weeks later...
When trying more key combination, I saw that

 

Fn - pg-up = Brightness UP

fn - insert = Brightness DOWN

 

But as previous, this have no effect about changing brightness on my screen :-(

 

Can this be change so these are on F7 & F8 ?

 

//Peter

 

This is from my logfile

 

 

Nov 14 11:00:08 Peters-Lion-Mac-Pro kernel[0]: ACPIBacklightPanel: Found Backlight Device: DD02
Nov 14 11:00:08 Peters-Lion-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPI Method _DOS found. Device path: _SB.PCI0.GFX0
Nov 14 11:00:08 Peters-Lion-Mac-Pro kernel[0]: ACPIBacklightPanel: ACPI  Methods _BCL _BCM _BQC found. Device path: _SB.PCI0.GFX0.DD02
Nov 14 11:00:08 Peters-Lion-Mac-Pro kernel[0]: ACPIBacklightPanel: Version 1.2

Link to comment
Share on other sites

  • 2 weeks later...

Hi folks,

just quick update on 'kext unload after wake-up' issue:

after upgrading my boot loader from rev 1083 to C2Rc5 rev 1700 problem seems to be gone - for last 6 days or so didn't have single issue (btw brilliant work of Chameleon team!)

 

hotKoffy thanks again for your great driver!

Regards

swavek

 

EDIT:

after 6 more days of using pc..

unfortunately problem with 'kext unloading after sleep' still exist..

Link to comment
Share on other sites

Hi hotKoffy, thank you for your brilliant work!!

 

I had edited my dsdt and tried your 1.2 kext out on my notebook Asus L50VN. Before the kext installation, its backlight levels can only be adjusted at the Chameleon greeting screen stage. The same settings can be kept exactly to the next boot-up, despite the disability of being changed dynamically in the OS X. After the kext installation, the backlight adjustment buttons on my Apple wireless keyboard really worked fine!! Both the AC/BAT start-up backlight levels can all be kept to the correct preset 0x08 in the dsdt. Everything seemed fine except one little problem: the backlight intensity did not change actually...

 

I checked the logs and the following errors can be found:

 

Nov 23 13:28:58.000 kernel: ACPIBacklightPanel: Found Backlight Device: LCDD
Nov 23 13:28:58.000 kernel: ACPIBacklightPanel: ACPI Method _DOS found. Device path: _SB.PCI0.PEGP.GFX0
Nov 23 13:28:58.000 kernel: ACPIBacklightPanel: ACPI Methods _BCL _BCM _BQC found. Device path: _SB.PCI0.PEGP.GFX0.LCDD
Nov 23 13:28:58.000 kernel: ACPIBacklightPanel: getIndexForLevel(-250) not found in _BCL table !
Nov 23 13:28:58.000 kernel: ACPIBacklightPanel: Version 1.2

 

Here is my dsdt GFX0 and PNLF sections:

 

Device (GFX0)
                 {
                     Name (_ADR, Zero)
                     OperationRegion (VSID, PCI_Config, Zero, 0x04)
                     Field (VSID, ByteAcc, NoLock, Preserve)
                     {
                         REG0,   32
                     }
                     Method (_DSM, 4, NotSerialized)
                     {
                         Store (Package (0x34)
                             {
                                 "@0,AAPL,boot-display", 
                                 Buffer (0x04)
                                 {
                                     0x01, 0x00, 0x00, 0x00
                                 }, 
                                 "@0,compatible", 
                                 Buffer (0x0B)
                                 {
                                     "NVDA,NVMac"
                                 }, 
                                 "@0,device_type", 
                                 Buffer (0x08)
                                 {
                                     "display"
                                 }, 
                                 "@0,name", 
                                 Buffer (0x0F)
                                 {
                                     "NVDA,Display-A"
                                 }, 
                                 "@0,backlight-control", 
                                 Buffer (0x04)
                                 {
                                     0x01, 0x00, 0x00, 0x00
                                 }, 
                                 "@0,built-in", 
                                 Buffer (0x04)
                                 {
                                     0x01, 0x00, 0x00, 0x00
                                 }, 
                                 "@0,display-cfg", 
                                 Buffer (0x04)
                                 {
                                     0x03, 0x01, 0x00, 0x00
                                 }, 
                                 "@1,compatible", 
                                 Buffer (0x0B)
                                 {
                                     "NVDA,NVMac"
                                 }, 
                                 "@1,device_type", 
                                 Buffer (0x08)
                                 {
                                     "display"
                                 }, 
                                 "@1,name", 
                                 Buffer (0x0F)
                                 {
                                     "NVDA,Display-B"
                                 }, 
                                 "@1,compatible", 
                                 Buffer (0x0B)
                                 {
                                     "NVDA,NVMac"
                                 }, 
                                 "@1,display-cfg", 
                                 Buffer (0x04)
                                 {
                                     0xFF, 0xFF, 0x00, 0x01
                                 }, 
                                 "AAPL,slot-name", 
                                 Buffer (0x08)
                                 {
                                     "PCI x16"
                                 }, 
                                 "NVPM", 
                                 Buffer (0x1C)
                                 {
                                     /* 0000 */    0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                     /* 0008 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                     /* 0010 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                     /* 0018 */    0x00, 0x00, 0x00, 0x00
                                 }, 
                                 "NVCAP", 
                                 Buffer (0x18)
                                 {
                                     /* 0000 */    0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 
                                     /* 0008 */    0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 
                                     /* 0010 */    0x00, 0x00, 0x00, 0x00
                                 }, 
                                 "device-id", 
                                 Buffer (0x04)
                                 {
                                     0x40, 0x06, 0x00, 0x00
                                 }, 
                                 "VRAM,totalsize", 
                                 Buffer (0x04)
                                 {
                                     0x00, 0x00, 0x00, 0x40
                                 }, 
                                 "device_type", 
                                 Buffer (0x0C)
                                 {
                                     "NVDA,Parent"
                                 }, 
                                 "model", 
                                 Buffer (0x17)
                                 {
                                     "nVidia GeForce 9650 GT"
                                 }, 
                                 "rom-revision", 
                                 Buffer (0x25)
                                 {
                                     "nVidia GeForce 9650 GT OpenGL Engine"
                                 }, 
                                 "AAPL,HasLid", 
                                 Buffer (0x04)
                                 {
                                     0x01, 0x00, 0x00, 0x00
                                 }, 
                                 "AAPL,aux-power-connected", 
                                 Buffer (0x04)
                                 {
                                     0x01, 0x00, 0x00, 0x00
                                 }, 
                                 "AAPL,backlight-control", 
                                 Buffer (0x04)
                                 {
                                     0x01, 0x00, 0x00, 0x00
                                 }, 
                                 "AAPL,BacklightRestore", 
                                 Buffer (0x04)
                                 {
                                     0x01, 0x00, 0x00, 0x00
                                 }, 
                                 "AAPL,HasPanel", 
                                 Buffer (0x04)
                                 {
                                     0x01, 0x00, 0x00, 0x00
                                 }, 
                                 "hda-gfx", 
                                 Buffer (0x0A)
                                 {
                                     "onboard-1"
                                 }
                             }, Local0)
                         DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                         Return (Local0)
                     }
                     Device (HDAU)
                     {
                         Name (_ADR, One)
                         Method (_DSM, 4, NotSerialized)
                         {
                             Store (Package (0x02)
                                 {
                                     "hda-gfx", 
                                     Buffer (0x0A)
                                     {
                                         "onboard-1"
                                     }
                                 }, Local0)
                             DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                             Return (Local0)
                         }
                     }
                     Method (PRST, 0, NotSerialized)
                     {
                         If (LEqual (REG0, Ones))
                         {
                             Return (Zero)
                         }
                         Else
                         {
                             Return (One)
                         }
                     }
                     Name (UPDN, One)
                     Name (NXTD, One)
                     Name (LCDM, One)
                     Name (CRTM, 0x02)
                     Name (TVOM, 0x04)
                     Name (HDMM, 0x08)
                     Name (DVIM, 0x10)
                     Name (DONE, Zero)
                     Name (DOSF, One)
                     Name (BRNC, Zero)
                     Method (_INI, 0, NotSerialized)
                     {
                         GETD ()
                     }
                     Method (_DOS, 1, NotSerialized)
                     {
                         And (Arg0, 0x03, DOSF)
                         Store (ShiftRight (Arg0, 0x02), BRNC)
                         And (BRNC, One, BRNC)
                     }
                     Name (DODP, Package (0x03)
                     {
                         0x00010100, 
                         0x00010110, 
                         0x0220
                     })
                     Method (_DOD, 0, NotSerialized)
                     {
                         If (LEqual (VGAF, 0x02)) {}
                         Else
                         {
                             Store (0x0120, Index (DODP, 0x02))
                         }
                         Return (DODP)
                     }
                     Device (CRTD)
                     {
                         Name (_ADR, 0x0100)
                         Method (_DCS, 0, NotSerialized)
                         {
                             Store (AVLD, Local0)
                             If (Local0)
                             {
                                 If (And (Local0, CRTM))
                                 {
                                     Return (0x1F)
                                 }
                             }
                             Return (0x1D)
                         }
                         Method (_DGS, 0, NotSerialized)
                         {
                             And (NXTD, CRTM, Local0)
                             If (Local0)
                             {
                                 Return (One)
                             }
                             Return (Zero)
                         }
                         Method (_DSS, 1, NotSerialized)
                         {
                             If (And (Arg0, 0x40000000))
                             {
                                 If (And (Arg0, 0x80000000))
                                 {
                                     Store (One, DONE)
                                 }
                             }
                         }
                     }
                     Device (DVID)
                     {
                         Method (_ADR, 0, NotSerialized)
                         {
                             If (LEqual (VGAF, 0x02))
                             {
                                 Return (0x0210)
                             }
                             Else
                             {
                                 Return (0x0120)
                             }
                         }
                         Method (_DCS, 0, NotSerialized)
                         {
                             Store (AVLD, Local0)
                             If (Local0)
                             {
                                 If (And (Local0, DVIM))
                                 {
                                     Return (0x1F)
                                 }
                             }
                             Return (0x1D)
                         }
                         Method (_DGS, 0, NotSerialized)
                         {
                             And (NXTD, DVIM, Local0)
                             If (Local0)
                             {
                                 Return (One)
                             }
                             Return (Zero)
                         }
                         Method (_DSS, 1, NotSerialized)
                         {
                             If (And (Arg0, 0x40000000))
                             {
                                 If (And (Arg0, 0x80000000))
                                 {
                                     Store (One, DONE)
                                 }
                             }
                         }
                     }
                     Device (HDMI)
                     {
                         Method (_ADR, 0, NotSerialized)
                         {
                             If (LEqual (VGAF, 0x02))
                             {
                                 Return (0x0220)
                             }
                             Else
                             {
                                 Return (0x0120)
                             }
                         }
                         Method (_DCS, 0, NotSerialized)
                         {
                             Store (AVLD, Local0)
                             If (Local0)
                             {
                                 If (And (Local0, HDMM))
                                 {
                                     Return (0x1F)
                                 }
                             }
                             Return (0x1D)
                         }
                         Method (_DGS, 0, NotSerialized)
                         {
                             And (NXTD, HDMM, Local0)
                             If (Local0)
                             {
                                 Return (One)
                             }
                             Return (Zero)
                         }
                         Method (_DSS, 1, NotSerialized)
                         {
                             If (And (Arg0, 0x40000000))
                             {
                                 If (And (Arg0, 0x80000000))
                                 {
                                     Store (One, DONE)
                                 }
                             }
                         }
                     }
                     Device (LCDD)
                     {
                         Name (_ADR, 0x0110)
                         Method (_DCS, 0, NotSerialized)
                         {
                             Store (AVLD, Local0)
                             If (Local0)
                             {
                                 If (And (Local0, LCDM))
                                 {
                                     Return (0x1F)
                                 }
                             }
                             Return (0x1D)
                         }
                         Method (_DGS, 0, NotSerialized)
                         {
                             And (NXTD, LCDM, Local0)
                             If (Local0)
                             {
                                 Return (One)
                             }
                             Return (Zero)
                         }
                         Method (_DSS, 1, NotSerialized)
                         {
                             If (And (Arg0, 0x40000000))
                             {
                                 If (And (Arg0, 0x80000000))
                                 {
                                     Store (One, DONE)
                                 }
                             }
                         }
                         Method (_BCL, 0, NotSerialized)
                         {
                             Return (Package (0x12)
                             {
                                 0x08, 
                                 0x08, 
                                 Zero, 
                                 One, 
                                 0x02, 
                                 0x03, 
                                 0x04, 
                                 0x05, 
                                 0x06, 
                                 0x07, 
                                 0x08, 
                                 0x09, 
                                 0x0A, 
                                 0x0B, 
                                 0x0C, 
                                 0x0D, 
                                 0x0E, 
                                 0x0F
                             })
                         }
                         Name (BCBH, Zero)
                         Method (_BCM, 1, NotSerialized)
                         {
                             If (LGreaterEqual (OSFG, OSVT))
                             {
                                 Store (Arg0, LBTN)
                                 ^^^^LPCB.EC.STBR ()
                                 If (ATKP)
                                 {
                                     If (LEqual (BCBH, One))
                                     {
                                         Notify (ATKD, Add (LBTN, 0x10))
                                     }
                                     If (LEqual (BCBH, 0x02))
                                     {
                                         Notify (ATKD, Add (LBTN, 0x20))
                                     }
                                 }
                                 Store (Zero, BCBH)
                             }
                         }
                         Method (_BQC, 0, NotSerialized)
                         {
                             Return (LBTN)
                         }
                     }
                     Method (SWHD, 1, Serialized)
                     {
                         Store (One, UPDN)
                         If (LEqual (DOSF, One))
                         {
                             Store (Arg0, SETD)
                             ISMI (0x94)
                         }
                         Else
                         {
                             Store (Zero, DONE)
                             Notify (GFX0, 0x80)
                             Store (0x01F4, Local0)
                             While (Local0)
                             {
                                 If (DONE)
                                 {
                                     Store (Zero, Local0)
                                 }
                                 Else
                                 {
                                     Sleep (0x0A)
                                     Decrement (Local0)
                                 }
                             }
                         }
                     }
                     Method (GETD, 0, NotSerialized)
                     {
                         ISMI (0x95)
                         Return (ACTD)
                     }
                     Method (ADVD, 0, NotSerialized)
                     {
                         If (UPDN)
                         {
                             GETD ()
                             Store (ACTD, SETD)
                             Store (Zero, UPDN)
                         }
                         ISMI (0xA0)
                         Store (SETD, NXTD)
                         Return (SETD)
                     }
                     Method (NATK, 0, NotSerialized)
                     {
                         Return (One)
                     }
                     Method (UPBL, 0, NotSerialized)
                     {
                         Notify (LCDD, 0x86)
                     }
                     Method (DWBL, 0, NotSerialized)
                     {
                         Notify (LCDD, 0x87)
                     }
                 }

 

		Device (PNLF)
	  {
		  Name (_HID, EisaId ("APP0002"))
		  Name (_CID, "backlight")
		  Name (_UID, 0x0A)
		  Name (_STA, 0x0B)
	  }

 

Can you tell me how to fix it? Thank you very much!!

 

 

 

Best regards

 

Leon

 

My ioreg:

MacBook_Pro.zip

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

sorry for the dumb question but... what if my dsdt have only method to get list of available brightness levels? it seems very strange - i'm on hp iq512, monoclock with integrated lcd-touchscreen (mainboard 965 chipset but made by... Pegatron)and on win i'm using special hp soft to control brightness, but on ubuntu i can control brightness natively, how can this be possible if my dsdt doesn't include BCM BQC methods? . hope someone can enlighten me))

Link to comment
Share on other sites

  • 4 weeks later...

I know I am so close ( if even possible on this machine ) .

 

I have an ASUS G73SW, and I am trying to get the backlight controller working. I have installed the KEXT, and I have a slider in my Display Panel properties page.

 

I have messed with the DSDT to no avail. I am getting

 

Jan 15 16:53:32 localhost kernel[0]: ACPIBacklightPanel: ACPI Methods _DOS _BCL _BCM _BQC found. Device path: _SB.PNLF

Jan 15 16:53:32 localhost kernel[0]: ACPIBacklightPanel: getIndexForLevel(4) not found in _BCL table !

Jan 15 16:53:32 localhost kernel[0]: ACPIBacklightPanel: Version 1.2

 

 

I had the _BCL _BCM _BQC methods on the DPOD class, and LCDD Class. . When that was the case, I was getting getIndexForLevel(0) not found, but after copying the classes to all four classes, I now get what you see above.

 

I am still learning about DSDTs, and I am green, but I am a quick learner.

 

Attached are my DSDT files. I am not asking for anyone to fixe them, but if someone could look over them, and offer hints, suggestions, or even the fix with an explanation, I would be in your debt.

 

Thank You,

 

Max.

 

P.S. If you know this machine WILL NOT work, let me know that too.

 

Thx.

MaxvampDSDTArchive.zip

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Hi all!

 

Could anybody explain how AppleBacklight.kext, ACPIBacklight.kext and FrameBuffer kext (for me it's ATINDRV) interact?

Now I don't have ACPIBacklight.kext in my system, AppleBacklight.kext is loaded and slider in display preferences is visible.

But any value below max turns backlight off.

When I inject backlight-PWM-freq value backlight is almost working (after reboot I have to decrease

brightness).

 

If I install

ACPIBacklight.kext, is there a probability of the conflict?

Link to comment
Share on other sites

Hi HotKoffy,

 

I changed my DSDT and test your 1.2 ACPIBacklight kext on my HP probook 5330m but it partialy works. I have acces to brightness control Fn Key and slider in prefpane but the brigthness doesn't change.

 

I also have an error in the kernel.log (with the additionnal ACPIBacklightDisplay kext) :

Probe (display0)

Probe KO: Wrong cast type for boot display OSBoolean

 

Do you have any idea about this error ?

Thx

Link to comment
Share on other sites

Hi HotKoffy,

First thank you for your efforts.

I have been messing with my DSDT since i found your topic. My display injection is on PEGP, here's my log :

 

12-03-14 13:52:24,000 kernel: ACPIBacklightPanel: Found Backlight Device: LCDD

12-03-14 13:52:24,000 kernel: ACPIBacklightPanel: ACPI Method _DOS found. Device path: _SB.PCI0.PEGP.GFX0

12-03-14 13:52:24,000 kernel: ACPIBacklightPanel: ACPI Methods _BCL _BCM _BQC found. Device path: _SB.PCI0.PEGP.GFX0.LCDD

12-03-14 13:52:24,000 kernel: ACPIBacklightPanel: Version 1.2

12-03-14 13:52:39,000 kernel: ACPIBacklightDisplay: probe(display0)

12-03-14 13:52:39,000 kernel: ACPIBacklightDisplay: displayType 2

I modified my OS from the DSDT to always return Windows 7 as operation system ( i guess thats the one which enables all the functions). But still, i had already your kext loading without any modification to the dsdt ( except no brightness change, but i can see the sun bezel and the brightness bar ), and to make sure i added the backlight control lines to the graphics injection, but still no change.

Attached my DSDT and Ioreg, can you give me any clue ?

P.S: already tested jamazelle's solutions cuz he has the same laptop, but no result.

Thank you in advance.

Archive.zip

Link to comment
Share on other sites

  • 1 month later...

Hi all!

 

Could anybody explain how AppleBacklight.kext, ACPIBacklight.kext and FrameBuffer kext (for me it's ATINDRV) interact?

Now I don't have ACPIBacklight.kext in my system, AppleBacklight.kext is loaded and slider in display preferences is visible.

But any value below max turns backlight off.

When I inject backlight-PWM-freq value backlight is almost working (after reboot I have to decrease

brightness).

 

If I install

ACPIBacklight.kext, is there a probability of the conflict?

 

AppleBacklight.kext and ACPIBacklight.kext are both attaching to PNLF ACPI device, so only one can be running. My kext will win if it finds the good ACPI methods in the DSDT (_DOS, _BCL....) so no conflicts could occure. If you can use AppleBacklight.kext, my driver is not for you

 

Hi HotKoffy,

 

I changed my DSDT and test your 1.2 ACPIBacklight kext on my HP probook 5330m but it partialy works. I have acces to brightness control Fn Key and slider in prefpane but the brigthness doesn't change.

 

I also have an error in the kernel.log (with the additionnal ACPIBacklightDisplay kext) :

Probe (display0)

Probe KO: Wrong cast type for boot display OSBoolean

 

Do you have any idea about this error ?

Thx

 

You skrew up injecting this property:

 

"@0,AAPL,boot-display",

 

Buffer (0x04)

 

{

 

0x01, 0x00, 0x00, 0x00

 

},

 

It is supposed to be an array not a boolean.

 

but ACPIBacklightDisplay.kext shall no longer be used !!

 

Hi HotKoffy, First thank you for your efforts. I have been messing with my DSDT since i found your topic. My display injection is on PEGP, here's my log : 12-03-14 13:52:24,000 kernel: ACPIBacklightPanel: Found Backlight Device: LCDD 12-03-14 13:52:24,000 kernel: ACPIBacklightPanel: ACPI Method _DOS found. Device path: _SB.PCI0.PEGP.GFX0 12-03-14 13:52:24,000 kernel: ACPIBacklightPanel: ACPI Methods _BCL _BCM _BQC found. Device path: _SB.PCI0.PEGP.GFX0.LCDD 12-03-14 13:52:24,000 kernel: ACPIBacklightPanel: Version 1.2 12-03-14 13:52:39,000 kernel: ACPIBacklightDisplay: probe(display0) 12-03-14 13:52:39,000 kernel: ACPIBacklightDisplay: displayType 2 I modified my OS from the DSDT to always return Windows 7 as operation system ( i guess thats the one which enables all the functions). But still, i had already your kext loading without any modification to the dsdt ( except no brightness change, but i can see the sun bezel and the brightness bar ), and to make sure i added the backlight control lines to the graphics injection, but still no change. Attached my DSDT and Ioreg, can you give me any clue ? P.S: already tested jamazelle's solutions cuz he has the same laptop, but no result. Thank you in advance.

 

I think you have an ATI graphics with a personnality showing your internal display as VGA instead of LVDS. The solution is to patch ATI personnality following: Editing custom personalities for ATI Radeon HD[45]xxx

Link to comment
Share on other sites

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.

 

i'm on it.. since 4 months to try to work with it.. stay in touch please!!

ah.. did you run wake with any other device apart from the power button?

 

bye

Link to comment
Share on other sites

  • 2 weeks later...
 Share

×
×
  • Create New...