Brightness Control
Forum » Development / Asus Hotkeys » Brightness Control
Started by: codeyecodeye
On: 1222272427|%e %b %Y, %H:%M %Z|agohover
Number of posts: 73
rss icon RSS: New posts
Brightness Control
codeyecodeye 1222272427|%e %b %Y, %H:%M %Z|agohover

Seems to be working with a small hack to AppleIntelIntegratedFramebuffer.kext.
See Hotkeys page.
Codeye

Reply  |  Options
Unfold Brightness Control by codeyecodeye, 1222272427|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
fletch33fletch33 1222276531|%e %b %Y, %H:%M %Z|agohover

where is the "hot keys" section located that you say has the fix?

thanks

Reply  |  Options
Unfold Re: Brightness Control by fletch33fletch33, 1222276531|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
strongesthylianstrongesthylian 1222276786|%e %b %Y, %H:%M %Z|agohover

In the wiki:
http://ipis-osx.wikidot.com/asus-hotkeys

Reply  |  Options
Unfold Re: Brightness Control by strongesthylianstrongesthylian, 1222276786|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
atad66atad66 1222283661|%e %b %Y, %H:%M %Z|agohover

Is it possible for you to post the kext? I tried opening the binary inside the kext and can't find that value at that address. Thanks!

Last edited on 1222283685|%e %b %Y, %H:%M %Z|agohover By atad66 + Show more
Reply  |  Options
Unfold Re: Brightness Control by atad66atad66, 1222283661|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
atad66atad66 1222284570|%e %b %Y, %H:%M %Z|agohover

Nevermind, I'm just stupid and can't read HEX values, I figured it out. Thanks so much!

Reply  |  Options
Unfold Re: Brightness Control by atad66atad66, 1222284570|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
atad66atad66 1222287716|%e %b %Y, %H:%M %Z|agohover

With the brightness controls working my estimated battery life goes from 4:00 with wifi to 7:00 and without wifi it goes from 5 hours to over 9! I don't know how accurate those values are but I'm hoping the increase is significant. Now I'm going to try to undervolt with coolbook and see how much battery life I can get. I'm using one of the 8800 batteries.

Unfold Re: Brightness Control by atad66atad66, 1222287716|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
Gregory CohenGregory Cohen 1222303851|%e %b %Y, %H:%M %Z|agohover

I just tried this. Edited a backup of the file. installed it with kexthelper rebooted. now it seems to belocking on bootup. Lights are still flashing occasionally, but the spinning thing for boot stopped.

No good on my 901.
Which did you do this on? When mods like this are posted perhaps we should list install and model as a heads up.

-GReg

Unfold Re: Brightness Control by Gregory CohenGregory Cohen, 1222303851|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
Gregory CohenGregory Cohen 1222304148|%e %b %Y, %H:%M %Z|agohover

ok, I was able to boot into safe mode (-x) and it booted fine, I restored from a backup of that kext.
All is fixed and is happy … no backlight control. :(

-GReg

Unfold Re: Brightness Control by Gregory CohenGregory Cohen, 1222304148|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
Gregory CohenGregory Cohen 1222304586|%e %b %Y, %H:%M %Z|agohover

Ok, looks like this was my bad. I added that byte, I did not edit it. it boots now.

Reply  |  Options
Unfold Re: Brightness Control by Gregory CohenGregory Cohen, 1222304586|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
comatroncomatron 1222288410|%e %b %Y, %H:%M %Z|agohover

its GREAT that this page has the solution for this. big up! keep the work goin … ill spread this …

Reply  |  Options
Unfold Re: Brightness Control by comatroncomatron, 1222288410|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
comatroncomatron 1222288463|%e %b %Y, %H:%M %Z|agohover

would be great to have the kext here for download … im too drunk to hex … ;) damn birthdays

Reply  |  Options
Unfold Re: Brightness Control by comatroncomatron, 1222288463|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
chestnutchestnut 1222322954|%e %b %Y, %H:%M %Z|agohover

Awesome, works a treat :)

Good work

Reply  |  Options
Unfold Re: Brightness Control by chestnutchestnut, 1222322954|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
codeyecodeye 1222340695|%e %b %Y, %H:%M %Z|agohover

File now posted to wiki page

Reply  |  Options
Unfold Re: Brightness Control by codeyecodeye, 1222340695|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
jashsayanijashsayani 1222342578|%e %b %Y, %H:%M %Z|agohover

Thanks a lot codeye

Reply  |  Options
Unfold Re: Brightness Control by jashsayanijashsayani, 1222342578|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
comatroncomatron 1222435908|%e %b %Y, %H:%M %Z|agohover

thank you! for all those having problems with awakening the maschine from sleep, press one of the brightness-keys after waking it up. and voila you get the screen back on :) thanx codeeye for this one! great

Reply  |  Options
Unfold Re: Brightness Control by comatroncomatron, 1222435908|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
gopowergohgopowergoh 1222450669|%e %b %Y, %H:%M %Z|agohover

With the file codeye posted, do we still need to make edits? How do you run the file? Thanks

Reply  |  Options
Unfold Re: Brightness Control by gopowergohgopowergoh, 1222450669|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
strongesthylianstrongesthylian 1222451633|%e %b %Y, %H:%M %Z|agohover

I believe the file posted was a zip right? Just unzip the file, then use the kext helper to install it. I highly recommend using OSX86 Tools to backup your Extensions folder. You could also use OSX86 Tools to install the kext.

