Jump to content

ACPI Backlight Display driver


hotKoffy
 Share

31 posts in this topic

Recommended Posts

Last update: 18 sept 2011

 

New driver in this topic : ACPI Backlight

 

This driver provides native backlight management for laptops with backlight managed by ACPI : slider in the display pref pane and sun bezel when you press backlight up/down hotkey (with an other driver than can understand your keyboard Fn keys...)

post-740414-1300529278_thumb.png

 

To make the display dim before sleeping, hit this check button (in red):

 

The driver will use the min level + 1.

The entry "slightly dim the display..." has no effect.

 

This driver will replace AppleDisplay in the device tree and implements same features than AppleBacklightDisplay Class but with ACPI calls. (Both inherit from IOBacklightDisplay in IOGraphicsFamily.kext).

If actually you have AppleBacklightDisplay loaded, it is not for you. (but should not hurt thanks to IOProbeScore hierarchy)

 

This driver has been developed with an EeePC 1201N but there is no reason it shall not work in other hardware.

 

There must be "AAPL,boot-display" property set in order to bind on the internal display. Chameleon shall do that with graphic injector, otherwise take a look in my DSDT.

There must be this device in DSDT, in the \SB scope:

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

 

I've also injected this in the GPU scope:

...
                       "AAPL,backlight-control",
                       Buffer (0x04)
                       {
                           0x01, 0x00, 0x00, 0x00
                       },

                       "AAPL,BacklightRestore",
                       Buffer (0x04)
                       {
                           0x01, 0x00, 0x00, 0x00
                       },

                       "AAPL01,BacklightIntensity",
                       Unicode ("N"),
...

 

I don't know if it is absolutely needed.

 

For 1201N users, take a look in my DSDT, I've extended the _BCL method to get 93 levels (2 to 95) instead of the 16 original (which are indexing a table with 16 entries between 2 and 95). OSX works greater with more levels. Macs have 512 levels... (_BCL, _BCM and _BQC shall be taken as a whole). If you keep the original entries, the backlight will step by 2 for each key pressed.

For hotkeys : WMI Hotkey driver

 

 

Sources included

Install it in S/L/E (with Kext Utility or similar !)

Tested in i386 and x86_64.

Minimum system version 10.6.5 - Max 10.6.7

IOGraphicsFamily changed in 10.6.8, the driver could not be loaded. The code has to be updated, certainly making inheritance from IODisplay which seems to be stable.

Link to comment
Share on other sites

This driver has been developed with an EeePC 1201N but there is no reason it shall not work in other hardware. Not tested in x86_64.

 

There must be "AAPL,boot-display" property set in order to bind on the internal display. Chameleon shall do that with graphic injector, otherwise take a look in my DSDT.

 

For 1201N users, take a look in my DSDT, I've extended the _BCL method to get 93 levels instead of the 16 original. OSX works greater with more levels. (_BCL, _BCM and _BQC shall be taken as a whole)

For hotkeys : WMI Hotkey driver

 

 

 

Thanks for the PM,

 

your questions;

 

what is your bios version ? = 0326

do you use x86 or x64 kernel ? = x86

do you use voodooPS2 ? (me not) = yes

can you post your dsdt = yes

 

I already figured it out my friend HotKoffy,

This what i just done;

1. remove asus hot keys

2. run kext utility

3. restart 1201n

4. install your good kext

5. i install chameleon 2.0 rc5 r656

6. change boot file.

7. re-install 10.6.6 update

8. restart 1201n

9. re-install bluetooth kext and sound kext by kext utility

10. restart 1201n

and everything works.

your kext works great.

keypad keys on-off the light

activate-deactivate the keypad.

volume ok

the rest not yet tested.

 

here is my dsdt for 2gb ram

Link to comment
Share on other sites

Thanks for the PM,

 

your questions;

 

what is your bios version ? = 0326

do you use x86 or x64 kernel ? = x86

do you use voodooPS2 ? (me not) = yes

can you post your dsdt = yes

 

I already figured it out my friend HotKoffy,

This what i just done;

1. remove asus hot keys

2. run kext utility

3. restart 1201n

4. install your good kext

5. i install chameleon 2.0 rc5 r656

6. change boot file.

7. re-install 10.6.6 update

8. restart 1201n

9. re-install bluetooth kext and sound kext by kext utility

10. restart 1201n

and everything works.

your kext works great.

keypad keys on-off the light

activate-deactivate the keypad.

volume ok

the rest not yet tested.

 

here is my dsdt for 2gb ram

 

