Jump to content

fight the backlight brightness control feature


  • Please log in to reply
51 replies to this topic

#21
laurier57

laurier57

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 3 posts

cele_82, Looks like this is possibly the only hurdle (from your AppleIntelGMAX3100FB output):

loc_668B:
cmp dword ptr [ebx+9Ch], 0A2106Bh
mov edi, 56h ; 'V'
jnz loc_65DE
jmp loc_65E3

with loc_65E3 being where (I think??) our functionality is turned off. The cmp there is probably there for a good reason (??), meaning if we changed that jnz to a jmp on its own and took out the other, we might be ok...or we might break everything! I know almost zero assembler though.

Also, open up IORegistryExplorer (xcode app) and look at:

IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/VID@2/AppleIntelFrameBuffer/display0/AppleDisplay/IODisplayParameters

and check out the values under 'bklt' :

max: number 0x1ee (32bit)
min: number 0x0
value: number 0x1ee


I'm using a Thinkpad T61 which has a 'normal' and 'high' default brightness setting in the BIOS. I'm currently at 'normal'. I'll reboot into 'high' and see if that max changes.
edit: no change in either brightness or the max # seen.

and, fwiw, when I change register F4 with setpci, the driver does not set them back, but of course nothing happens (however the same command under linux works perfectly);

food for thought!

Could anyone tell me how to reassemble this kext after disassembling and editing it? NASM gives me a ton of errors, probably meaning that the .asm format is wrong (using otool -tV output myself, no IDA here)



#22
laurier57

laurier57

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 3 posts
OK, so in reading this:

http://www.google.co...8L4BSU7L3lbU-pA

And a bit of the PDF posted at top, it seems that the F4 register only triggers an interrupt---and whether or not this interrupt is handled/seen is set by a mask (the IMR). Under linux it's likely this interrupt is unmasked, but os x is ignoring it, either by a) not handling it, or :) not wanting to hear about it. Check out pages 186, 246 and 236 in that PDF.

These registers (the IMR and IER) are both R/W, but I have no clue how to address them with setpci or Reggie SE. Any ideas? The code in the linux macbook backlight hal code might be a good starting point, but I don't know C well enough at all to think of making that work in OS X (with its offsets).

#23
jodo

jodo

    InsanelyMac Protégé

  • Members
  • PipPip
  • 95 posts
Very interesting findings, laurier57 - knowing the problems is the first step to solving it. So one can stop fiddling around with the F4 register and different framebuffer versions, as the result is clear.

I also have no idea how to address a "unknown" register/o.s. with setpci. I tried that for my fan control but with now luck. But perhaps this will lead to another idea...

#24
cele_82

cele_82

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 167 posts

OK, so in reading this:

http://www.google.co...8L4BSU7L3lbU-pA

And a bit of the PDF posted at top, it seems that the F4 register only triggers an interrupt---and whether or not this interrupt is handled/seen is set by a mask (the IMR). Under linux it's likely this interrupt is unmasked, but os x is ignoring it, either by a) not handling it, or :( not wanting to hear about it. Check out pages 186, 246 and 236 in that PDF.

These registers (the IMR and IER) are both R/W, but I have no clue how to address them with setpci or Reggie SE. Any ideas? The code in the linux macbook backlight hal code might be a good starting point, but I don't know C well enough at all to think of making that work in OS X (with its offsets).



Thank you to make me point to this address also this document is very very interesting...

http://www.intellinu...y_registers.pdf

When I have time I will try something...

#25
KlyX

KlyX

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 138 posts
  • Gender:Male
  • Location:Langenthal, Switzerland
Any news yet? Just setted up my 6710b and same issue ;-) Not solved since beginning of this year. It's the online thing I really need before I can use OS X on my hp in productive mode.
Can I do anything to help maybe?

KlyX

#26
dj_spark

dj_spark

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 197 posts
  • Gender:Male
  • Location:Chantilly, France
I can live for 4h15 on batteries in XP with low brightness but OSX put me down to 2h15 (brightness and very low cpu speed are missing)

#27
idoc

idoc

    InsanelyMac Protégé

  • Members
  • PipPip
  • 77 posts
cele_82 and laurie57,
From your posts I decided to take out the subroutine AppleIntelIntegratedFramebuffer::hwSetBacklight by applying
a retn (0xC3) opcode. This works on my eeepc901 (945GM), but may not work with other setups of course.
codeye

#28
oxtobyd

oxtobyd

    InsanelyMac Protégé

  • Members
  • Pip
  • 39 posts