Reply  |  Options
Unfold Re: Brightness Control by strongesthylianstrongesthylian, 1222451633|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
ViOTeKViOTeK 1223054817|%e %b %Y, %H:%M %Z|agohover

Anyone got this working along with speed-step? My brightness controls work now, but it will not turn the display back on after coming out of Sleep. It seems the system boots back up but no display.

Reply  |  Options
Unfold Re: Brightness Control by ViOTeKViOTeK, 1223054817|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
dcipherdcipher 1223055221|%e %b %Y, %H:%M %Z|agohover

did you press brightness up or down after coming out of sleep?
The screen is set to off when going into sleep, so you need to turn it back on…

Reply  |  Options
Unfold Re: Brightness Control by dcipherdcipher, 1223055221|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
ViOTeKViOTeK 1223065635|%e %b %Y, %H:%M %Z|agohover

Yup, tried going up, down, using the screen on/off key, nothing works.

Unfold Re: Brightness Control by ViOTeKViOTeK, 1223065635|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
ViOTeKViOTeK 1223131422|%e %b %Y, %H:%M %Z|agohover

Well I tried re-installing without speed-step, and now it doesn't even sleep properly, screen goes off, but the fan keeps going and the status indicator never even blinks as if it's sleeping like before..

Reply  |  Options
Unfold Re: Brightness Control by ViOTeKViOTeK, 1223131422|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
knemonicknemonic 1223415835|%e %b %Y, %H:%M %Z|agohover

This is another brightness alternative, especially since if your not comfortable with editing the hex keys
Here

Reply  |  Options
Unfold Re: Brightness Control by knemonicknemonic, 1223415835|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
snickersmdsnickersmd 1223432357|%e %b %Y, %H:%M %Z|agohover

No, the software-based solutions like Brightness Control and Shades only make the screen darker by progressively darkening the colors that the pixels put out, rather than by actually dimming the backlight. You'll see what I mean if you use one off these software solutions and put it to the darkest setting. At that point, your screen is black, but it's still glowing, meaning that the backlight is still on. This may work for people who just think the screen feels too bright, but the key is that it doesn't save any power like hardware dimming does.

Reply  |  Options
Unfold Re: Brightness Control by snickersmdsnickersmd, 1223432357|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
mikeweissmikeweiss 1223564049|%e %b %Y, %H:%M %Z|agohover

Has anyone found a kext for the 1000h brightness / sleep with a native resolution of 1024x600. Everything I find is static at 800x600. Right now I am using the GMA950.pkg and its great but the HEX values arent the same as noted here. Thanks. You guys all rock.

Reply  |  Options
Unfold Re: Brightness Control by mikeweissmikeweiss, 1223564049|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
John CrichtonJohn Crichton 1225212719|%e %b %Y, %H:%M %Z|agohover

Hi all.
Wiki contain in the Asus Hotkeys section a AppleIntelIntegratedFramebuffer.kext but I had not been succesfull using it with a ideneb 1.3 (which I guess is providing newest kext).
Using the AppleIntelIntegratedFramebuffer.kext provided here display freezes.
The use of old GMA950 kext is limiting display size to 800*600.

Then I've tried to edit the new AppleIntelIntegratedFramebuffer.kext but I can't figure out changing address 0x5DEC from 0x55 to 0xC3. Address 0x5DEC do not show the original value (0x55).

Could someone be kind enough to provide information, or better, new AppleIntejavascript:;lIntegratedFramebuffer.kext with already changed values.
Main purpose is to save battery time, and my eyes too when using 1000H at night ;).

Thanks in advance.

Reply  |  Options
Unfold Re: Brightness Control by John CrichtonJohn Crichton, 1225212719|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
QuinnStormQuinnStorm 1225215031|%e %b %Y, %H:%M %Z|agohover

I should post a bundle of all my kext's at some point here because I do have a working 100h/10.5.5/iDeneb 1.3

Let me know if installing all the kext's in this bundle isn't enough, I might have missed one.

(just use like OSX86Tools or something to install them)

http://rapidshare.com/files/158407490/10.5.5-iDeneb_1.3_eeePC-Specific_Extensions.zip.html

If someone could repost this somewhere better that'd be great. I don't think I can upload files here.

Unfold Re: Brightness Control by QuinnStormQuinnStorm, 1225215031|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
joebloughjoeblough 1225218015|%e %b %Y, %H:%M %Z|agohover

does anyone know if there is a guide somewhere that describes how to hack AppleIntelIntegratedFramebuffer.kext for other platforms? i'm getting an s10 and while the sound kext work here is applicable, i'm not sure the brightness key hack is going to be the same.

Unfold Re: Brightness Control by joebloughjoeblough, 1225218015|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
DiamondswDiamondsw 1225226204|%e %b %Y, %H:%M %Z|agohover

I'm running into the same problem. Codeye's edit is based on 1.5.16, whereas I have version 1.5.30 on my system.

Unfold Re: Brightness Control by DiamondswDiamondsw, 1225226204|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
TooncesToonces 1225753613|%e %b %Y, %H:%M %Z|agohover

Hi QuinnStorm, Can you post your kext package again? I got a 10 user download limit reached error when I tried to get it.

Thanks!

Toonces

Reply  |  Options
Unfold Re: Brightness Control by TooncesToonces, 1225753613|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
hagglebeefhagglebeef 1225228580|%e %b %Y, %H:%M %Z|agohover

Hi Everyone,

