Jump to content

UPDATED 20.12. GenericBrightness.kext


ivik
 Share

674 posts in this topic

Recommended Posts

Always?
Maybe _BQC doesn't return brightness level.
Try third driver if you have slider working. Third driver doesnt need _BQC, just for test.

Edit... i see that you don't have slider working.
Try editing _BQC like

Method (_BQC, 0, NotSerialized)
{
Return (0x64)
}

for testing
Link to comment
Share on other sites

It seems the KP problem is with the _BQC method, I edited it like you suggested and it doesn't KP anymore however the brightness still doesn't change and 'brightness get' always returns 100 ( as expected). I tried to change the brightness with the utility and the menu applet but no succes.

 

Thanks for you help.

Link to comment
Share on other sites

OK, still no panic, which is good :). However I still can't change brightness with the utility or the menu applet ( still returns 100). I am going to try to disable the NVDIA driver, and reboot, I think it might be interfering.

My current BRGT device

Device (BRGT)
{
Name (_HID, EisaId ("APP0321"))
Name (_CID, "brightness")
Name (_UID, 0x0A)
Name (_STA, 0x0B)
Method (_BCL, 0, NotSerialized)
{
Store (One, VDRV)
Return (Package (0x0A)
{
0x50,
0x0D,
0x07,
0x0D,
0x14,
0x1E,
0x2D,
0x3C,
0x50,
0x64
})
}

Method (_BCM, 1, NotSerialized)
{
^^PCI0.P0P2.NVID.LCD._BCM (Arg0)
}

Method (_BQC, 0, NotSerialized)
{
Return (0x64)
}
}

I have this in /var/log/kernel.log
Acpi brightness levels:8, lowest brightness:7, highest brightness:100
GenericBrightness: Kernel Control Registered

EDIT: Theory correct, without nvidia driver I can change the brightness with the menu applet
Link to comment
Share on other sites

Do you have OSYS set to 0x07D6?

Somewhere on this topic i posted info about nvidia registers. Try changing them.
Also.. your _BCL is wrong.

Method (_BCL, 0, NotSerialized)
{
Or (VDRV, 0x02, VDRV)
Return (Package (0x0A)
{
0x50,
0x0D,
0x07,
0x0D,
0x14,
0x1E,
0x2D,
0x3C,
0x50,
0x64
})
}
Link to comment
Share on other sites

Concerning the nvidia registers, I used to use a version of nvclock that I modified myself, it worked fine, however it also gave me random kernel panic at boot. That is why I am trying to find an alternative. About the OSYS, I will change them and then I'll get back to you, finally I don't know what you mean about my _BCL being wrong, it comes from a freshly extracted DSDT.

 

Again, thanks for you help ( and your time)

Link to comment
Share on other sites

I don't understand question. ;)

 

If you have multiple _BCM, _BQC. _BCL methods, then find your graphics with ioreg and use methods under that device.

Some dsdt have support for multiple graphics. For example, my acer was also made with nvidia graphics, so it had PEGP device.

Link to comment
Share on other sites

I think I know the reason why I couldnot get the SUN logo when using the DSDT before, I insert the following codes into the GFX0 in DSDT

"@0,built-in", 
							Buffer (One)
							{
								0x01
							},

then the SUN logo shows, but the progress bar is always at 100% as you said.

Really thanks for your great work and teach me so much knowledge.

Link to comment
Share on other sites

i got backlights values into the registry always set to 0 too, i have seen that with my nvidia card i can see that values different from 0 only if i patch the dsdt adding @0,NVTM keys.

I totally ignore what it mean, what i did is to take a real mac ioregistry and tried to add keys until i saw something change into the backlight values.

 

this is the complete patch i did, i use graphicsenabler=yes

btw, all of this at the end of VGA0 device.

 