cele_82 and laurie57,
From your posts I decided to take out the subroutine AppleIntelIntegratedFramebuffer::hwSetBacklight by applying
a retn (0xC3) opcode. This works on my eeepc901 (945GM), but may not work with other setups of course.
codeye


hi, do u have a copy of that kext so i can try on a 1000h?

cheers

#29
oxtobyd

oxtobyd

    InsanelyMac Protégé

  • Members
  • Pip
  • 39 posts
FYI, tried the hack mentioned at http://ipis-osx.wikidot.com

"hack AppleIntelIntegratedFramebuffer executable.
I used HexEdit to open the file and changed address 0x5DEC from 0x55 to 0xC3.
Then use Kext Helper to load."

this was tried on a Asus 1000H and it works a treat, so finally getting gr8 battery life etc.

#30
zwaldowski

zwaldowski

    InsanelyMac Protégé

  • Members
  • PipPip
  • 62 posts
I have a dv6654us with an Intel X3100 and and both brightness control (auto on unplug and fix Fn+F7/F8 keys) and QE/CI work beautifully. I don't use Natit, I replaced it with an EFI string (but it worked before, with Natit). I also get the invalid max firmware setting, though.

#31
jayman30

jayman30

    InsanelyMac Protégé

  • Members
  • PipPip
  • 52 posts
  • Gender:Male

FYI, tried the hack mentioned at http://ipis-osx.wikidot.com

"hack AppleIntelIntegratedFramebuffer executable.
I used HexEdit to open the file and changed address 0x5DEC from 0x55 to 0xC3.
Then use Kext Helper to load."

this was tried on a Asus 1000H and it works a treat, so finally getting gr8 battery life etc.


Bummer... this hack had no effect on my Gateway Laptop with X3100 and GMA 965.

Let me know if there's anything else to try.

#32
Nicolasl

Nicolasl

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 4 posts

FYI, tried the hack mentioned at http://ipis-osx.wikidot.com

"hack AppleIntelIntegratedFramebuffer executable.
I used HexEdit to open the file and changed address 0x5DEC from 0x55 to 0xC3.
Then use Kext Helper to load."

this was tried on a Asus 1000H and it works a treat, so finally getting gr8 battery life etc.


Thanks a lot,it works for my X60 with GMA950 ;)
No mouse artifacts(which appears if you replace the AIIFB.kext with the 10.4.3 version) and backlight can be controled through fn+Home/End

#33
jodo

jodo

    InsanelyMac Protégé

  • Members
  • PipPip
  • 95 posts
Very good news :blink: - I will try it instantly with my X60T - thx for the hint, oxtobyd and thx for the feedback Nicolasl! I will report my results soon...

#34
jodo

jodo

    InsanelyMac Protégé

  • Members
  • PipPip
  • 95 posts
Thx to the (file-) support of Nicolas I was able to give the patch a quick test - it seems to work flawlessly on my X60T. No artifacts (until now), backlight control works - yeah!

I will do further testing during the next days and post any news.

Thx to Nicolas, oxtobyd and the whole community for making this possible ;)

#35
qzl722

qzl722

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
me too,any one can help us to adjust the brightness??

#36
Slither2008

Slither2008

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 125 posts
  • Gender:Male
  • Location:Australia
It's great that this issue has been addressed to some degree of success with intel GMA owners.

But may i please ask that owners of nvidia 7600go who have this successfully working using a hack of sorts please post how.

Or if there are some great minds out there that could please help out or at least give a basic run through of how nvidia owners code obtain their own pci lcd registers for testing ?

Thanks in advance!

#37
x2PhaNToM

x2PhaNToM

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 193 posts
  • Gender:Male
  • Location:NRW, Germany
Any sucess with X3100?

#38
shanokee

shanokee

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts

Any sucess with X3100?


Turbo stated on his website that he has developed a driver. Does anyone have this? I wrote an email to him, if he replies I will quote here.

#39
JackHair

JackHair

    InsanelyMac Protégé

  • Members
  • PipPip
  • 78 posts
  • Gender:Male
  • Location:The Netherlands
I have brightness control working on HP 6720s with X3100 GFX using DSDT patcher.
The DSDT.aml activating it can be found in this topic: http://forum.insanel...mp;#entry972116

Mike

#40
cele_82

cele_82

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 167 posts

I have brightness control working on HP 6720s with X3100 GFX using DSDT patcher.
The DSDT.aml activating it can be found in this topic: http://forum.insanel...mp;#entry972116

Mike


what??? with all the hardware CI/QE? please post how you reach that and also what's DSDT?





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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