Something Toonces said reminded me that I had a 10.5.5 GMA and Framebuffer that I did in September that has the brightness control. Forgot all about it since I was fooling around with ALC269. In case anyone still needs it… its here: http://rapidshare.com/files/158469233/eee901and1000-10.5.5-GMA950-with-brightnesscontrol.zip Tried to upload it to the wiki, but was taking forever for a < 250K zip file, so I load it to rapidshare instead. There are two kext once you unzip, 27aeAppleIntelGMA950.kext, 27aeAppleIntelIntegratedFramebuffer.kext. I use the retail method, so it is necessary for me to rename kexts that they will not be overwritten by automatic updates. You can leave them the same name and restore the old kexts or rename the ones here to the correct name and replace your old ones. Up to you. I used otool to figure out from the previous kext mod to transfer the changes to the new kext, so credit should still go to Codeye for the mod :).

Reply  |  Options
Unfold Re: Brightness Control by hagglebeefhagglebeef, 1225228580|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
mikeweissmikeweiss 1225244093|%e %b %Y, %H:%M %Z|agohover

I was hoping I could find some help.

Everytime I install one of these kexts that fix brightness I never have my 1000h's native resolution of 1024x600 available. Its always 800x600.

Has anyone found a kext combination that supports brightness and the 1024x600 resolution?

Right now I am using the gma950 driver package that gives me full res (and brightness :( ).

Thanks to everyone on this site. Mad props to the genius leaders of this movement.

Another thought I wanted to ask, Do you think we will ever take advantage of the fn + F keys? This is very cool in Ubuntu to be able to use the soft keys and fn stuff. Could we leverage the Air hotkeys even if they dont match our graphics?

Reply  |  Options
Unfold Re: Brightness Control by mikeweissmikeweiss, 1225244093|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
snickersmdsnickersmd 1225255703|%e %b %Y, %H:%M %Z|agohover

Making a driver to control the function keys is also in my plans, but audio is just so taxing on my time. The beauty of it is that all Asus laptops, not just the ipis, would benefit, and there is Linux source code out there.

All Asus laptop keyboards incorporate hotkey functions in the keyboard firmware. They aren't customizable AFAIK. Furthermore, they're not even sent as traditional scan codes. They're sent as ACPI events. The BIOS captures some of these off the bat and simply responds, no matter what the operating system does. That's why Fn+F1 to sleep still works, and after using codeye's patch, you basically release control of brightness from the Apple driver, such that the BIOS can catch and act on the events tied to Fn+F4&F5.

Writing a kext to capture these ACPI events is not a long shot. Even Windows needs a special Asus ACPI driver in order for the hotkeys to function. What is promising is that without any hacking, the ATKD device handle that is meant for those events is present in the IO registry. That is to say, it is already recognized by AppleACPI and all we need to program is a handler.

Ultimately the result could be very pretty. We could program it and set it up to use Growl notifications so that we could get little popups to say sound muted, wifi on, bluetooth off, screen off, etc. But we need coders first. <sigh>

Reply  |  Options
Unfold Re: Brightness Control by snickersmdsnickersmd, 1225255703|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
TooncesToonces 1225252463|%e %b %Y, %H:%M %Z|agohover

Is there anything else besides renaming I should do? I did do a chown root:wheel and installed them with kext helper but all I am getting now is a blue screen. I also did it again manuall after rebooting with -s just to make sure I had indeed overwritten the files but I get same thing using these kext on my 1000H.

Reply  |  Options
Unfold Re: Brightness Control by TooncesToonces, 1225252463|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
hagglebeefhagglebeef 1225279845|%e %b %Y, %H:%M %Z|agohover

Toonces,

Actually, now that I thought about it, it was meant for retail/Boot-132, so there are some internal changes as well to support the rename. So, my thought would be to leave the name the same and install the kext as is and replace the AppleIntelGMA950.kext and AppleIntelIntegratedFramebuffer.kext with stock ones from the 10.5.5 release. The stock release will not function, but that is ok because the modified 27aeAppleIntelGMA950.kext and 27aeAppleIntelIntegratedFramebuffer.kext will. Plus you get the added benefit that if you decide to install a bundle patch that it will not overwrite your graphics kext. Let me know how it goes for you.

Unfold Re: Brightness Control by hagglebeefhagglebeef, 1225279845|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
TooncesToonces 1225294014|%e %b %Y, %H:%M %Z|agohover

ok, I'll give it a shot. Thanks!

Reply  |  Options
Unfold Re: Brightness Control by TooncesToonces, 1225294014|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
hagglebeefhagglebeef 1225247169|%e %b %Y, %H:%M %Z|agohover

mikeweiss,

The file mention in my previous post is what you want - it supports both 1024x600 and brightness adjustment using Fn+F3 and Fn+F4 key combinations.

Reply  |  Options
Unfold Re: Brightness Control by hagglebeefhagglebeef, 1225247169|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
mikeweissmikeweiss 1225294593|%e %b %Y, %H:%M %Z|agohover

I too get the void of the blue screen when I install this. You mentioned to Toonces to install both. So do I need to install the GMA950.pkg I've been using plus the ones above?

I am confused yet grateful.

I am using the iDeneb 1.1 upgraded to 10.5.5 via the known method of updating.

I am using the AppleSMBiosEFI because I heard it fixes coolbook, but I am not sure if that is working either.

Reply  |  Options
Unfold Re: Brightness Control by mikeweissmikeweiss, 1225294593|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
TooncesToonces 1225299931|%e %b %Y, %H:%M %Z|agohover

Hi MikeWeiss, The GMA950 kexts you need to install with the unrenamed ones from hagglebeef are the stock apple unmodified ones. If you install modified ones alongside the ones he is providing they will conflict with each other.

I was running AppleSMBIOSEFI.kext and coolbook didn't work with it either. I may try to look into that again soon and will post when I get it working.

Unfold Re: Brightness Control by TooncesToonces, 1225299931|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
mikeweissmikeweiss 1225300951|%e %b %Y, %H:%M %Z|agohover

I think i have the right ones (so many flying around the net). If I cannot find them I may beg to have them posted and labeled once and for all.

Thanks for the quick reply.

I am very excited to get this working.

Edit: I installed the 10.5.5 Kexts (AppleIntelIntegratedFramebuffer.kext. AppleIntelGMA950.kext) straight from my friends 10.5.5 updated Macbook Pro *A real one*. This makes my main display black but I can stick a VGA in and use an external monitor.

I remove the 27AE Kexts and it goes back to 800x600 and says no Kext loaded.

I clearly dont have the right Kext for the core. Now I am begging. Any links?

Last edited on 1225304748|%e %b %Y, %H:%M %Z|agohover By mikeweiss + Show more
Reply  |  Options
Unfold Re: Brightness Control by mikeweissmikeweiss, 1225300951|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
hagglebeefhagglebeef 1225315118|%e %b %Y, %H:%M %Z|agohover

Toonces and Mikeweiss,

I am using the retail/boot 132 method, which mean I pretty much have stock kernel and kext except for a few that is needed for battery, etc. So, first off, I used the apple automatic update method to upgrade my eeeMac to 10.5.5 and then I copied those stock GMA950 and Framebuffer kext as the 27AE ones and did some internal modification in them so they would be recognize by OSX and get loaded. After that I used otool to look for the location of __ZN31AppleIntelIntegratedFramebuffer14hwSetBacklightEm. In my kext it is here:

# otool -vtV AppleIntelIntegratedFramebuffer
. . .
00005a7e        nop
00005a7f        nop
__ZN31AppleIntelIntegratedFramebuffer14hwSetBacklightEm:
00005a80        pushl   %ebp
00005a81        movl    %esp,%ebp
00005a83        subl    $0x08,%esp
. . .

So, the address to modify is 00005a80, which turns out to be $000005DFC in the my stock framebuffer in HexEdit. You should see a bunch of 90s (noops) follow by 55 89 E5 83. You need to change the 55 to C3 (return) to disable the kext control of the back light (Use the HexEdit search routine to do this…) This will allow the eee's ACPI driver to intercept the brightness routines. If you did well, you can run otool again on your modified kext and see this…

# otool -vtV AppleIntelIntegratedFramebuffer
. . .
00005a7d        nop
00005a7e        nop
00005a7f        nop
__ZN31AppleIntelIntegratedFramebuffer14hwSetBacklightEm:
00005a80        ret
00005a81        movl    %esp,%ebp
00005a83        subl    $0x08,%esp
. . .

Let me know if you were able to follow this mod. You should have already updated to 10.5.5 patch bundle before you begin. Also modify a 10.5.5 framebuffer kext that already supports 1024x600.

Last edited on 1225316607|%e %b %Y, %H:%M %Z|agohover By hagglebeef + Show more
Reply  |  Options
Unfold Re: Brightness Control by hagglebeefhagglebeef, 1225315118|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
TooncesToonces 1225475756|%e %b %Y, %H:%M %Z|agohover

Thanks hagglebeef! I am going to have to get the vanilla 10.5.5 kext and try this. I looked at the ones I have installed and the object code I get is different so I am thinking that it's probably just old old code. Can you tell me what other changes are needed to get the proper 1024X600 resolution and get it loading (I'm using ideneb 1.3 so not the same install as yours). I truly appreciate you teaching us how to fish rather than just providing voodoo files that work!

