PDA

View Full Version : DSDT editing needed to fix brightness/sleep HP DV3XXX


uninc
02-24-2010, 04:56 AM
I was poking around in the dsdt.aml trying to find what the sleep error and the brightness errors could be for the DV3XXX, and I stumbled upon this interesting info earlier:

projectosx.com/forum/index.php?showtopic=461

specifically post #4. It explains what code is used for controlling the brightness > (BCL) and (BCM). I was comparing our dsdt to others like the Dell 1340 in the above thread and HP 6XXX series here:
www.insanelymac.com/forum/lofiversion/index.php/t135410.html
Compare the (_BCL) ASL Code differences below.
i see a major difference in that their _BCL and _BCM are serialized and the DV3XXX is not. Also, because of this difference the DV3XXX is missing a crucial string of code after "Method (_BCL... Not Serialized)" to the end of the string below.

Does anyone have any idea as to how to read code or better, fix this issue? I believe it is the same problem as our sleep, as 0x80 is code for sleep and 0x02 is code for wake, and the two are always referenced under BCL and BCM.

HP DV3XXX series dsdt:

Device (LCD)
{
Name (_ADR, 0x0110)
Name (_DCS, 0x1F)
Name (_DGS, Zero)
Method (_DSS, 1, NotSerialized)
{
And (GDGS, 0x12, GDGS)
If (And (Arg0, One))
{
Or (GDGS, One, GDGS)
}
}

Name (BCL1, Package (0x0D)
{
0x64,
0x28,
Zero,
0x0A,
0x14,
0x1E,
0x28,
0x32,
0x3C,
0x46,
0x50,
0x5A,
0x64
})
Method (_BCL, 0, NotSerialized)
{
Return (BCL1)
}

Method (_BQC, 0, NotSerialized)
{
Add (BRTL, 0x02, Local0)
Return (DerefOf (Index (BCL1, Local0)))
}

Method (_BCM, 1, NotSerialized)
{
Store (0x02, Local0)
While (LNotEqual (Arg0, DerefOf (Index (BCL1, Local0))))
{
Increment (Local0)
}

Subtract (Local0, 0x02, BRTL)
}
}

HP Pavilion 6XXX Series dsdt:



Device (C1AD)
{
Method (_ADR, 0, Serialized)
{
Return (C163 (Zero))
}

Method (_DCS, 0, NotSerialized)
{
Return (C15B (Zero))
}

Method (_DGS, 0, NotSerialized)
{
Return (C15C (Zero))
}

Method (_DSS, 1, NotSerialized)
{
C167 (Zero, Arg0)
}

Name (C1AE, Package (0x0D)
{
0x64,
0x33,
0x1E,
0x25,
0x2C,
0x33,
0x3A,
0x41,
0x48,
0x4F,
0x56,
0x5D,
0x64
})
Name (C1AF, Zero)
Method (_BCL, 0, Serialized)
{
If (LAnd (LEqual (C1AF, Zero), And (C06B, 0x10)))
{
Store (C06D, Local0)
Store (Zero, Local1)
While (LLess (Local1, 0x0B))
{
Store (DerefOf (Index (Local0, Local1)), Local2)
Multiply (Local2, 0x64, Local3)
Divide (Add (Local3, 0x7F), 0xFF, Local4, Local2)
Store (Local2, Index (C1AE, Add (Local1, 0x02)))
Increment (Local1)
}

Store (DerefOf (Index (C1AE, 0x05)), Index (C1AE, One))
Store (Local2, Index (C1AE, Zero))
Store (One, C1AF)
}

Return (C1AE)
}

Name (C1B0, 0x64)
Method (_BCM, 1, Serialized)
{
Store (Zero, Local0)
If (LGreater (\C009 (), 0x05))
{
Or (C05A, 0x40, C05A)
Store (One, Local0)
}

Store (Arg0, C1B0)
Store (Match (C1AE, MGE, Arg0, MTR, Zero, 0x02), Local1)
If (LEqual (Local1, Ones))
{
Subtract (SizeOf (C1AE), One, Local1)
}

Subtract (Local1, 0x02, Local1)
If (Local0)
{
Store (Local1, C071)
If (LEqual (C168 (), Zero))
{
C1B1 (0xEA74, 0x04, Local1, Zero, Zero)
}

Signal (C1AB)
}
}

Method (_BQC, 0, Serialized)
{
Store (C1B0, Local0)
Return (Local0)
}
}