Where did you install it, Extra or S/L/E ?

Link to comment
Share on other sites

For 1201N users, take a look in my DSDT, I've extended the _BCL method to get 93 levels instead of the 16 original. OSX works greater with more levels. (_BCL, _BCM and _BQC shall be taken as a whole)

Is this DSDT otherwise the same as the latest one going around on the 1201n thread? The one adapted by VMonHeros to allow for chameleon's cpu energy management? 2GB of RAM or 4?

 

 

Innovative work! The hotkeys thing could be handled by unloading/reloading kexts after sleep, but this is neat.

Link to comment
Share on other sites

Great work with the hotkeys. I was already on 10.6.6 so i just deleted Asus hot keys, ran Kext Util, installed IOWMIFamily.kext through Kext Util, rebooted. Lost trackpad and BT so reran Kext Util and rebooted. Working sweet as can be now even after sleep. Thank you :)

 

What sort of temps is your 1201N's kicking out? According to IStat menus Im hitting 70c under load with an idle of high 40s c. Im on 4gb DSDT VMonHeros with the 32 bit Kernel. Had it shut down on me last night while watching a 480p flash video.

Link to comment
Share on other sites

I made the changes to the DSDT. I though mrd752002 had them but he didn't. The hotkey notification works but the display preference slider doesn't, I included by DSDT in case I screwed up. As well could there be a chance to get itunes hotkeys working? No hurry cause I use Bowtie to bind windows-arrow keys to use itunes anyways.

 

dsdt.aml.zip

Link to comment
Share on other sites

Great work with the hotkeys. I was already on 10.6.6 so i just deleted Asus hot keys, ran Kext Util, installed IOWMIFamily.kext through Kext Util, rebooted. Lost trackpad and BT so reran Kext Util and rebooted. Working sweet as can be now even after sleep. Thank you ;)

 

What sort of temps is your 1201N's kicking out? According to IStat menus Im hitting 70c under load with an idle of high 40s c. Im on 4gb DSDT VMonHeros with the 32 bit Kernel. Had it shut down on me last night while watching a 480p flash video.

 

My CPU temps is around 40/50°C with max at 62°C (cpu benchmark). GPU is around 55°C. All mesurment made with internal diodes.

The thermal zone is DSDT reports very high temp in windows and linux too. I Think it is not accurate.

Link to comment
Share on other sites

I've also injected this in the GPU scope:

                        "AAPL,backlight-control",
                       Buffer (0x04)
                       {
                           0x01, 0x00, 0x00, 0x00
                       },

                       "AAPL,BacklightRestore",
                       Buffer (0x04)
                       {
                           0x01, 0x00, 0x00, 0x00
                       },

                       "AAPL01,BacklightIntensity",
                       Unicode ("N"),

I don't know if it is absolutely needed.

Hello, what do you mean by "GPU Scope" ?

In which section of the DSDT i have to insert the entry above?

I've tried to search GPU in my DSDT, but I cannot find any section with that name....

Link to comment
Share on other sites

Hello, what do you mean by "GPU Scope" ?

In which section of the DSDT i have to insert the entry above?

I've tried to search GPU in my DSDT, but I cannot find any section with that name....

 

open Terminal and type:

ioreg -rtbSk AppleDisplayType

 

You should obtain something like that:

+-o Root <class IORegistryEntry>

 

+-o MacBookAir2,1 <class IOPlatformExpertDevice>

 

+-o AppleACPIPlatformExpert <class AppleACPIPlatformExpert>

 

+-o PCI0@0 <class IOACPIPlatformDevice>

 

+-o AppleACPIPCI <class AppleACPIPCI>

 

+-o IXVE@10 <class IOPCIDevice>

 

+-o IOPCI2PCIBridge <class IOPCI2PCIBridge>

 

+-o IGPU@0 <class IOPCIDevice>

 

+-o NVDA,Display-A@0 <class IONDRVDevice>

 

+-o NVDA <class NVDA>

 

+-o display0 <class IODisplayConnect>

 

+-o ACPIBacklightDisplay <class ACPIBacklightDisplay>

 

The GPU is the last device of class IOPCIDevice

Use the classic _DSM method to inject the properties.

Link to comment
Share on other sites

I made the changes to the DSDT. I though mrd752002 had them but he didn't. The hotkey notification works but the display preference slider doesn't, I included by DSDT in case I screwed up. As well could there be a chance to get itunes hotkeys working? No hurry cause I use Bowtie to bind windows-arrow keys to use itunes anyways.

 

dsdt.aml.zip

 