Here's what I get from otool

__ZN31AppleIntelIntegratedFramebuffer14hwSetBacklightEm:
00004088    pushl    %ebp
00004089    movl    %esp,%ebp
0000408b    pushl    %ebx
0000408c    movl    0x08(%ebp),%ecx
0000408f    movl    0x58(%ecx),%ebx
00004092    movl    0x00061254(%ebx),%eax
00004098    andl    $0xfffe0000,%eax
0000409d    movl    0x0c(%ebp),%edx
000040a0    andl    $0x0000fffe,%edx
000040a6    orl    %edx,%eax
000040a8    movl    %eax,0x000001f0(%ecx)
000040ae    movl    %eax,0x00061254(%ebx)
000040b4    xorl    %eax,%eax
000040b6    popl    %ebx
000040b7    popl    %ebp
000040b8    ret
000040b9    nop
Reply  |  Options
Unfold Re: Brightness Control by TooncesToonces, 1225475756|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
hagglebeefhagglebeef 1225494200|%e %b %Y, %H:%M %Z|agohover

Toonces,

Go to the apple menu and select "About This Mac" and tell me what you see as the version number. My one shows "Version 10.5.5". The 10.5.5 GMA950 and Framebuffer kext are not compatible with the older version nor the other way around.

Unfold Re: Brightness Control by hagglebeefhagglebeef, 1225494200|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
John CrichtonJohn Crichton 1225494676|%e %b %Y, %H:%M %Z|agohover

Hello Toonces, Hagglebeef, and everyone else here,
I can confirm that i've got exactly the same result as Toonces.

There's 2 values pushl one with %ebx other one with %ebp.
I'm a really noob in editing kext and hex files, but to my mind only the %ebp, like Hagglebeef done, is to modify.
Please stop me if I'm wrong ;).

