Jump to content

UPDATED 20.12. GenericBrightness.kext


  • Please log in to reply
671 replies to this topic

#1
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
Hi all.

There are 2 drivers for brightness:
1.
For those who have apple brightness slider working (max backlight>0 in ioreg) can use GenericBrightness.kext.zip. There is also VoodooPS2Controller with mapped keys for brightness for hp, acer, dell, samsung and lg.
To make native slider work, you need to add PNLF device:
Device (PNLF)        {            Name (_HID, EisaId ("APP0002"))            Name (_CID, "backlight")            Name (_UID, 0x0A)            Name (_STA, 0x0B)        }

After that 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 find that device in dsdt. Under that device, there are other devices (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)                   {                   }


2.
The second one (NoSlider.zip) can control brightness without PNLF. But you still have to add some code to dsdt.
Only Name (_HID, EisaId ("LCD1234")) is needed, like in first method.

In NoSlider there are also 2 apps:
console utility brightness with parameters:

brightness get => returns current brightness
brightness set yourbrightness => sets your brightness (from 0 to 100)
brightness up => one step up (usefull for keyboard mapping)
brightness down => one step down

Second app is Brightness Menulet. It is menubar plugin with slider for setting brightness. :(

Attached Files



#2
sw170

sw170

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:UK
Hi ivik,
thanks for sharing, this sounds promising but it doesn't work with my Pavilion laptop
with PNLF code:
Device (PNLF)        {            Name (_HID, EisaId ("APP0002"))            Name (_CID, "backlight")            Name (_UID, 0x0A)            Name (_STA, 0x0B)            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            })            Method (SBCM, 1, NotSerialized)            {                Store (Arg0, \_SB.PCI0.LPCB.EC.BRTL)                Store (Arg0, Z00B)                TRAP (0x1C)            }                        Method (_BCL, 0, NotSerialized)                        {                            If (LEqual (PTPE, One))                            {                                Return (BCL1)                            }                            Else                            {                                Return (BCL2)                            }                        }                        Method (_BCM, 1, NotSerialized)                        {                            SBCM (Arg0)                        }                        Method (_BQC, 0, NotSerialized)                        {                            Return (\_SB.PCI0.LPCB.EC.BRTL)                        }        }

DSDT file here

thanks in advance for any suggestions

regards
s

#3
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
What does dmesg say about max brightness and levels?

It look like your Pavilion also writes brightness to EC like my acer.
But it is weird that it writes that high values... Mine for 0x64 (100% brightness) writes F (15) to EC (BRTS register).

Try runing RW-everything under windows and watch EC register for changes when brightness is changed.

Also... try with different _BCL return tables... Under _BCL just write:

[codebox]Method (_BCL, 0, NotSerialized)
{
Return (BCL1)
}[/codebox]

#4
piyokos

piyokos

    InsanelyMac Protégé

  • Members
  • Pip
  • 42 posts
  • Location:New York
Can't find PNLF device.

Vostro 3700...

Vanilla DSDT attached.

Thanks

Attached Files



#5
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts

Can't find PNLF device.

Vostro 3700...

Vanilla DSDT attached.

Thanks



Try this dsdt:

Attached Files



#6
darylz

darylz

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts

Try this dsdt:

Both working with slider as well as the sun Plus Fn keys with appropriate dsdt modification and kext in extra
Thnx,
Lg x130,Snow Leopard 10.6.5

#7
Scorpy22

Scorpy22

    InsanelyMac Protégé

  • Members
  • Pip
  • 18 posts
Doesn't work. I've added a PNLF device with _BCM, _BQC, _BCL methods but the slider is stuck at 100%.

Also, I've got the following message in my /var/log/kernel.log

kernel[0]: Acpi brightness levels:8, lowest brightness:7, highest brightness:100 kernel[0]: We still don't have brightness entry in ioreg... waiting......kernel[0]: We still don't have brightness entry in ioreg... waiting...

