Jump to content

UPDATED 20.12. GenericBrightness.kext


  • Please log in to reply
671 replies to this topic

#41
BlackCH

BlackCH

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,615 posts
  • Gender:Male
  • Location:BCN

2 posts up. Just decompile it. iasl -d dsdt.aml


it wont compile back. I need to do some modifications to be able to use it
Please use this dsdt instead:
Attached File  dsdt_v0.02.dsl.zip   60.86KB   8 downloads

#42
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
@quinielascom

try this dsdt:

@BlackCH
DSDT dsl

Attached Files



#43
quinielascom

quinielascom

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 749 posts
  • Location:M�xico

@quinielascom

try this dsdt:


Thanks, working fine here.

In dmesg: Acpi brightness levels:10, lowest brightness:10, highest brightness:100

Last step: map the correct keys for "normal" use.

Up --> Move from (Pause) to (Fn + Left Arrow)
Down --> Move from (Fn+ F12) to (Fn + Right Arrow)

#44
quinielascom

quinielascom

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 749 posts
  • Location:M�xico
Are you using voodoops2 32 bit?
No, I use ApplePS2Controller.kext 32/64 bits

FN+left/right are brightness keys?
Yes.

Does your brightness emit some scancodes?
hummm, let me to check... now rebooting to linux.

#45
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
Are u running 64bit?

Standard acer scancodes are: e0 59=up, e0 6f=down.

#46
BlackCH

BlackCH

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,615 posts
  • Gender:Male
  • Location:BCN
No changes with the last dsdt

#47
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
So... slider works, but not linear or doesn't work? (with last dsdt)
Maybe apple gma driver is messing with brightness registers-not alowing them to change with brightness methods.

#48
BlackCH

BlackCH

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,615 posts
  • Gender:Male
  • Location:BCN

So... slider works, but not linear or doesn't work? (with last dsdt)
Maybe apple gma driver is messing with brightness registers-not alowing them to change with brightness methods.


Yes, as I said, if you hack the x3100 kext binary and bypass the brightness routine then you can use the windows-assigned keys to regulate the brightness but you loose all the OSX's native brightness function (on-screen icon, slider, auto-dim)
The problem is the screen itself; same laptop with different display (glossy model) works fine.
Im using a variation of this script mapped to F7-F8 with keyboardmaestro.app. Thats the only solution I've found so far, but is away from being a good one

#49
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
Hmm.. this utility only changes brightness slider value... this means that you have native brightness (same registers as osx, but writing different/wrong values for your notebook).

From pommed source code for gma950:[codebox] * The GMA950 has a backlight control register at offset 0x00061254 in its
* PCI memory space (512K region):
* - bits 0-15 represent the backlight value
* - bits 16 indicates legacy mode is in use when set
* - bits 17-31 hold the max backlight value << 1[/codebox]

gma 965:[codebox]* The GMA965 is slightly different; the backlight control register is at
* offset 0x00061250 in its PCI memory space (first 512K in the 1M region):
* - bits 0-15 represent the backlight value
* - bits 16-31 hold the max backlight value
* - bit 30 indicates legacy mode is in use when set[/codebox]

For BOTH cards, the register for the backlight value is at offset 0x00061254.

Could you open reggie_se and watch those registers?

PhysMem calculation:
1. open pci tab and choose VGA compatible controller
2. open bar key bar0 (0xD0200000 on my laptop)
3. open calc (hex) and add:
bar0+offset(0x00061254)=> on my lap=0xD0261254
bar0+offset(0x00061250)

When you calculated those values, open PhysMem tab and enter those valuse (0xD0261254/0 on my laptop) in 32 bit.
Move slider and watch how these values are changed (for both 0xD0261254, 0xD0261250 mem space)

Brightness only works when PNLF is added and gma driver is patched?

#50
quinielascom

quinielascom

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 749 posts
  • Location:M�xico

Are u running 64bit?


No, but I want run 64bits if some day Apple release X3100 64 bits drivers

Standard acer scancodes are: e0 59=up, e0 6f=down.


Scan codes using linux (xev) was:

Left <- = 239
Right -> = 123

#51
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
These are keycodes...

#52
ThirdSmile

ThirdSmile

    InsanelyMac Protégé

  • Members
  • PipPip
  • 87 posts
  • Gender:Male
  • Location:Ukraine

Could you open reggie_se and watch those registers?

PhysMem calculation:
1. open pci tab and choose VGA compatible controller
2. open bar key bar0 (0xD0200000 on my laptop)
3. open calc (hex) and add:
bar0+offset(0x00061254)=> on my lap=0xD0261254
bar0+offset(0x00061250)

When you calculated those values, open PhysMem tab and enter those valuse (0xD0261254/0 on my laptop) in 32 bit.
Move slider and watch how these values are changed (for both 0xD0261254, 0xD0261250 mem space)

Brightness only works when PNLF is added and gma driver is patched?

I own too the same laptop and the same problems with it.

bar0
0xE4400004

bar0+offset(0x00061254)=>0xE4461258
bar0+offset(0x00061250)=>0xE4461254

When moving slider:
at offset 0x00061254 - no changes
at offset 0x00061250
when slider on max:
0x01EE01EE
when slider on min:
0x01EE0000

#53
BlackCH

BlackCH

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,615 posts
  • Gender:Male
  • Location:BCN

Could you open reggie_se and watch those registers?