But i'm stucked here.
Sorry to ask for that, but how do you convert 00005a80 to 000005DFC address to use in HexEdit.

Toonces and I must find this address 00004088, change push to ret. Am I right?

Thanx for your help in advance.

Edit @Hagglebeef, I'm using a 10.5.5 Os X out of the box with an ideneb 1.3 installation.
This is a fresh install, I've only changed GMA950 and IntegratedFramebuffer kexts, in order to have 1024x600 resolution.

I think Toonces has barely the same configuration.

Last edited on 1225495088|%e %b %Y, %H:%M %Z|agohover By John Crichton + Show more
Unfold Re: Brightness Control by John CrichtonJohn Crichton, 1225494676|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
TooncesToonces 1225509962|%e %b %Y, %H:%M %Z|agohover

Hi hagglebeef, My version is 10.5.5 but the AppleIntelIntegratedFramebuffer appears to be fom an older version. I got mine here: http://forum.insanelymac.com/index.php?s=0ef6292ddc68157dd43ab54835989ff7&showtopic=128862&st=0&p=913530&#entry913530

Later in that same thread, someone outs slinger2 as having just modified the older AppleIntelIntegratedFramebuffer.kext. You can see that here: http://forum.insanelymac.com/index.php?s=&showtopic=128862&view=findpost&p=925829

In that post they state that the kext is the same one from 10.4 that everyone has been using and gives the version number from the file itself as 1.4.2.20.28 vs. the 1.5.30 that 10.5.5 uses. To make it worse, slinger2 appears to have just edited the date and still didn't get it right :) In any case, you can see that my otool output is different from yours so that is why I was asking what the steps are to edit it. When I tried, I didn't get anything but a blue screen. I think I am missing something or the particular version I tried changed something from the one you have. At the very least, maybe I can undo the changes that are specific to your retail install??

Here are the instructions for editing as I understand them. Please let me know if you see anything I am missing.

1. hex edit AppleIntelIntegratedFramebuffer.kext/AppleIntelIntegratedFramebuffer and searched and replaced a227 with ae27
2. hex edit AppleIntelGMA950.kext/Contents/MacOS/AppleIntelGMA950 and searched and replaced a227 with ae27
3. edit AppleIntelGMA950.kext/Contents/Info.plist and replaced original line with
<string>0x25828086 0x25928086 0x27728086 0x27AE8086</string>
4. edit AppleIntelIntegratedFramebuffer.kext/Info.plist and replaced original line with
<string>0x25828086 0x25958086 0x27728086 0x27ae8086</string>
Unfold Re: Brightness Control by TooncesToonces, 1225509962|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
hagglebeefhagglebeef 1225929356|%e %b %Y, %H:%M %Z|agohover

Toonces,

I use a script to do the mod for me, but those steps seems to be correct. Here is the script:

# cat patch27ae.command
#!/bin/bash

# Version 20080708

#
# This script takes stock kexts, copies them, and patches the copies
# to include the device ID 0x27ae for the GMA950.
# The original kexts are not touched.
# This enables Quartz Extreme and Core Image on machines
# that show device ID 0x27ae in System Profiler.
# Once the stock kexts get updated, just run this script again
# so that your patched drivers get updated as well.
# This has been tested with stock 10.5.4 kexts.
#

#
# Make sure only root can run this script
#

if [ "$(id -u)" != "0" ]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi

#
# If we already have a patched driver, remove it
#

rm -r Extensions/27aeAppleIntelIntegratedFramebuffer.kext 2>/dev/null
rm -r Extensions/27aeAppleIntelGMA950.kext 2>/dev/null

#
# Copy stock kext; this way we keep the original as it is
#

cp -r /System/Library/Extensions/AppleIntelIntegratedFramebuffer.kext \
Extensions/27aeAppleIntelIntegratedFramebuffer.kext
cp -r /System/Library/Extensions/AppleIntelGMA950.kext \
Extensions/27aeAppleIntelGMA950.kext

#
# Patch GMA950 ID 27ae into the 27ae drivers
#

perl -pi -e 's|\x86\x80\xA2\x27|\x86\x80\xAE\x27|g' Extensions/27aeAppleIntelIntegratedFramebuffer.kext/AppleIntelIntegratedFramebuffer
perl -pi -e 's|\x86\x80\xA2\x27|\x86\x80\xAE\x27|g' Extensions/27aeAppleIntelGMA950.kext/Contents/MacOS/AppleIntelGMA950
perl -pi -e 's|27A28086|27AE8086|g' Extensions/27aeAppleIntelIntegratedFramebuffer.kext/Info.plist
perl -pi -e 's|27A28086|27AE8086|g' Extensions/27aeAppleIntelGMA950.kext/Contents/Info.plist

#
# Do a checksum and tell the user whether he has a known good one
#

MD5A=$(md5 -q Extensions/27aeAppleIntelIntegratedFramebuffer.kext/AppleIntelIntegratedFramebuffer)
MD5B=$(md5 -q Extensions/27aeAppleIntelGMA950.kext/Contents/MacOS/AppleIntelGMA950)
if [ "$MD5A" == "e8b716b5de7361c14b912ffe07eb38e6" ] ; then
    echo "Patched AppleIntelIntegratedFramebuffer from stock 10.5.4 (known good)"
else
    echo "Unknown AppleIntelIntegratedFramebuffer version (might work anyway)"
fi

if [ "$MD5B" == "af8db599032453de6404109150b78db6" ] ; then
    echo "Patched AppleIntelGMA950 from stock 10.5.4 (known good)"