Ivik, nice job, ty, i used the PNLF device (with _BCL,_BCM and _BQC taken from my original dsdt) and seem to work great.

 

                    Method (_DSM, 4, NotSerialized)
                   {
                       Store (Package (0x34)
                           {
                               "@0,backlight-control", 
                               Buffer (0x04)
                               {
                                   0x01, 0x00, 0x00, 0x00
                               }, 
                               "@0,display-cfg", 
                               Buffer (0x04)
                               {
                                   0x03, 0x01, 0x00, 0x00
                               },
                               "@0,connector-type", 
                               Buffer (0x04)
                               {
                                   0x02, 0x00, 0x00, 0x00
                               },
                               "@0,use-backlight-blanking", 
                               Buffer (0x00)
                               {                                    
                               },
                               "@0,EDID", 
                               Buffer (0x80)
                               {
                                   /* 0000 */    0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 
                                   /* 0008 */    0x30, 0xE4, 0x01, 0xCF, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0010 */    0x00, 0x12, 0x01, 0x03, 0x80, 0x22, 0x13, 0x78, 
                                   /* 0018 */    0x0A, 0xAB, 0xB5, 0x9F, 0x59, 0x54, 0x96, 0x26, 
                                   /* 0020 */    0x16, 0x50, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 
                                   /* 0028 */    0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
                                   /* 0030 */    0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x3E, 0x1C, 
                                   /* 0038 */    0x56, 0xA0, 0x50, 0x00, 0x16, 0x30, 0x30, 0x20, 
                                   /* 0040 */    0x35, 0x00, 0x58, 0xC2, 0x10, 0x00, 0x00, 0x19, 
                                   /* 0048 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0050 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0058 */    0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x4C, 
                                   /* 0060 */    0x47, 0x20, 0x44, 0x69, 0x73, 0x70, 0x6C, 0x61, 
                                   /* 0068 */    0x79, 0x0A, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFC, 
                                   /* 0070 */    0x00, 0x4C, 0x50, 0x31, 0x35, 0x36, 0x57, 0x48, 
                                   /* 0078 */    0x32, 0x2D, 0x54, 0x4C, 0x45, 0x31, 0x00, 0xDC
                               },
[b]                                "@0,NVMT", 
                               Buffer (0x60)
                               {
                                   /* 0000 */    0x0B, 0x03, 0xFF, 0x20, 0x06, 0x10, 0x85, 0x9C, 
                                   /* 0008 */    0xA0, 0x05, 0x84, 0x03, 0x40, 0x06, 0xD0, 0x05, 
                                   /* 0010 */    0xF0, 0x05, 0x00, 0x00, 0x9E, 0x03, 0x87, 0x03, 
                                   /* 0018 */    0x8D, 0x03, 0x00, 0x00, 0xB0, 0x37, 0x4A, 0x05, 
                                   /* 0020 */    0x00, 0x00, 0x01, 0x01, 0xFF, 0x00, 0x00, 0x00, 
                                   /* 0028 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0030 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0038 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0040 */    0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 
                                   /* 0048 */    0x00, 0x00, 0x00, 0x00, 0x40, 0xFF, 0x10, 0x05, 
                                   /* 0050 */    0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0058 */    0x00, 0x08, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00
                               }, [/b]
                               "@0,pwm-info", 
                               Buffer (0x14)
                               {
                                   /* 0000 */    0x01, 0x14, 0x00, 0x64, 0x78, 0x69, 0x00, 0x00, 
                                   /* 0008 */    0x08, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 
                                   /* 0010 */    0x00, 0x04, 0x00, 0x00
                               }, 
                               "AAPL,aux-power-connected", 
                               Buffer (0x04)
                               {
                                   0x01, 0x00, 0x00, 0x00
                               }, 
                               "AAPL,backlight-control", 
                               Buffer (0x04)
                               {
                                   0x01, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,blackscreen-preferences", 
                               Buffer (0x04)
                               {
                                   0x00, 0x00, 0x00, 0x08
                               }, 
                               "AAPL00,DataJustify", 
                               Buffer (0x04)
                               {
                                   0x01, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,Dither", 
                               Buffer (0x04)
                               {
                                   0x00, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,DualLink", 
                               Buffer (0x04)
                               {
                                   0x00, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,Inverter", 
                               Buffer (0x04)
                               {
                                   0x00, 0x00, 0x00, 0x00
                               },
                               "AAPL00,InverterCurrent", 
                               Buffer (0x04)
                               {
                                   0x00, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,InverterFrequency", 
                               Buffer (0x04)
                               {
                                   0x1e, 0x02, 0x00, 0x00
                               }, 
                               "AAPL00,LinkFormat", 
                               Buffer (0x04)
                               {
                                   0x00, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,LinkType", 
                               Buffer (0x04)
                               {
                                   0x00, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,PixelFormat", 
                               Buffer (0x04)
                               {
                                   0x00, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,T1", 
                               Buffer (0x04)
                               {
                                   0x00, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,T2", 
                               Buffer (0x04)
                               {
                                   0x01, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,T3", 
                               Buffer (0x04)
                               {
                                   0xC8, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,T4", 
                               Buffer (0x04)
                               {
                                   0xC8, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,T5", 
                               Buffer (0x04)
                               {
                                   0x01, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,T6", 
                               Buffer (0x04)
                               {
                                   0x00, 0x00, 0x00, 0x00
                               }, 
                               "AAPL00,T7", 
                               Buffer (0x04)
                               {
                                   0x90, 0x01, 0x00, 0x00
                               } 
                           }, Local0)
                       DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                       Return (Local0)
                   }
               }

Link to comment
Share on other sites

Nice!! Could you post your dsdt?

 

Acers usually have nice dsdt. Just to see brightness methods. :(

 

sure, here is, this laptop is a mess, it has two graphic cards and just one works with osx.

just for the record, i can adjust brightness in two ways now, using Fn+left/right (doing this don't affect brightness ioreg values)

and using Fn+F12/Pause (doing this affect brightness ioreg values)

 

dsdt.zip

Link to comment
Share on other sites

Good find Nobb1x :D, with your dsdt suggest, I could controll display dim natively (Fn+F12/Pause)

@Ivik, why I still have got this message console "We still don't have brightness entry in ioreg... waiting" when display dim is working.

Btw Many thanks Ivik and Nobb1x :blink:.

here's my dsdt

dsdt.aml.zip

Link to comment
Share on other sites

I don't understand question. :blink:

 

If you have multiple _BCM, _BQC. _BCL methods, then find your graphics with ioreg and use methods under that device.

Some dsdt have support for multiple graphics. For example, my acer was also made with nvidia graphics, so it had PEGP device.

 

 

Hello,

i guess i thought the dsdt edit were for intel graphics, so i wondered how to do it if you have nvidia. i read somewhere it would be different.

So i am confused, i can't get it to work. here's my latest good dsdt if someone can take a look and see why the brightness won't change.

dsdt_brightness_extras.dsl.txt

Link to comment
Share on other sites

Good find Nobb1x :D, with your dsdt suggest, I could controll display dim natively (Fn+F12/Pause)

@Ivik, why I still have got this message console "We still don't have brightness entry in ioreg... waiting" when display dim is working.

Btw Many thanks Ivik and Nobb1x :).

here's my dsdt

 

Use third driver. I deledet that log from that driver.

Link to comment
Share on other sites

Hello ivik,

I hope you can help me.

 

In my thinkpad there's no way for me to control the brightness of my screen, and neither in the "screen" control panel I have the slider to correct or change lcd brightness.

So everytime I have to change it before the laptop boots into SL, by using the Fn + Home (to raise up brightness) or Fn + End (to lower brightness).

 

I am not keen in making changes to DSDT, I don't want to break up something... so can you tell me what do I have to do?

Can you have a look at my actual DSDT and see if its possible to modify it, to allow me to change brightness in snow leopard? I just want a slider to make it possible to control it otherwise I have to reboot everytime just to change brightness level :)

 

I attach my actual working DSDT here:

 

http://www.mediafire.com/?5bjexyk8zlmg5r2

 

Thanks in advance

Link to comment
Share on other sites

Thank you, ivik! It's fantastic work!

 

Hardware

Dell Inspiron 1525, Intel X3100 graphics working with DSDT patch, LCD 1440x900 (will be different).

EC absent. PNLF was added.

Before

Brightness works only with Fn+Up/Down.

 

Now

Install GenericBrightness.kext with IONameMatch "backlight".

Copy methods _BCL, _BCM, _BQC from LCD device to PNLF device, but change variables to not interfere

					Name (PTVL, 0x64)   // was BTVL
				Name (PBCL, Package (0x0A) {})  //was DBCL

Brightness works by Apple's keys Fn+Scrool/Pause that show me Sun on the screen and also works with slider in Display.prefPanel

 

Very good!

If someone interesting it is my DSDT.

DSDT.dsl.zip

Link to comment
Share on other sites

Thnx.

 

I see that you have same _BCM method's like minihack, but he has nvidia card on his dell vostro 3500 and brightness doesn't change for him.

 

So.. it looks like nvidia driver is messing with brightness.

 

Thnx for sharing.

Link to comment
Share on other sites

Hello,

i guess i thought the dsdt edit were for intel graphics, so i wondered how to do it if you have nvidia. i read somewhere it would be different.

So i am confused, i can't get it to work. here's my latest good dsdt if someone can take a look and see why the brightness won't change.

dsdt_brightness_extras.dsl.txt

 

What is your grpahics from ioreg? POP, GFX0 or?

Link to comment
Share on other sites

 Share

×
×
  • Create New...