PhysMem calculation:
1. open pci tab and choose VGA compatible controller
2. open bar key bar0 (0xD0200000 on my laptop)
3. open calc (hex) and add:
bar0+offset(0x00061254)=> on my lap=0xD0261254
bar0+offset(0x00061250)

When you calculated those values, open PhysMem tab and enter those valuse (0xD0261254/0 on my laptop) in 32 bit.
Move slider and watch how these values are changed (for both 0xD0261254, 0xD0261250 mem space)

Brightness only works when PNLF is added and gma driver is patched?


I could see the second register (bar0+offset(0x00061250)) changing as I change the brightnes and I can also write values to it with reggie_se and the brightness will change accordingly. The first one (bar0+offset(0x00061254)) is always in 0 and it doesnt allow me to write to it (it comes back to 0)

Brightness control works properly when the gma driver is patched (I will try without PNLF device). When the brightness routine is baypassed and I can use F7 and F8 (windows keys) to move the brightness un and down. Off course no on-screen icon/slider, etc
When the driver is not patched I cannot use F7, F8 keys. Instead I can change the brightness with scroll and pause keys; I can see the on-screen icon and the slider also works, but the change is not linear. Only the upper 5% of the slider is linear, which is where the brightness utility I linked works

#54
Nameci

Nameci

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 166 posts
  • Gender:Male

I could see the second register (bar0+offset(0x00061250)) changing as I change the brightnes and I can also write values to it with reggie_se and the brightness will change accordingly. The first one (bar0+offset(0x00061254)) is always in 0 and it doesnt allow me to write to it (it comes back to 0)

Brightness control works properly when the gma driver is patched (I will try without PNLF device). When the brightness routine is baypassed and I can use F7 and F8 (windows keys) to move the brightness un and down. Off course no on-screen icon/slider, etc
When the driver is not patched I cannot use F7, F8 keys. Instead I can change the brightness with scroll and pause keys; I can see the on-screen icon and the slider also works, but the change is not linear. Only the upper 5% of the slider is linear, which is where the brightness utility I linked works


Hello BlackCH,

we almost have the same notebook configuration, I have already replaced my BCM4311 to Atheros9280 because of wireless n... see my sig, if I include PNLF in dsdt wake breaks, returns back to sleep after a few seconds...

;)

#55
Prasys

Prasys

    Cheese Cheese cheese

  • Retired Developers
  • 338 posts
  • Gender:Male
ivik , awesome job man. It works on my MSI Wind U100..Now the system syncs well with brightness control. Thanks a lot !

#56
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male
  • Location:CHN

Do your brightness keys emit scancodes? You could then map them to NX_KEYTYPE_BRIGHTNESS_UP/DOWN in VoodooPS2 and use native onscreen.



Do you have min/max brightness in ioreg? Slider works? On-screen appears if u have your brightness keys mapped in VoodooPS2. For me it also works with SCR LK (FN+12) for down and pause for up.


Hi, sorry about miss that.Yes , I have min/max brightness in the loreg ,like this :

Attached File  _____________2010_11_14_5.27.33_PM.png   167.13KB   238 downloads


,the what does the Slider is works mean ? yeah , when I add PNLF in the dsdt ,it appears the display prefPane. I can slip

but the display backlight does not change, and I can see five step while pressing Pause (up) ,Fn+Delete(down)(sun comes). But when I press Fn +up &down (the original adjust key),it turn back to ten step(no sun) .Anyway I use the ACPIPS2Controller.kext ,not VoodooPS2Controller.kext.

Thanks.

#57
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts

I own too the same laptop and the same problems with it.

bar0
0xE4400004

bar0+offset(0x00061254)=>0xE4461258
bar0+offset(0x00061250)=>0xE4461254

When moving slider:
at offset 0x00061254 - no changes
at offset 0x00061250
when slider on max:
0x01EE01EE
when slider on min:
0x01EE0000


And 1EE is max brightness in ioreg?

Maybe dsdt patch could help here. Something like this:
OperationRegion (BRIT, SystemMemory, 0xE4461258, 0x04)    Field (BRIT, AnyAcc, Lock, Preserve)    {        LEVL,   32    }

And then in PCI0 _INI section:
Method (_INI, 0, NotSerialized)            {                PINI ()		Store (0x512C0000, LEVL)           }


#58
wojnar0

wojnar0

    InsanelyMac Protégé

  • Members
  • PipPip
  • 50 posts
  • Gender:Male
  • Location:Poland
@ivik
could you send me your touchpad kext?

And what trackpad version do you have? 6.2?

Thanks

#59
wojnar0

wojnar0

    InsanelyMac Protégé

  • Members
  • PipPip
  • 50 posts
  • Gender:Male
  • Location:Poland

6.2 with 6 buttons. 32bit only, modified for my acer.


thank you, but I use 64bit and I have Gateway with v6.2.
With your Voodoops2keyboard.kext i don't have keyboard after reboot.
With your kext GenericBacklight nothing happen.
I lookt i to my dsdt and i found that values but not in right place.
Could you help me?

Here is my dsdt:
http://www.mediafire.com/?sqe3ac7ng69wgjj

I use Voodoops2 driver, currently brightness slider doesn't move.
And I use GraphicsEnabler from Chameleon.

Thanks

#60
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
Try this

@Zprood upload your dsdt

Attached Files







1 user(s) are reading this topic

0 members, 1 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