else
    echo "Unknown AppleIntelGMA950 version (might work anyway)"
fi

There is only one good way to figure out the address that you need to modify for the disabling the backlight control in this kext. What you need to know is that the binary is stored in the "mach-o" format which has different sections for code versus data that gets loaded into memory when the kext gets loaded. The way to get to this information is through otool again:

# otool -l AppleIntelIntegratedFramebuffer 
AppleIntelIntegratedFramebuffer:
Load command 0
      cmd LC_SEGMENT
  cmdsize 736
  segname 
   vmaddr 0x00000000
   vmsize 0x000108e0
  fileoff 892
 filesize 67756
  maxprot 0x00000003
 initprot 0x00000003
   nsects 10
    flags 0x0
Section
  sectname __text
   segname __TEXT
      addr 0x00000000
      size 0x0000dcee
    offset 892
     align 2^4 (16)
    reloff 68648
    nreloc 886
     flags 0x00000000
 reserved1 0
 reserved2 0
Section
. . .

What you are looking for is the sectname "text" and segname "TEXT", that's the code section. After that you are looking for the offset which is in decimal, in this example, the offset is 892 which is 37c in hex (calculator in programmer view is your friend). So, to figure out where it the file it is in hex, from my previous post, 5a80 + 37c = 5dfc (again calculator in programmer view is your friend) which is where to hex edit.

Hope this helps.

Unfold Re: Brightness Control by hagglebeefhagglebeef, 1225929356|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
TooncesToonces 1226118750|%e %b %Y, %H:%M %Z|agohover

Thanks Hagglebeef! I ended up reinstalling the stock kexts and was still getting blue screen. It didn't seem to matter which kexts I installed other than the ones that I got from the thread on insanelymac that I referenced. I finally grabbed nhirt's pack and installed the pre-modified ones and when it left me with a blue screen I read his instructions again and this time I replaced natit.kext as well and I finally got video! I had to use switchresx to get 1024X600 but I was at least running stock kext with just the modifications that your script does above. I then grabbed stock GM950 & framebuffer kexts and did the same mods from the script and replaced the prehacked ones (just so I knew where I was). After rebooting I still had video so it looks like natit.kext made the difference. Apparently, from what I read previously (before the thread on insanelymac was removed), those other kexts did not require natit.kext or prehaps it just used an older one. In any case, now that I had 10.5.5 kexts, I was easily able to follow your instructions and do the brightness hack. Now all I need to do is setup QuinnStorm's excellent script to set the brightness where I want it on bottup and wakeup. Thanks for your awesome tutorial on modifying the kext!

Toonces

Reply  |  Options
Unfold Re: Brightness Control by TooncesToonces, 1226118750|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
codeyecodeye 1225537024|%e %b %Y, %H:%M %Z|agohover

Hi guys,
If you want to try something new once you have brightness control adjustable (I'm still using my hack from the beginning of the thread too lasy to update!) you can now control brightness through reggie and presumably someone could add a line to a wake up script (or a user space program) to provide a better brightness control on resume from sleep. On the 901 my PCI device for display is 18.
sudo reggie_se -D PCI -i 18 -w 255 -a 0xF4 - B 32 will have the display searing your optic nerves!

Last edited on 1225968624|%e %b %Y, %H:%M %Z|agohover By codeye + Show more
Reply  |  Options
Unfold Re: Brightness Control by codeyecodeye, 1225537024|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
TooncesToonces 1225781795|%e %b %Y, %H:%M %Z|agohover

I wouldn't mind trying a little reggie action on the brightness but alas, All I can download is your pre-hacked FrameBuffer and it doesn't like my AppleIntelGMA950.kext. Can you upload the matched set or maybe someone with a set could? While I was reading your post, I was reminded of something superhai started. a generic WMI kext that might be just the ticket to brightness, wifi on/off, bluetooth on/off, etc. Check it out http://www.superhai.com/forum/viewforum.php?f=5 maybe it's something that could be easily built upon?? Of course not by me.

Reply  |  Options
Unfold Re: Brightness Control by TooncesToonces, 1225781795|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
snickersmdsnickersmd 1225785735|%e %b %Y, %H:%M %Z|agohover

I for one have been dying to get true OS X based control of the brightness rather than our current fix, which simply involves letting the OS let go and letting BIOS take over.

I don't think the WMI kext is in the right direction for this though, as Asus' non-standard ACPI BIOS is well documented. I don't know if you've tried this yet, but if you use the hotkeys to toggle wireless mode in Windows, turn WiFi or Bluetooth or both off, and then reboot without switching them back on but go directly to BIOS setup, you'll see that the devices themselves are actually disabled in BIOS.

Asus is using a proprietary set of ACPI functions to control things in their BIOS, and they came under some flack for not releasing the code changes they made to the Linux ACPI driver at the beginning. This is history though, and they did release that code, making it possible for anyone who understands Linux ACPI and Asus ACPI to be able to program a kext for us that handles the same routines.

Alas, I am where you are, simply pointing at the code and saying, look here! the answer is here, but I can't code! :(

EDIT: All of a sudden, I wish Superhai had an ipis. He's a friggin kext genius.

Last edited on 1225785834|%e %b %Y, %H:%M %Z|agohover By snickersmd + Show more
Reply  |  Options
Unfold Re: Brightness Control by snickersmdsnickersmd, 1225785735|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
robbe23robbe23 1225924637|%e %b %Y, %H:%M %Z|agohover

codeye,
sorry for the newbee-question, but I did not find a guide or something like it. How can one find out the PCI device number of the display?
Thanks.

Reply  |  Options
Unfold Re: Brightness Control by robbe23robbe23, 1225924637|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
Gregory CohenGregory Cohen 1225936913|%e %b %Y, %H:%M %Z|agohover

OK, I tried this, I did the early byte hack on a 901 so we should be on the same page.

I get after I enter

sudo reggie_se -D PCI - 18 -w 255 -a 0xF4 - B 32

ERROR: no action specified

I wonder what I did wrong … Did I get a space or something wrong I wonder.

Reply  |  Options
Unfold Re: Brightness Control by Gregory CohenGregory Cohen, 1225936913|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
DiamondswDiamondsw 1230854936|%e %b %Y, %H:%M %Z|agohover

That space you have between the "-" and the "B" is going to trip people up. Might want to fix that. :)

