Jump to content

UPDATED 20.12. GenericBrightness.kext


ivik
 Share

674 posts in this topic

Recommended Posts

It would be better if you get your native slider working and use PNLF driver.
yes, that would be best bet. Anyway. I'd like to thank you for all the time spent on this. I know I did abuse much of it lastly. So Thank you dear.
Link to comment
Share on other sites

Why don't you give valv the source code? I'm sure that he will try to locate the problem, because if it fails for someone like valv... more people will see failures as well. In fact it isn't working for me, and no. I'm not using his modified booter.

 

Also. Wouldn't it be nice when the kext worked <i>without</i> having to mod the DSDT?

 

He never asked. I posted source code when somebody was interested.

 

You already have to mod dsdt for PNLF device.

Problem is that a lot of dsdt have multiple brightness methods, some even had it in SSDT.

And there are also dsdt with multiple graphics, where some are disabled. I had pegp, since this laptop comes with nvidia also.

And when you find right graphics, you would have to cycle thru devices under that graphics and find active one.

 

It is too much work with initialisation for simple driver like that.

And when you find everything right, simple thing like osys could prevent brightness methods from working.

 

 

Sory, I didn't saw that you posted here.

Which driver? PNLF or BRGT?

Link to comment
Share on other sites

LOL Some people here are so funny. I mean before I even knew it... Stopped with school, had a sex change, became 3 1/2 decades older, got a couple of children, moved to a new country and got myself a new citizen ship. All in one post. Poof. Just like that. All that simply for being a smart ass 15 year old girl. Ouch!!!

 

@king sofa: Now tell me something. What made you think that MC keeps source code under his hat? As far as I know everything is attached here, in this very forum. And to stop confusion; The in BIOS version of Revolution is basically just a loader, and has nothing to do with Chameleon so please. Stop spreading lies and deception. Thank you.

 

And nowhere did I ask for the source code, but I did make a friendly gesture towards valv. Is that a problem for you?

 

p.s. I was about to add a link to MC's linkedin page but it is gone.

 

@ivik: I tried both. None worked.

Link to comment
Share on other sites

Hey ivik, any ideas about my problem?

I have the slider, tried injecting the pm-info, but still no go. Slider (the native one) still stuck at maximum and won't move.

I have NVIDIA GT 320M on HP DV6t.

 

Second method ("ALL") works, but just like valv, I get kernel panic during load, so I just keep the driver outside /S/L/E or /E/E and load it manually with kextload after boot.

 

For the first method, I tried all combinations in DSDT - no methods, my laptops original methods, and even replacing the methods in GFX0 with your methods from first post.

 

I even tried changing the OS ident to

Store (0x07D6, OSYS)

or another time:

Store (0x07D9, OSYS)

 

Nothing works.

Your help would much appreciated!

 

Attaching my DSDT with just the PNLF method inserted, without additional methods.

Changing LPCB.EC0.BRTL changes the backlight amount.

 

Thanks for all your great work!

 

PS

If the pm-info is not correct for my card, how can I find the proper values? I got it form GT 330M that somebody posted.

dsdt.rar

Link to comment
Share on other sites

LOL Some people here are so funny. I mean before I even knew it... Stopped with school, had a sex change, became 3 1/2 decades older, got a couple of children, moved to a new country and got myself a new citizen ship. All in one post. Poof. Just like that. All that simply for being a smart ass 15 year old girl. Ouch!!!

This was good ;)

Link to comment
Share on other sites

@cparm Sometimes I just can't resist to have some fun ;)
:D

@ivik, am going to try without voodoohda (like u did suggest)

btw, sorry for the hassle!

Link to comment
Share on other sites

Hi all!

Thanks for reopening topic.

Thank you valv for noticing admins.

I saw that a lot of people had problems with dsdt modification and copying methods.
This driver needs only one line of modification in dsdt.
PNLF is still needed, but it should be vanilla. Like in apple dsdt's. .

Device (PNLF)
{
Name (_HID, EisaId ("APP0002"))
Name (_CID, "backlight")
Name (_UID, 0x0A)
Name (_STA, 0x0B)
}
This is only if you have slider working.
Other driver (slider not moving) will have this modification soon. Maybe it fixes problems with panics. :/ (Are they only on 64 bit?)


First you need to find where _BCM, _BCQ and _BCL methods are and what graphics you use, since a lot of dsdt had multiple methods, because there is support for multiple cards in bios.

If your graphics is (for example) GFX0 (search it from ioreg), then you should look for this device in dsdt. Under that device, there are other device (usually LCD, CRT, TV...). Look for the device that has those methods (_BCM, _BCQ and _BCL) and then put Name (_HID, EisaId ("LCD1234")).