I've found this modified voodoo driver with the other Fn keys working (play, FF, FB, stop?, numeric keypad)

http://osx86.co/f36/voodoops2-optimized-fo...nd-tiger-t6814/

 

I'm not using any voodooPS2 driver, all I've found works great but after some minutes my system didn't respond to mouse/keyboard events... Strange since others didn't have this problem on the same hardware.

Link to comment
Share on other sites

I made the changes to the DSDT. I though mrd752002 had them but he didn't. The hotkey notification works but the display preference slider doesn't, I included by DSDT in case I screwed up.

dsdt.aml.zip

 

You have not added good properties in the IGPU device _DSM method, copy them from my DSDT or follow instruction on the topic top post !

Link to comment
Share on other sites

Hey, HotKoffy.

I'm using your DSDT (from the first post of this topic), and have this problem: The hotkey brightness indicator shows up, but the white bars don't increase or decrease. The slider doesn't work either. The

 

Before i modify my original DSDT, can you think of why this might be happening?

Link to comment
Share on other sites

Hey, HotKoffy.

I'm using your DSDT (from the first post of this topic), and have this problem: The hotkey brightness indicator shows up, but the white bars don't increase or decrease. The slider doesn't work either. The

 

Before i modify my original DSDT, can you think of why this might be happening?

 

Some words are missing in your post... Dificult to respond ;)

 

Do you have the original 2 Go of RAM ?

Can you post your modify DSDT ?

Link to comment
Share on other sites

Hey, HotKoffy.

I'm using your DSDT (from the first post of this topic), and have this problem: The hotkey brightness indicator shows up, but the white bars don't increase or decrease. The slider doesn't work either. The

 

Before i modify my original DSDT, can you think of why this might be happening?

 

An idea: I have renamed the device in my DSDT

 

in :

Method (_BCM, 1, NotSerialized)
{
Alias (^^^^LPCB.EC.PWAC, PWAC)
Store (SizeOf(PWAC), Local0)
While (Local0)
{
Decrement (Local0)
Store (DerefOf (Index (PWAC, Local0)), Local1)
If (LGreaterEqual (Arg0, Local1))
{
Store (Local0, LBTN)
Break
}
}
^^^^LPCB.EC.ECBR (Arg0)
}

Method (_BQC, 0, NotSerialized)
{
Alias (^^^^LPCB.EC.PWAC, PWAC)
Store(GNVS (0x4498), local0)
Return (DerefOf (Index (PWAC, local0)))
}

 

Replace:

  • "EC" by "EC0"
  • "LPCB" by "SBRG"

Link to comment
Share on other sites

  • 2 weeks later...

Sorry! :huh:

The problem: The brightness slider stays at its maximum extremity (OSX thinks the brightness is always max).

The BIOS still controls brightness, but the Hotkey displays no change.

 

I've attached my DSDT, and also images of the problem. Please check it out.

 

post-557982-1301908057_thumb.pngpost-557982-1301907956_thumb.png

 

dsdtNewton.dsl.zip

 

PS- Yes, I have 2GB. And yes, I changed those device names when I compiled...

Link to comment
Share on other sites

Sorry! :)

The problem: The brightness slider stays at its maximum extremity (OSX thinks the brightness is always max).

The BIOS still controls brightness, but the Hotkey displays no change.

 

I've attached my DSDT, and also images of the problem. Please check it out.

 

post-557982-1301908057_thumb.pngpost-557982-1301907956_thumb.png

 

dsdtNewton.dsl.zip

 

PS- Yes, I have 2GB. And yes, I changed those device names when I compiled...

 

I've watched your DSDT and you have two times injecting properties with _DSM method in IGPU, one in the device declaration, the 2nd in a Scope (IXVE.IGPU) block.

I don't know what is happening but I think only one is executed and I guess the wrong : without @0,AAPL,boot-display.

 

You can verify if the driver is loaded with ioreg | grep Display or look in kernel messages (dmesg or with Console.app.

Link to comment
Share on other sites

Hello I have got another issue, if I install this kext my monitor doesn't start! I mean that after loading OSX will not starts and the monitor stays black! Someone have any idea? For fix this and reboot my osx, I boot with -x and remove the kext.

 

Which version of osx do you use ?

Link to comment
Share on other sites

Hello I have got another issue, if I install this kext my monitor doesn't start! I mean that after loading OSX will not starts and the monitor stays black! Someone have any idea? For fix this and reboot my osx, I boot with -x and remove the kext.

You've not made changes to your DSDT, I'm guessing.

Use HotKoffy's (brilliant) DSDT from his first post, if you don't know how to modify your current DSDT. Replace the one in your /Extra folder, and change com.apple.boot.plist accordingly. Or, ignore the plist, and just rename the new DSDT to the same as the original one in your Extra folder.

 

I don't know what is happening but I think only one is executed and I guess the wrong : without @0,AAPL,boot-display.

Cool. Trying it right now.

Link to comment
Share on other sites

Ookay, Hotkoffy. This has gone mostly beyond my stack of knowledge, and I'm relying on you pretty blindly. ;)

 

I've corrected my DSDT, but that doesn't change anything. Now I'm using YOUR DSDT, and the problem still persists.

 

This is my 'ioreg | grep display' output:

	| |   |	 +-o NVDA,Display-A@0  <class IONDRVDevice, id 0x1000002d9, regi$
| |   |	 |   +-o display0  <class IODisplayConnect, id 0x10000039c, regi$
| |   |	 |   | +-o AppleBacklightDisplay  <class AppleBacklightDisplay, $
| |   |	 +-o NVDA,Display-B@1  <class IONDRVDevice, id 0x1000002da, regi$
| +-o IODisplayWrangler  <class IODisplayWrangler, id 0x100000121, register$

Is the kext loaded? Is "Apple Backlight Display" what we're looking for? Uhh....

 

Also, I have an AppleBacklight.kext in /S/L/E. If I remove that, the Function keys (for brightness) stop showing anything at all.

 

Just to recap, my issue is this: The kext WORKS, but partially. It displays the little sun symbol when I press Fn+Brightness, but there are no white bars that increase or decrease. And the brightness slider in SysPrefs is always at max.

Link to comment
Share on other sites

  • 2 weeks later...
Ookay, Hotkoffy. This has gone mostly beyond my stack of knowledge, and I'm relying on you pretty blindly. :)

 

I've corrected my DSDT, but that doesn't change anything. Now I'm using YOUR DSDT, and the problem still persists.

 

This is my 'ioreg | grep display' output:

	| |   |	 +-o NVDA,Display-A@0  <class IONDRVDevice, id 0x1000002d9, regi$
 | |   |	 |   +-o display0  <class IODisplayConnect, id 0x10000039c, regi$
 | |   |	 |   | +-o AppleBacklightDisplay  <class AppleBacklightDisplay, $
 | |   |	 +-o NVDA,Display-B@1  <class IONDRVDevice, id 0x1000002da, regi$
 | +-o IODisplayWrangler  <class IODisplayWrangler, id 0x100000121, register$

Is the kext loaded? Is "Apple Backlight Display" what we're looking for? Uhh....

 

Also, I have an AppleBacklight.kext in /S/L/E. If I remove that, the Function keys (for brightness) stop showing anything at all.

 

Just to recap, my issue is this: The kext WORKS, but partially. It displays the little sun symbol when I press Fn+Brightness, but there are no white bars that increase or decrease. And the brightness slider in SysPrefs is always at max.

 

To help, I will need to know what is your laptop model, which version of BIOS, OSX etc, which kext you have added in E/E and S/L/E and put your original dsdt if it not an 1201N and your curent DSDT.

 

In any cases, you didn't need to remove AppleBacklight nor IOGraphicsFamily which are mandatory.

Link to comment
Share on other sites

  • 2 weeks later...
To help, I will need to know what is your laptop model, which version of BIOS, OSX etc, which kext you have added in E/E and S/L/E and put your original dsdt if it not an 1201N and your curent DSDT.

Sorry about that. I have an ASUS 1201N, BIOS version 0326, OSX 10.6.6.

 

I think I may be using more Extensions than I need... These are from /E/E:

Extensions.zip In S/L/E, I have your Backlight and Hotkeys kexts.

 

dsdtNewt.aml.zip

Link to comment
Share on other sites

Sorry about that. I have an ASUS 1201N, BIOS version 0326, OSX 10.6.6.

 

I think I may be using more Extensions than I need... These are from /E/E:

Extensions.zip In S/L/E, I have your Backlight and Hotkeys kexts.

 

dsdtNewt.aml.zip

 

Your DSDT is based on BIOS version 321, look at line 3997:

 

Method (BIOS, 0, Serialized)

{

ShiftLeft (0x03, 0x08, Local0)

Store (0x21, Local1)

Return (Add (Local0, Local1))

}

 

So it is not compliant with your current BIOS v326.

 

It is important to have a patched DSDT based on the bios installed as it is a software interface with the bios, it evolves with it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...