Here's my contribution - this will look up the current display device number from reggie_se, then use grep and awk so we can use it in command to set the brightness.

#!/bin/sh

PCI_ID=`reggie_se -x -D PentiumM 2>&1 | grep -i "Display controller" | awk '{print $1}' | awk '{sub(/\.+$/, "");print}'`
reggie_se -D PCI -i $PCI_ID -w 255 -a 0xF4 -B 32

In short:

  1. Use reggie to get a list of PCI devices
  2. Since reggie sends the output to stderr, not stdout, redirect the output
  3. Isolate the line for the display
  4. Grab the first column
  5. Remove the period that some engineer thought would look pretty but screws up our commands
  6. Do that brightness setting thing :)
Reply  |  Options
Unfold Re: Brightness Control by DiamondswDiamondsw, 1230854936|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
codeyecodeye 1225927273|%e %b %Y, %H:%M %Z|agohover

sudo reggie_se -x -D PentiumM

Reply  |  Options
Unfold Re: Brightness Control by codeyecodeye, 1225927273|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
robbe23robbe23 1225963285|%e %b %Y, %H:%M %Z|agohover

Thanks codeye.

To set brightness on an EeePC 1000h at maximum level, type
sudo reggie_se -D PCI -i 16 -w 255 -a 0xF4 -B 32
To get minimal brightness, type
sudo reggie_se -D PCI -i 16 -w 2 -a 0xF4 -B 32

Or modyfiy QuinnStorms great scripts accordingly.

Reply  |  Options
Unfold Re: Brightness Control by robbe23robbe23, 1225963285|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
QuinnStormQuinnStorm 1225939227|%e %b %Y, %H:%M %Z|agohover

To restore brightness on resume (assuming you have sleepwatcher), do this:

add this to /etc/rc.sleep

reggie_se -D PCI -i 18 -r -a 0xF4 -B 32 2>&1 | grep 'Offset' | cut -d 'x' -f 3 | cut -d ' ' -f 1 > /etc/last_brightness

and add this to /etc/rc.wakeup

BRN=$(cat /etc/last_brightness)
reggie_se -D PCI -i 18 -w 0x$BRN -a 0xF4 -B 32
Last edited on 1225939475|%e %b %Y, %H:%M %Z|agohover By QuinnStorm + Show more
Reply  |  Options
Unfold Re: Brightness Control by QuinnStormQuinnStorm, 1225939227|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
QuinnStormQuinnStorm 1225939414|%e %b %Y, %H:%M %Z|agohover

edited the original post, this post is no longer necessary ;)

Last edited on 1225939508|%e %b %Y, %H:%M %Z|agohover By QuinnStorm + Show more
Reply  |  Options
Unfold Re: Brightness Control by QuinnStormQuinnStorm, 1225939414|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
tapashtapash 1225994803|%e %b %Y, %H:%M %Z|agohover

i'm new with mac, can not access the etc directory. how do i add line in rc.sleep. BTW i have installed sleepwatcher. thanks

Reply  |  Options
Unfold Re: Brightness Control by tapashtapash, 1225994803|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
gopowergohgopowergoh 1225998827|%e %b %Y, %H:%M %Z|agohover

Quinnstorm,
Do you have to adjust the brightness to wake up from sleep still?

Has anyone figured out a way to wake up from sleep by just pressing the power button instead of having to press the power button then adjust the brightness?

Thanks

Reply  |  Options
Unfold Re: Brightness Control by gopowergohgopowergoh, 1225998827|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
QuinnStormQuinnStorm 1226006002|%e %b %Y, %H:%M %Z|agohover

The whole point of these code snippets is to avoid needing to push the button, you just wait for the script to run and the screen turns on

Unfold Re: Brightness Control by QuinnStormQuinnStorm, 1226006002|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
gopowergohgopowergoh 1226018587|%e %b %Y, %H:%M %Z|agohover

Sorry, i am obviously confused. will this code work for 901s too? I tried doing it, but I don't really know how to work sleepwatcher.

Reply  |  Options
Unfold Re: Brightness Control by gopowergohgopowergoh, 1226018587|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
dcipherdcipher 1226018520|%e %b %Y, %H:%M %Z|agohover

love it! thanks…. if you are using a 1000h don't forget to change -i 18 to -i 16 in both scripts…

Reply  |  Options
Unfold Re: Brightness Control by dcipherdcipher, 1226018520|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
Gregory CohenGregory Cohen 1226018596|%e %b %Y, %H:%M %Z|agohover

weirdly on my 901, the number was 17. I used that command that codeye showed and I found the number no issue.

I wonder why i am special.

-GReg

Reply  |  Options
Unfold Re: Brightness Control by Gregory CohenGregory Cohen, 1226018596|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
TooncesToonces 1226118795|%e %b %Y, %H:%M %Z|agohover

Thanks QuinnStorm! Your scripts are wonderful!

Reply  |  Options
Unfold Re: Brightness Control by TooncesToonces, 1226118795|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
codeyecodeye 1225941160|%e %b %Y, %H:%M %Z|agohover

Nice work QuinnStorm! I'm glad you managed to do this despite my typo (leaving out the "i").

Last edited on 1225970081|%e %b %Y, %H:%M %Z|agohover By codeye + Show more
Reply  |  Options
Unfold Re: Brightness Control by codeyecodeye, 1225941160|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
Gregory CohenGregory Cohen 1226005343|%e %b %Y, %H:%M %Z|agohover

Thanks from me too, It works great for me now.

Reply  |  Options
Unfold Re: Brightness Control by Gregory CohenGregory Cohen, 1226005343|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
mdondersmdonders 1225964245|%e %b %Y, %H:%M %Z|agohover

Ok so I just installed this kext and now I am stuck at the blue screen after the gray apple logo.

Everything else was working besides the brightness keys. Is there a way to do a restore of the old file?

Reply  |  Options
Unfold Re: Brightness Control by mdondersmdonders, 1225964245|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
Gregory CohenGregory Cohen 1225971584|%e %b %Y, %H:%M %Z|agohover

It's fairly easy (if you have the old file).

When you boot and you see the countdown, hit a key and you'll get a prompt for paramaters.

Thing one to try
-x
This should boot you with minimal kexts if this works, when you get in remove and replace the kext in question with the old one.

If that does not work.

type:
-s

This will boot you into single user mode.
You can then go to the kext directory and remove the bad kext, replace it from a thum drive or something and reboot.
keep in mind this will be done by the command line.

-GReg

Reply  |  Options
Unfold Re: Brightness Control by Gregory CohenGregory Cohen, 1225971584|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
mdondersmdonders 1226014970|%e %b %Y, %H:%M %Z|agohover

Any reason why this would happen though?

I really would love the screen brightness to work.

Unfold Re: Brightness Control by mdondersmdonders, 1226014970|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
Gregory CohenGregory Cohen 1226091107|%e %b %Y, %H:%M %Z|agohover

This happened for me when I edited my kext file. If you scroll up you'll see. Instead of changing the byte, I inadvertently added a byte. Funny, it didn't work :)

I have not installed off the kext in the wiki, so I am unclear of how that might work.

-GReg

Unfold Re: Brightness Control by Gregory CohenGregory Cohen, 1226091107|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
mdondersmdonders 1226323188|%e %b %Y, %H:%M %Z|agohover

Ok so now that I got the blue screen again how do I go about copying the backup of the kext to the folder in -s mode.

The old kext is on my desktop and obviously need it back in System\Library\Extensions.

Unfold Re: Brightness Control by mdondersmdonders, 1226323188|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
mdondersmdonders 1226330832|%e %b %Y, %H:%M %Z|agohover

Ok just want to make sure this is correct.

should it be:
cp -r -i /users/mattdonders/Desktop/BACKUPAppleIntelIntegratedFrameBuffer.kext /System/Library/Extensions/AppleIntelIntegratedFrameBuffer.kext

I think thats right — im very new to this so want to make sure I don't mess anything else up before I run it.

Reply  |  Options
Unfold Re: Brightness Control by mdondersmdonders, 1226330832|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
zmeYpczmeYpc 1230952642|%e %b %Y, %H:%M %Z|agohover

I just want to thank you for the audio: devs & contributors! And for those of you running in chopping sound problems after upgrading from 10.5.5 to 10.5.6 here is what's worked for me:
1. I did Repair disk permissions.
2. Then I've entered BIOS, disabled Audio, and logged into Mac OS X.
3. On next restart I re-enabled the Audio and voilà — my sound is crystal clear again! :)

PS I did 10.5.6 a week ago, but just yesterday I shut down my EeeMac completely for the first time. Since then every audio I ran was choppy and awful; I've repeated every step of post-installs I did before (noticed that Azalia's kext was not there; restored it, checked and double-checked), but with no success… I was so sad, and even I was determined to backup and start a new install from scratch, when I decided to try this Audio disable/enbable trick and it worked! Wow! Might help someone here.

EDIT: Please, move this post here, as I can't delete it myself. I apologize for the inconvenience.


Я EeeMac 1000H Ѧ BIOS 2103_ASUS Ѧ DSDT dadaz_2103_HotkEee_0.4 Ѧ RAM 2 GB Ѧ Storage 160 GB + 120 GB Ѧ BootLoader Chameleon 2.0 R431 Ѧ OS Windows XP SP3 BG, Mac OS X 10.5.8 & Ubuntu 9.04 R

Last edited on 1230953066|%e %b %Y, %H:%M %Z|agohover By zmeYpc + Show more
Reply  |  Options
Unfold Re: Brightness Control by zmeYpczmeYpc, 1230952642|%e %b %Y, %H:%M %Z|agohover
Re: Brightness Control
surgedesignsurgedesign 1257617183|%e %b %Y, %H:%M %Z|agohover

Has anyone tried this with the snow leopard 10.6.1 appleintelintegratedframebuffer.kext? I tried following the guide here but it appears that the address to modify with hexedit has changed. Ideally I'd like to know if someone could tell me what the new address is.

Reply  |  Options
Unfold Re: Brightness Control by surgedesignsurgedesign, 1257617183|%e %b %Y, %H:%M %Z|agohover
New Post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License