Example:
Device (LCD)
{
Name (_ADR, 0x0400)
Name (_HID, EisaId ("LCD1234")) //this must be added
Method (_DCS, 0, NotSerialized)
{
}
Method (_DGS, 0, NotSerialized)
{
}
Method (_BCL, 0, NotSerialized)
{
}
Method (_BCM, 1, NotSerialized)
{
}
Method (_BQC, 0, NotSerialized)
{
}

Edit: link removed, check first page.
Link to comment
Share on other sites

:mellow:

@ivik, am going to try without voodoohda (like u did suggest)

btw, sorry for the hassle!

@Valv, you might already know but if I am not mistaken while using Leopard, I was able to change the brightness with FN key.

I didn't have the slider in Display Preferences but it was somehow working.

 

Also, when I first install Snow Leopard in January. dimming the display was also working on battery mode. But I don't know what happened later that broke this. Are you able to confirm this?

Link to comment
Share on other sites

@ivik,

thank you. I'll try it asap.

@Valv, you might already know but if I am not mistaken while using Leopard, I was able to change the brightness with FN key.

I didn't have the slider in Display Preferences but it was somehow working.

 

Also, when I first install Snow Leopard in January. dimming the display was also working on battery mode. But I don't know what happened later that broke this. Are you able to confirm this?

wow, I never got it to work. Even-though, the on screen-slider was there as soon as you used GraphicsEnabler (because it injects "built-in") and added PNLF device into your DSDT. That gave possibility to interact with the slider using Fn+scroll/pause. But the slider always jumped to max.
Link to comment
Share on other sites

I menaged to get almost fully working native brightness control with DSDT patch. (with help of Bungo)

I can change it using keys (sun logo appears) and I can change it smoothly using slider in system preferences.

I have one problem, when I set it to minimum the backlight is being turned off, and I can't turn it on, only reboot helps.

I found source of that issue. In IOreg in backlight section I have:

max: 0x400

min: 0x0

I think the problem is value 0x0 in minimum and it disables the backlight. It should be something like 0x8. If anyone have an idea how to fix it I would be thankful.

 

I have the same problem. Have you been able to solve it?

Link to comment
Share on other sites

Here is driver for those that can't get native slider in display.pref working.

 

You have to add Name (_HID, EisaId ("LCD1234")) to your LCD device, where _BCM, _BCQ and _BCL are.

No more methods copying. :)

 

It is also added delay on starting driver (30sec). Maybe this could fix KP on boot.

 

Edit: link removed, check first page.

Link to comment
Share on other sites

Here is driver for those that can't get native slider in display.pref working.

...

It is also added delay on starting driver (30sec). Maybe this could fix KP on boot.

thank you for the hard efforts :star_smile:
Link to comment
Share on other sites

Here is driver for those that can't get native slider in display.pref working.

 

You have to add Name (_HID, EisaId ("LCD1234")) to your LCD device, where _BCM, _BCQ and _BCL are.

No more methods copying. :star_smile:

 

It is also added delay on starting driver (30sec). Maybe this could fix KP on boot.

Hi ivik!

Thanks for great work.

This works very well, no kernel panic finally!

But there's a small problem. I found out, that evey time I pool information for brightness with your command line tool, it sets brightness to max - so doing:

./brightness set 20

- this changes the brightness to 20

./brightness get

- this sets brightness back to maximum and spits out number "0"

 

Now if I start your Brightness Menulet.app, it goes back to maximum backlight every 30 seconds (probably the pooling interval in the app is 30 seconds?).

 

Also, after the kext loads (so 30 seconds after I do kextload - it sets backlight to maximum as well)

 

This might also be the cause why my native, vanilla brightness slider won't move?

 

Thanks again. Cheers!

Link to comment
Share on other sites

It all depends on _BCL.

Here is my _BCL:

Method (_BCL, 0, NotSerialized)
{
Return (Package (0x12)
{
0x64, //AC
0x14, //DC
0x14, //first brightness level 20%
0x19,
0x1E,
0x23,
0x28,
0x2D,
0x32,
0x37,
0x3C,
0x41,
0x46,
0x4B,
0x50,
0x55,
0x5A,
0x64 //last 100%
})
}

If I set brightness to 15, this means that brightness would be set to 20. And this is why get returns 20(real hardware brightness from _BQC), and not 15, because we don't have 15 in _BCL, so i serch for first higher value in _BCL table and call _BCM with that value.

There are 2 polls in menulet. 13 when active changing and 30 to update when real brightness was changed (hardware keys, batt)

Brightness get doesn't change brightness, it only reads it.

It looks like your _BQC returns wrong values.

So.. everytime you set to 0 for example, it returns 0, and hardware brightness is set to max (100)?

:/

Vanilla brightness doesn't move when min=max=0.
Is your brightness conrolled with EC?
Link to comment
Share on other sites

 Share

×
×
  • Create New...