any ideas to change DV3XXX so screen dimming/sleep may work?

uman
02-27-2010, 01:55 AM
uninc,

I don't think that's the solution. For example, my DSDT has this (and I have no issue with brightness, either from sleep, or from the keyboard):

Method (_BCL, 0, NotSerialized)
{
Return (\_SB.PCI0.LBCL)
}

Method (_BCM, 1, NotSerialized)
{
\_SB.PCI0.LBCM (Arg0)
}Is your brightness issue one of resuming from sleep, or are you just trying to adjust the brightness from the keyboard? Do you have a PS2 keyboard (typically your DSDT will have a Device (PS2K) entry)?

If the PS2 keyboard dimming, you could try adding the following to the PS2K device:

Method (_DSM, 4, NotSerialized)
{
Store (Package ()
{
// We are telling the system that we have FN keys
"AAPL,has-embedded-fn-keys",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}

uninc
03-02-2010, 05:48 AM
thanks for the reply uman, i dont have a solution. i have a problem.

your post is very helpful, i think you are right about looking in the wrong place.

i dont think the ps2 fix is the issue; however i am going to try it as i dont have that key in the dsdt. i will report back...

uman
03-02-2010, 05:12 PM
uninc,

I'm am still not sure what your issue is. Is it:

1. When returning from sleep, your display doesn't wake up, or the screen is very dim? If so, there's a DSDT fix for that.

2. You can't control the brightness from the keyboard?

3. The keyboard does control the brightness, but the OS X "sun" icon doesn't display? (I have that problem-- when controlling sound from my keyboard, I see the speaker icon, but not when controlling brightness.

Re PS2: If you don't have a PS2K device in your DSDT, then you probably have a USB keyboard and mouse which is good! So I wouldn't add the PS2K device into your DSDT. (The sure way to tell whether you have PS2 keyboard or mouse is if during install, you needed VoodooPS2Controller.kext, or ApplePS2SomethingOrOther.kext.)

I find that the people who are doing the most advanced DSDT work are the Gigabyte mobo folks. Unfortunately there are pages upon pages of cruft to wade through on insanely, not to mention the ACPI Programmers guide, and the datasheets for your motherboard chipset. Even here, the Gigabyte topics are lengthy. But good on them-- they have the passion.

Try using google search to help cut down on the cruft:

site:www.insanelymac.com HP DV3510nr DSDT brightness (http://www.google.com/webhp?hl=en#hl=en&source=hp&q=site%3Awww.insanelymac.com+HP+DV3510nr+DSDT+brig htness)

turned up some of your posts, but also: http://www.insanelymac.com/forum/index.php?showtopic=155318&st=0&p=1095891&#entry1095891

You could also try this: http://www.splasm.com/products/productbrightness.html

Hmm, your laptop has an nvidia display right? Can you check if AppleIntegratedFrameBuffer is loaded (use kextstat in terminal). Apparently that kext takes control of brightness (LCD backlight). There's a patch that gets it to relinquish control (see the comment by Timo: http://blog.stuart.shelton.me/archives/209)

Can you post your unmodified (original) DSDT? I'd need to see if your LCD panel has a _DSS method defined to control brightness. Macbooks (and my Gateway) don't. The _DSS method is where you see some people suggesting fixes where they use 0x86, 0x87, 0x89 to cycle, increase, decrease or zero brightness. But that doesn't work unless your hardware is defined that way. The ACPI spec has details on that.

I can't promise that I can examine your DSDT right away (and I made need a gentle nudge as I might forget), since I am installing SL over the next day or two. But I'll try to look into it later this wee or early next week. I'm curious how this wholething works because I'd like to get the litle sun icon to show up on my gateway!

Cheers.

uninc
03-03-2010, 10:20 AM
my battery died on me while the EFI partition was mounted - the EFI was f'd. i had to take out the drive and repair from another mac. so, i haven't tried any of your suggestions yet uman, although i am grateful.

the dv3XXX does use PS2 input, and in the dsdt i believe it is called
Device (KBC)

i have a feeling the (_DSM) addition will not work, but i will try.

to help you understand, sleep does not work at all (contrary to the threads you reference on insanely). I have been active in those for some time now, but they are dead.

sleep does not work. if i push sleep, the monitor shuts off, and ps2 shuts off - thats it. i have to hard restart.

brightness does not work. i am using shades right now - it kills my battery. every other hotkey works (volume, media keys, sleep, print etc...). i checked kextstat and AppleIntegratedFrameBuffer is not loaded.

the dv3XXX is very vanilla, very tasty. its running SL excellent in 64 except for brightness and sleep. i can FEEL it can be fixed via dsdt
here is the original dsdt, unfortunately it is long. ill also attach it:

EDIT : i can only attach it - "the text...is too long"
good luck with your install.
and thank you for the links i will go over them in hopes of discovery

uman
03-03-2010, 11:23 PM
I'm having a hell of a time with my install. No joy today. And my Gateway is very vanilla (my DSDT compares amazingly with a MacBook DSDT).

No luck with prasys' method #1 - USB stick. Tried his second one using Conti's hack. No joy.

I then tried to install thru Leopard onto the external drive (which will be my new hard drive once finished). It dies with a bless error.

So now I'm installing from a MacBook Pro to the external drive. After that, I'm not sure. I think I can just install Chameleon.

uninc
03-04-2010, 09:21 PM
i thought you were allergic to macbooks?!
those are strange failures. have you read this thread? - there is a link to install guide here.

http://www.insanelymac.com/forum/lofiversion/index.php/%22http:/t187471.html

are you dual booting? keep in mind gma950 is only 32 bit and chameleon rc3/4 automatically boots 64.

so i tried adding the PS2 dimming to dsdt and it compiled fine, but it did not solve the problem. and i see that there is a _DSS method in my dsdt, do you have a link that explains adding the cycle commands?

uman
03-05-2010, 04:25 PM
i thought you were allergic to macbooks?!

I can tolerate using them for about 1/2 hr, then I lose sensitivity in my fingertips and my palms itch.

sleep does not work. if i push sleep, the monitor shuts off, and ps2 shuts off - thats it. i have to hard restart.

I think we can fix this in DSDT. But it may take some research into your specific DSDT.

brightness does not work. i am using shades right now - it kills my battery. every other hotkey works (volume, media keys, sleep, print etc...).

I think we can tackle this too, but I think the first step may be just dimming the display. Again, I'll need to study your DSDT, and right now I am caught up with my SL install problems (I've detailed where I am here: http://www.infinitemac.com/f57/help-installed-retail-sl-on-external-usb-hard-t5669/)

the dv3XXX does use PS2 input, and in the dsdt i believe it is called KBC

Please confirm with ioreg that it is indeed a the PS2 device. You should see:

| +-o KBC <class IOACPIPlatformDevice, registered, matched, active, busy 0, retain 8>
| | +-o ps2controller <class AppleACPIPS2Nub, registered, matched, active, busy 0, retain 8>
| | +-o ApplePS2Controller <class ApplePS2Controller, !registered, !matched, active, busy 0, retain 9>
| | +-o ApplePS2KeyboardDevice <class ApplePS2KeyboardDevice, registered, matched, active, busy 0, retain 7>
| | | +-o ApplePS2Keyboard <class ApplePS2Keyboard, registered, matched, active, busy 0, retain 9>
so i tried adding the PS2 dimming to dsdt and it compiled fine, but it did not solve the problem.

Where did you add it? Under KBC? (BTW, I find editing my DSDT to look more Mac-like helps when comparing to ioregs etc of a real mac. So I encourage you to search/replace KBC to PS2K if it's the right device).

and i see that there is a _DSS method in my dsdt, do you have a link that explains adding the cycle commands?

The problem is tracing it down from the keyboard to the change in brightness. As a start, if you just want to dim the display to begin with, you could change the value in the _BCL list (below is from the ACPI 4.0 spec):


Method (_BCL, 0) {
// List of supported brightness levels
Return (Package(7){
80, // level when machine has full power
50, // level when machine is on batteries
// other supported levels:
20, 40, 60, 80, 100}
} The first number in the package is the level of the panel when full power is connected to the machine. The second number in the package is the level of the panel when the machine is on batteries. All other numbers are treated as a list of levels OSPM will cycle through when the user toggles (via a keystroke) the brightness level of the display. These levels will be set using the _BCM method described in the following section.

B.6.3 _BCM (Set the Brightness Level)
This method allows OSPM to set the brightness level of a built-in display output device.

The OS will only set levels that were reported via the _BCL method. This method is required if _BCL is
implemented.

Arguments: (1) Arg0 – An Integer containing the new brightness level
Return Value: None
Example:

Method (_BCM, 1) { // Set the requested level } The method will be called in response to a power source change or at the specific request of the end user, for example, when the user presses a function key that represents brightness control.

uninc
03-08-2010, 03:02 AM
uman, glad you succeeded with SL.

i have replaced KBC with PS2K and compiled w/o error-there is no visible difference yet.

ive been reading the ACPIspec sheet, but don't really know where to start in understanding my own dsdt. indeed it prol'y needs to be looked at in order to edit the brightness and sleep issues.

i have tried adding the values you referenced in the ACPIspec but can't compile w/o errors. i don't really know how or where to edit. can you help?

Device (LCD)
{
Name (_ADR, 0x0110)
Name (_DCS, 0x1F)
Name (_DGS, Zero)
Method (_DSS, 1, NotSerialized)
{
And (GDGS, 0x12, GDGS)
If (And (Arg0, One))
{
Or (GDGS, One, GDGS)
}
}

Name (BCL1, Package (0x0D)
{
0x64,
0x28,
Zero,
0x0A,
0x14,
0x1E,
0x28,
0x32,
0x3C,
0x46,
0x50,
0x5A,
0x64
})
Method (_BCL, 0, NotSerialized)
{
Return (BCL1)
}

Method (_BQC, 0, NotSerialized)
{
Add (BRTL, 0x02, Local0)
Return (DerefOf (Index (BCL1, Local0)))
}

Method (_BCM, 1, NotSerialized)
{
Store (0x02, Local0)
While (LNotEqual (Arg0, DerefOf (Index (BCL1, Local0))))
{
Increment (Local0)
}

Subtract (Local0, 0x02, BRTL)
}
}

uman
03-08-2010, 12:26 PM
Please post the two dsdts: the one that compiles okay with PS2K, and the broken one. I should be able to take a look midday.

uninc
03-08-2010, 10:55 PM
Please post the two dsdts: the one that compiles okay with PS2K, and the broken one. I should be able to take a look midday.

the broken dsdt is b/c i dont know how to edit the BCL & BCM, so
i only have one dsdt that needs working on...
do you know what i am saying?

uman
03-10-2010, 12:25 PM
the broken dsdt is b/c i dont know how to edit the BCL & BCM, so i only have one dsdt that needs working on...
do you know what i am saying?

Yes, you said your edits didn't compile. But still it's useful to me to see the edits. I wasn't able to look at this yesterday, but should be able today. I had a strange result yesterday that may be useful for a clue as to why brightness controls are such an issue for Darwin.

I was editing my DSDT to take out parts that were specific for older parts of Windows. I also enabled for Darwin, anything that was specific to Windows 2006. When I rebooted, everything seemed pretty much the same, except I no longer had the brightness controls, which are mapped to the Fn-up, and fn-down arrows.

So I plan to analyze what changed, and then see if I can make them come back. I then may have something useful for you to try.

uman
03-12-2010, 01:56 AM
I spent a couple of hours looking at your DSDT the acpi spec and my dsdt (mine is relatively clean, and tracks the mac pretty well). The bad news is that yours is a hideous monstrosity. It's massive-- more than double the size of a macbook dsdt, and several thousand lines more than mine. Plus it implements a WMID interface (see: http://www.wilsonmar.com/1wmiwbem.htm) and even as checks to make sure the BIOS isn't modified. It also seems to deliberately obfuscate some things-- I believe to lock down some aspects of HP laptops.

So while I did manage to understand some things about the brightness settings, I couldn't suggest anything for you to try, other than running it through a recent DSDT patcher and telling the patcher to emulate Windows Vista or Windows 7. Then you could try that version to see if it helps.

Alternatively, you can search Linux forms for the same issue and for the same laptop. They will likely have the same problem, however, your DSDT specifically checks for Linux. So you could also try "pretending" OS X is Linux in the DSDT and see if that helps.

uninc
03-13-2010, 09:35 AM
well that is dissappointing . thanks for looking it over uman.

i tried a vista dsdt with the same result.

the bios is modified, removing the original whitelists. it is from the insanely thread referenced earlier.
there is someone who is using an asus bios for a hp dv3xxx; it was a solution that predated the modified bios. the asus specs are almost identical to my hp. what are the chances the dsdt may solve the sleep/lcd issues using that asus bios?

uman
03-13-2010, 02:03 PM
well that is dissappointing . thanks for looking it over uman.

i tried a vista dsdt with the same result.

the bios is modified, removing the original whitelists. it is from the insanely thread referenced earlier.
there is someone who is using an asus bios for a hp dv3xxx; it was a solution that predated the modified bios. the asus specs are almost identical to my hp. what are the chances the dsdt may solve the sleep/lcd issues using that asus bios?

I would get in touch with that person and find out what the issues were. I hesitate to advise you here because I don't want anything to happen to your system. And given that certain device registers are memory mapped via a DSDT, it may be possible that changes could be made that are difficult to recover from.

kizwan
03-29-2010, 08:01 AM
Hi uman,

Can you post your dsdt? I'm trying to enable display dimming function on my acer, not for Mac OS X but for windows. Brightness hotkey is working perfectly in both OSes but display dimming when idle or when on battery is not available. I'm trying to achieve that in windows. I'm manage to go as far as showing "Adjust screen brightness" at battery indicator but brightness didn't change at all when changing the slider position. The slide also move when power cord attached or detached. I think it missing proper "Return" or "Notify" command in _BCM method.

kizwan

uman
03-29-2010, 04:29 PM
Kiz,

Here they are. I've included the unmodified, original one, and my latest. I seem to remember, in Leopard, that my display would dim when I removed the power cord, but now it does not. However, note that I don't have battery working (VoodooBattery panics, and I am using NullCPUPowerManagement). I don't plan to fix the battery issue because my battery is shot anyway. I suspect that display dimming is tied up to proper PM functioning.

I suspect it would be trivial for me to get dimming to work, since it is clear that Darwin does respond to the _BCM method. Right now if I hit Fn-F8, which on the Gateway has a dim/bright sun icon, the display dims or brightens.

In the DSDT, you'll see that it's using the _Q11 query method.

I don't think the Gateway's LBCM method (which implements what _BCM calls) is implemented very cleanly. I liked the design in uninc's HP dsdt better, but I don't have much interest in fixing the gateway's one. So you might also want to look at the HP one of uninc.

kizwan
03-29-2010, 05:59 PM
Thank you uman for the dsdt.

I see you apply fix for restart/shutdown. Before applying the fix, which one do you have problem, shutdown or restart or both? I have problem with restart & currently using openhaltrestart.kext to fix the issue.

I added PNLF (backlight) in my dsdt but it didn't do anything. The slider in System Preferences always set to maximum & I can't change it. It will always back to maximum position whenever I try to change it. Brightness/backlight doesn't change at all. It make sense since in IORegistryExplorer, min & max value is 0x00. But since Fn key to adjust brightness is working, I don't care much about this.

I have added uninc's DSDT for _BCL, _BCM & _BQC in my dsdt. Will know if dimming working or not in windows after flashing it to BIOS. :) This kinda difficult because it doesn't exist in my dsdt before. Looks like my acer doesn't use 0x86, 0x87 to control brightness.

As for battery, our machine don't have smart battery (we have control method battery). So trying to apply smart battery in dsdt (to get it detected in Mac OS X) will be waste of time. This what I learn when trying to do it. :p

I didn't apply PWRB in my dsdt because it seems mine will be "generated" by SLPB. So, in IORegistryExplorer it will list "power-button" instead PWRB. I think it works in Mac OS X because when pressing the power button, I will be presented with sleep, restart & shutdown button.

I see you identified a lot of acronym/variable used in your DSDT. Nice. :)

kizwan

valv
04-01-2010, 01:27 PM
hi all,
last days I was playin' with dsdt adding pnlf device and I ended up with the Backlight kext getting loaded fine, I can even use Fn+scroll & Fn+pause to make the sun shine, but it seems there's no values to switch to/from. To be clear, on IORegistryExplorer I get this:
1180
Does anybody over here know how to change these values?

uman
04-01-2010, 03:34 PM
Your picture is too low-res, but no matter. I have PNLF, and AppleBacklightDisplay and the values check against a MacBook. The issue is that the brightness/sun is controlled thru AppleIntegratedFrameBuffer (you'll note that AppleBacklightDisplay loads under display in ioreg).

It's possible that some sort of patching of AppleIntegratedFrameBuffer might work. For example, the Asus guys reported a patch for 10.5 that disabled brightness control in AppleIntegratedFrameBuffer, which allowed them to control it via ACPI and the ASUS bios. See here: http://ipis-osx.wikidot.com/forum/t-91753/brightness-control

uninc: this may work for you if you're NOT using SL. It might work for SL, but you'd have to figure out how: http://myhpmini.com/forum/viewtopic.php?t=1542

hi all,
last days I was playin' with dsdt adding pnlf device and I ended up with the Backlight kext getting loaded fine, I can even use Fn+scroll & Fn+pause to make the sun shine, but it seems there's no values to switch to/from. To be clear, on IORegistryExplorer I get this:
Does anybody over here know how to change these values?

uman
04-01-2010, 03:45 PM
I see you apply fix for restart/shutdown. Before applying the fix, which one do you have problem, shutdown or restart or both? I have problem with restart & currently using openhaltrestart.kext to fix the issue.

I don't recall, but I think both. It pretty much works now (both shutdown & restart), but occasionally fails. I am no longer using EvoReboot. I have been using Conti's patched ChamRC4 (see here: http://osx86.sojugarden.com/2010/03/chameleon_v2-0-rc4_aserebln_myhack_v1-0-r111/) which includes the rekursor restart fixes. I'm not sure if it's the DSDT changes I made, or the Conti RC4, or both that (mostly) solves the issue for me.

I added PNLF (backlight) in my dsdt but it didn't do anything. The slider in System Preferences always set to maximum & I can't change it. It will always back to maximum position whenever I try to change it. Brightness/backlight doesn't change at all. It make sense since in IORegistryExplorer, min & max value is 0x00. But since Fn key to adjust brightness is working, I don't care much about this.

I have reasonable values in IORegistryExplorer, but the slider doesn't work for me either. I believe it's because AppleIntegratedFrameBuffer is trying to directly adjust the brightness. I too don't care, since my function keys work (but not the ones with the Apple Sun icon).

I have added uninc's DSDT for _BCL, _BCM & _BQC in my dsdt. Will know if dimming working or not in windows after flashing it to BIOS. :) This kinda difficult because it doesn't exist in my dsdt before. Looks like my acer doesn't use 0x86, 0x87 to control brightness.

If the Acer is using AMW0 for this, then you may need to disable that part.

I see you identified a lot of acronym/variable used in your DSDT. Nice. :)kizwan

Thanks. I only wish there were more standards for DSDT names.

valv
04-01-2010, 08:17 PM
Thank u uman for this link, it is really helpful for patching the Framebuffer kext; but when it comes to keeping the system totally vanilla, do u know how to load the patched kext (from /E/E maybe) without altering the original one ?

btw: sorry for the pic, corrected!

kizwan
04-01-2010, 08:39 PM
If the Acer is using AMW0 for this, then you may need to disable that part.
I will look in AMW0 section then. Thanks.

kizwan

uninc
04-05-2010, 12:55 AM
uninc: this may work for you if you're NOT using SL. It might work for SL, but you'd have to figure out how: http://myhpmini.com/forum/viewtopic.php?t=1542


thanks for the link uman ; it was v informative, as was the asus link too. it didnt work though :( but maybe someone else over at insanely will be able to provide more insight into a hp dv3xxx hex conflict b/w apple...frambuffer.kext and the dsdt on 10.5

I am using 10.6, but the changes for apple...framebuffer were relevant and appropriate. it just didnt change anything, which leads me to believe that something needs to change in the dsdt, because the Fn + Fx works for other keys like media and sleep (which doesnt actually work either, but it tries)

mtest
08-10-2010, 08:51 PM
I added PNLF (backlight) in my dsdt but it didn't do anything. The slider in System Preferences always set to maximum & I can't change it. It will always back to maximum position whenever I try to change it. Brightness/backlight doesn't change at all. It make sense since in IORegistryExplorer, min & max value is 0x00. But since Fn key to adjust brightness is working, I don't care much about this.


Hi Kizwan,
I have a similar problem, although not exactly the same, on my Samsung N130 based hackintosh running SL X.6.3.

The brightness control works fine, either through the control panel or via the Fn key, but the system does not "remember" my settings, and set it all the way back to the maximum at each boot.

Not a big issue since I can easily lower the brightness as soon as I reach the desktop via the Fn key, but it's somewhat annoying on the long run.

I also tried to patch the AppleIntelIntegratedFramebuffer to bypass the hwBacklight function but just like you it didn't help (it's a pity because I was so sure this would fix the problem)...

It seems clear that the problem is with one of the last drivers to be loaded before showing the desktop, because during the boot, while the grey screen with the apple logo is shown, the brightness is OK, but just before showing the background picture I can clearly see the brightness being boosted to the max.

I really don't know where to look now, I saw some references to AppleBacklightAtBoot in the AppleBacklight.kext, not sure if this could be a clue.

Please please please, do let me know if you finally managed to fix this problem.

Thank you very much.

PS: Here are some interesting things from ioreg... Don't know how to work with that...

| | | | +-o display0 <class IODisplayConnect, id 0x0, registered, matched, active, busy 0 (36 ms), retain 5>
| | | | | | {
| | | | | | }
| | | | | |
| | | | | +-o AppleBacklightDisplay <class AppleBacklightDisplay, id 0x0, registered, matched, active, busy 0 (5 ms), retain 6>
| | | | | {
| | | | | "DisplayVendorID" = 0x25cc
| | | | | "IODisplayConnectFlags" = <00080000>
| | | | | "IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/GFX0@2/AppleIntelFramebuffer/display0/AppleBacklightDisplay-25cc-d"
| | | | | "IODisplayParameters" = {"commit"={"reg"=0x0},"brightness"={"max"=0x80,"min"=0x0,"value"=0x9},"ggsc"={"min"=0x0,"max"=0x10000,"value"=0x10000},"bgsc"={"min"=0x0,"max"=0x10000,"value"=0x10000},"rgsc"={"min"=0x0,"max"=0x10000,"value"=0x10000}}
| | | | | "CFBundleIdentifier" = "com.apple.iokit.IOGraphicsFamily"
| | | | | "IOClass" = "AppleBacklightDisplay"
| | | | | "IOProbeScore" = 0xbb8
| | | | | "DisplayProductID" = 0xd
| | | | | "IOMatchCategory" = "IODefaultMatchCategory"
| | | | | "IOPowerManagement" = {"DevicePowerState"=0x3,"CurrentPowerState"=0x3}
| | | | | "IODisplayEDID" = <00ffffffffffff0025cc0d00000000000013010380160c780a 408593595693271b5054000000010101010101010101010101 01010101e41600e34158302030203600de7d00000018000000 000000000000000000000000000000000000fe00494e4c0a20 2020202020202020000000fc0042543130314957303356310a 20009b>
| | | | | "IOProviderClass" = "IODisplayConnect"
| | | | | "IODisplayGUID" = 0x610000000000000
| | | | | }


and

| +-o PNLF <class IOACPIPlatformDevice, id 0x0, registered, matched, active, busy 0 (653 ms), retain 7>
| | | {
| | | "AppleBacklightAtBoot" = 0xe6
| | | "ApplePanelRawBrightness" = 0x1d50
| | | "name" = <4150503030303200>
| | | "AppleMaxBrightness" = 0x753e
| | | "_UID" = "10"
| | | "compatible" = <6261636b6c6967687400>
| | | "ApplePanelRawTable" = <00004e1d4e1d4e1d4e1d4e1d4e1d4e1d4e1d501dd61d5e1ee4 1e6c1ff21f7a2002218821102296221e23a6232c24b4243a25 c2254a26d0265827de276628ec287429fc29822a0a2b902b18 2ca02c262dae2d342ebc2e442fca2f5230d8306031e8316e32 f6327c3304348a3412359a352036a8362e37b6373e38c4384c 39d2395a3ae23a683bf03b763cfe3c843d0c3e943e1a3fa23f 2840b0403841be414642cc425443dc436244ea447045f84580 4606478e47144$
| | | "_STA" = 0xb
| | | }
| | | }
| | |
| | +-o AppleIntelPanelA <class AppleIntelPanelA, id 0x0, !registered, !matched, active, busy 0, retain 5>
| | {
| | "IOProviderClass" = "IOACPIPlatformDevice"
| | "IOMatchCategory" = "IODisplayParameters"
| | "IONameMatched" = "backlight"
| | "IONameMatch" = "backlight"
| | "IOProbeScore" = 0x7d0
| | "IODisplayParameters" = {"commit"={"reg"=0x0},"brightness"={"max"=0x80,"min"=0x0}}
| | "ApplePanels" = {"F10T9caaM"=<0011000a00100016001e00270031003b004a005c0064006e00 7c008e00a500be00cd00d80100>,"F10T9cb0"=<001100000024002b0036004300540068008300a600cb00fa01 35017d01d8024802d50386>,"F10P9c93"=<0045004e00ce00ff>,"F10T9cd1M"=<001100000022002c0036004600580072009400bc00e6011a01 5c01ab020a0282031603ce0400>,"F10P9c5b"=<0000003e01070128>,"F10T9ca8M"=<00110000002d003800440054006$
| | "CFBundleIdentifier" = "com.apple.driver.AppleBacklight"
| | "IOClass" = "AppleIntelPanelA"
| | }

kizwan
08-11-2010, 04:36 AM
Hi Kizwan,
I have a similar problem, although not exactly the same, on my Samsung N130 based hackintosh running SL X.6.3.

The brightness control works fine, either through the control panel or via the Fn key, but the system does not "remember" my settings, and set it all the way back to the maximum at each boot.

PNLF control method doesn't work for my Acer Aspire 9420. You might want to try display override (http://www.insanelymac.com/forum/index.php?showtopic=208410). It may help Mac OS X to recognized your display better hence fix the backlight issue. I think I have read somewhere about this issue (backlight reset to max) but can't remember where. It is known issue but I don't know if there is a workaround for it.

mtest
08-11-2010, 11:25 AM
Ok, thanks for your reply. I will open an other thread on my problem since it looks specific.

doabit
08-17-2010, 04:02 AM
uninc,

I'm am still not sure what your issue is. Is it:

1. When returning from sleep, your display doesn't wake up, or the screen is very dim? If so, there's a DSDT fix for that.

2. You can't control the brightness from the keyboard?

3. The keyboard does control the brightness, but the OS X "sun" icon doesn't display? (I have that problem-- when controlling sound from my keyboard, I see the speaker icon, but not when controlling brightness.

Re PS2: If you don't have a PS2K device in your DSDT, then you probably have a USB keyboard and mouse which is good! So I wouldn't add the PS2K device into your DSDT. (The sure way to tell whether you have PS2 keyboard or mouse is if during install, you needed VoodooPS2Controller.kext, or ApplePS2SomethingOrOther.kext.)

I find that the people who are doing the most advanced DSDT work are the Gigabyte mobo folks. Unfortunately there are pages upon pages of cruft to wade through on insanely, not to mention the ACPI Programmers guide, and the datasheets for your motherboard chipset. Even here, the Gigabyte topics are lengthy. But good on them-- they have the passion.

Try using google search to help cut down on the cruft:

site:www.insanelymac.com HP DV3510nr DSDT brightness (http://www.google.com/webhp?hl=en#hl=en&source=hp&q=site%3Awww.insanelymac.com+HP+DV3510nr+DSDT+brig htness)

turned up some of your posts, but also: http://www.insanelymac.com/forum/index.php?showtopic=155318&st=0&p=1095891&#entry1095891

You could also try this: http://www.splasm.com/products/productbrightness.html

Hmm, your laptop has an nvidia display right? Can you check if AppleIntegratedFrameBuffer is loaded (use kextstat in terminal). Apparently that kext takes control of brightness (LCD backlight). There's a patch that gets it to relinquish control (see the comment by Timo: http://blog.stuart.shelton.me/archives/209)

Can you post your unmodified (original) DSDT? I'd need to see if your LCD panel has a _DSS method defined to control brightness. Macbooks (and my Gateway) don't. The _DSS method is where you see some people suggesting fixes where they use 0x86, 0x87, 0x89 to cycle, increase, decrease or zero brightness. But that doesn't work unless your hardware is defined that way. The ACPI spec has details on that.

I can't promise that I can examine your DSDT right away (and I made need a gentle nudge as I might forget), since I am installing SL over the next day or two. But I'll try to look into it later this wee or early next week. I'm curious how this wholething works because I'd like to get the litle sun icon to show up on my gateway!

Cheers.


Hi..my ASUS N61 . When returning from sleep, your display doesn't wake up.....

"1. When returning from sleep, your display doesn't wake up, or the screen is very dim? If so, there's a DSDT fix for that."

i can't find the DSDT fix for it!! can you help me ?? thank you !

Paranoid1
08-25-2010, 05:04 PM
Hi mtest,

You state
The brightness control works fine, either through the control panel or via the Fn key, but the system does not "remember" my settings, and set it all the way back to the maximum at each boot.....

.....I too have an Samsung N130 and was wondering if you can help.

I cannot change the brightness via the Fn keys. When I press Fn+UP arrow or Fn+DOWN arrow, nothing happens. I can change the brightness via the control panel immediately after a full reboot but it does not remember the state on the next restart or after sleep (I just get Max brightness like you).

But if I can get the Fn+UP and Fn+DOWN arrow keys to work then I can live with that. Any hint would be appreciated.
thx.

Paranoid1
09-03-2010, 11:35 AM
bump....
anyone ???