Here's my DSDT:
MyDSDT

Thanks

#8
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts

Doesn't work. I've added a PNLF device with _BCM, _BQC, _BCL methods but the slider is stuck at 100%.

Also, I've got the following message in my /var/log/kernel.log

kernel[0]: Acpi brightness levels:8, lowest brightness:7, highest brightness:100 kernel[0]: We still don't have brightness entry in ioreg... waiting......kernel[0]: We still don't have brightness entry in ioreg... waiting...

Here's my DSDT:
MyDSDT

Thanks


Slider doesn't move or brightness doesn't change?

#9
Scorpy22

Scorpy22

    InsanelyMac Protégé

  • Members
  • Pip
  • 18 posts
Brightness doesn't change and the slider keeps getting back to 100%

#10
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts

Brightness doesn't change and the slider keeps getting back to 100%


You have GMA4500?

#11
Scorpy22

Scorpy22

    InsanelyMac Protégé

  • Members
  • Pip
  • 18 posts
No, I'm on a Samsung R530 with a Nvidia G310M and I'm running 10.6.5

#12
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts

No, I'm on a Samsung R530 with a Nvidia G310M and I'm running 10.6.5


Do you have brightness like this in your ioreg? http://img87.imagesh...69/screenql.png

Try this dsdt:

Attached Files



#13
joerg74

joerg74

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
Hi ivik,
where is this DSDT.aml from? I also have a Samsung R530 (-Nion, with Core i3 330M CPU) and I am wondering if I can use this too?
Greetings Jörg

#14
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
This is Scorpy22's dsdt which he uploaded few posts up.

#15
riws

riws

    InsanelyMac V.I.P.

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 6,081 posts
Thx ivik, great work!

How about without the "We still don't have brightness entry in ioreg... waiting..." Log Kext?

*For MSI Wind U100 its SBRG.EC.BRLV

#16
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts

Thx ivik, great work!

How about without the "We still don't have brightness entry in ioreg... waiting..." Log Kext?

*For MSI Wind U100 its SBRG.EC.BRLV


I'll build it some time without this. Still testing it. :P
Do you have brightness keys mapped and onscreen "sun" image (with progress changing) when changing with keys?

Thnx for testing and reporting success.

#17
Scorpy22

Scorpy22

    InsanelyMac Protégé

  • Members
  • Pip
  • 18 posts

Do you have brightness like this in your ioreg? http://img87.imagesh...69/screenql.png

Try this dsdt:


No changes with this DSDT, Here's my IOReg screenshot.
Posted Image

Min, max, and value are at 0, I suppose the problem comes from here.

#18
riws

riws

    InsanelyMac V.I.P.

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 6,081 posts

I'll build it some time without this. Still testing it. :P
Do you have brightness keys mapped and onscreen "sun" image (with progress changing) when changing with keys?

Thnx for testing and reporting success.

Nope, but I took Spark for that.

#19
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
Yeah... this is problem. OSX reads this brightness values from somewhere. I just monitor values from ioreg and then call acpi methods.

Maybe adding something to dsdt (_DSM in graphics section) would fix that...

#20
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male
  • Location:CHN
@Ivik
Thank for this stuff, My graphic card is intel x3100 ,I can use Fn key with up &down to adjust the brightness ,but no "sun" appears.Here is the logs :
Nov 12 22:24:00 Zproods-MacBook kernel[0]: IG: Invalid firmware max backlight setting
Nov 12 22:24:00 Zproods-MacBook kernel[0]: Acpi brightness levels:16, lowest brightness:20, highest brightness:100 
Nov 12 22:24:01 Zproods-MacBook kernel[0]: We still don't have brightness entry in ioreg... waiting...
And I manually add PNLF device in the dsdt file ,also add those code you mentioned above .
Here is my dsdt file :Attached File  dsdt.dsl.zip   22.16KB   127 downloads

Thanks.

regards.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy