Jump to content

fight the backlight brightness control feature


  • Please log in to reply
58 replies to this topic

#1
cele_82

cele_82

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 164 posts
Ok... a lot of people here have the brightness control that doesn't work on their laptop(me to...obvious) but I don't want to continue using programs like Shades and so on... that put a dark mask over your screen... that's not useful if you to work with photo editing.

So let's start:

1. there are few major posts on this problem on the board:

http://forum.insanel...showtopic=82860

http://forum.insanel...showtopic=17237

http://forum.insanel...showtopic=65480

http://osxbook.com/b...hapter10/light/


2. If you take a look at your system.log file you'll see that the difference between a working(backlight) laptop and one that doesn't work is this line:

Apr 28 09:48:30 toms-mac-pro configd[33]: Error: No interface name AirPort_Brcm43xx
Apr 28 09:48:30 toms-mac-pro configd[33]: Error: ioPublishedDriverCallback() failed to initDeviceFromService()
Apr 28 09:48:31 toms-mac-pro kernel[0]: C098: family specific matching fails
Apr 28 09:48:31 toms-mac-pro kernel[0]: IG: Invalid firmware max backlight setting
Apr 28 09:48:31 toms-mac-pro kernel[0]: display: family specific matching fails
Apr 28 09:48:31 toms-mac-pro kernel[0]: ApplePS2Trackpad: Synaptics TouchPad v6.2
Apr 28 09:48:32 toms-mac-pro kernel[0]: fRegisters at 0x2ca43000
Apr 28 09:48:32 toms-mac-pro kernel[0]: C098: match category IOFramebuffer exists
Apr 28 09:48:36 toms-mac-pro kernel[0]: dsmos: Initializing...
Apr 28 09:48:36 toms-mac-pro kernel[0]: dsmos: Hook and decryption contexts set!
Apr 28 09:48:36 toms-mac-pro kernel[0]: dsmos: Starting...



A working laptop have all this records except that one.


3. The most important thing.
iNTEL 965 Datasheet page 403


Linux Users


If you read the posts at the point one you'll that Linux users change the backlight levels using setpci command that write values on PCI register involved with the brightness control. and this it works for them.

The PCI Register for backlight of a X3100 and also for GMA950 is at:

Device 2
Function 0 or 1(depending on your video card)
Register Start at F4 and end at FF
Register Name: LBB (Legacy Backlight Brightness)
Default Value: 00000000h

The linux users use setpci command like this

setpci -s 00:02.1 F4.B=XX (XX is the value that you want to write)

once upon a time setpci wasn't unavaible on OSX but now you can find it at:
http://x86dev.org/fo...pic=307.msg2750

also to change PCI register from OSX you can use Reggie SE (from CHUD Tools search them on Apple Developer Site)


Windows Users (search for RW Everything, HWDirect, or PCISCOPE)


Ok, I have a HP laptop 6720s with X3100 and a Acer 3692 with GMA950 all with Leopard.
The HP have no backlight control(Fn+F7 F8), the Acer have the backlight control(Fn+Up Down).

I've started with this idea: changing the backlight from PCI register in Windows XP and then test it on OSX, but (maybe I'm not good as you) I've tried and this doesn't work for me.


The Acer have no Acer utility installed and If I change backlight from PCI register D2:F0:F4 it doesn't do anything.
The HP has the Quicklaunch buttons installed and like the Acer don't do anything if I change the values, but the interesting thing is that If I remove the quicklaunch button utility (and then reboot) Volume control works but Brightness control doesn't work like in OSX, and if I watch the PCI Register and I change the brightness through the fn+F7 or F8 key I see that the value on register D2:f0:f4 change from 42 to FF (but the backlight remains at 100% like in OSX)

If I installed back the Quicklaunch buttons the backlight control starts working normally but I can not see values in the register changing like they do if Quicklaunch is installed.

It seems that values doesn't matter to Quicklaunch buttons app and maybe is ok cause the register is called LEGACY Backlight Brightness and LEGACY to me means something old...



So is there an APP that can watch what QuickLaunch Buttons write in the memory and where so we can track where the true backlight control is located?


sorry for my english but I have to go.... right now.


#2
CommanderData

CommanderData

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
Nice Summary!

In Windows I've written applications to control the display brightness, but it relies on Windows specific APIs like CreateFile ("\\.\LCD",.... and DeviceIoControl. These methods DO work for Windows XP, the brightness range (Min and Max settings) and current brightness can be queried, the actual brightness can be set (as long as it falls within the Min and Max).

Maybe there's someone with more knowledge of what happens after the Windows API calls I mention? What registers are written, and where?

Looking forward to cracking the display brightness issue sometime soon, my battery life could use a boost.

#3
cele_82

cele_82

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 164 posts

Hi, but is there an application able to track(everything) what the quicklaunch application do?

I hope that if we find what quicklaunch do (and where) we can bypass the brightness in osx by a command line tool, that is a good thing like you said for our batteries.. and also eyes.



#4
CommanderData

CommanderData

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
cele_82, we may be able to trace what is happening with the brightness buttons or my API call samples in Windows using a debugger (like SoftICE) or disassembler (like IDA). I do not have access to those myself at the moment, but someone here might.

#5
cele_82

cele_82

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 164 posts

cele_82, we may be able to trace what is happening with the brightness buttons or my API call samples in Windows using a debugger (like SoftICE) or disassembler (like IDA). I do not have access to those myself at the moment, but someone here might.

thanks for your answer, please tell me how to do it and where to get your program

Another important point


I removed the kexts of my X3100 so I step back using the generic driver of OSX that give me standard resolution 1024x768 but also as you know the backlight control.Using REGGIE SE to modify the PCI register D2:F0:F4 I WAS ABLE TO CHANGE THE BRIGHTNESS OF MY SCREEN the problem is that the X3100 kext load something that block this feature but now I am sure that this register is for the backlight control. Also I can set a lower value of the backlight that FN+F7 keys allow me to set.Like I wrote in the past posts is the same in windows.Some screenshots attached.

Attached Files



#6
SticMAC™

SticMAC™

    "Nobody likes a SmartASS"

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,590 posts
  • Gender:Male
  • Location:Da Bathroom!!
I have a Hp DV6716ez and my Fn F7, F8 keys work!? I have the standard apple Graphics Update loaded for my X1300.

How did you? "Card Reader: Works (tested with SD only)"

SticMAN

"Ok, I have a HP laptop 6720s with X3100 and a Acer 3692 with GMA950 all with Leopard.
The HP have no backlight control(Fn+F7 F8), the Acer have the backlight control(Fn+Up Down)."

#7
CommanderData

CommanderData

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts

thanks for your answer, please tell me how to do it and where to get your program

Another important point


I removed the kexts of my X3100 so I step back using the generic driver of OSX that give me standard resolution 1024x768 but also as you know the backlight control.Using REGGIE SE to modify the PCI register D2:F0:F4 I WAS ABLE TO CHANGE THE BRIGHTNESS OF MY SCREEN the problem is that the X3100 kext load something that block this feature but now I am sure that this register is for the backlight control. Also I can set a lower value of the backlight that FN+F7 keys allow me to set.Like I wrote in the past posts is the same in windows.Some screenshots attached.


That is very interesting, I have never used Reggie SE. I'll download the CHUD tools from Apple so I can try to do the same thing. My laptop is a Fujitsu P1620 (also have a P1610), both with GMA950 graphics.

The program I wrote for Windows brightness control is kind of tied to the Fujitsu line because it also reads accelerometer feedback to know when you're holding the tablet/laptop. It basically does the multi-step dimming based on lack of user interaction, just like a MacBook would dim, and then later go dark if you leave it alone. It will be a dead end for us in the Mac world.

What seems really odd is the X3100 kext (and possibly the GMA950) must be monitoring that register and setting it back every time you change it. If we could disassemble or get the source for the kext someone might be able to see where it is happening and remove it.



SticMan- off topic but I'd guess his SD reader was on the USB bus in that laptop, rather than an offshoot of the PC Card / PCI bus like it is in mine. Or you could use a PC Card to SD adapter if your PCMCIA slot works.

#8
cele_82

cele_82

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 164 posts

I have a Hp DV6716ez and my Fn F7, F8 keys work!? I have the standard apple Graphics Update loaded for my X1300.

How did you? "Card Reader: Works (tested with SD only)"

SticMAN

"Ok, I have a HP laptop 6720s with X3100 and a Acer 3692 with GMA950 all with Leopard.
The HP have no backlight control(Fn+F7 F8), the Acer have the backlight control(Fn+Up Down)."


Stickman if you have you X3100(no generic driver) with full resolution and Quartz acceleration and you have backlight control

Can you please try downloading Reggie SE and changing manually setting the value of the F4 register the backlight of your screen I need to know if it works for you.

Also do this:
- send me a copy of your X3100 kexts under extensions folder
- send a screenshot of the section GRAPHIC of the SystemProfiler.
- check the file system.log for the string that I mention in the first post (also send me the system log)

#9
SticMAC™

SticMAC™

    "Nobody likes a SmartASS"

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,590 posts
  • Gender:Male
  • Location:Da Bathroom!!
What do you mean by "generic driver" this one come from Apple's Graphics Update!

http://www.mediafire.com/?0vvsmn0zljt


My log ALL of it, I didn't know what you were looking for!

http://www.mediafire.com/?1bjtgyn130v


a picture of it, the first few times it only showed the resolution I set up in SwitchRes but since I've rebooted a few times its back to normal

http://www.mediafire.com/?iijhdwzom8i

Please explain what Reggie does BEFORE I load it on my machine!?
I hope this helps?

#10
cele_82

cele_82

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 164 posts

What do you mean by "generic driver" this one come from Apple's Graphics Update!

http://www.mediafire.com/?0vvsmn0zljt
My log ALL of it, I didn't know what you were looking for!

http://www.mediafire.com/?1bjtgyn130v
a picture of it, the first few times it only showed the resolution I set up in SwitchRes but since I've rebooted a few times its back to normal

http://www.mediafire.com/?iijhdwzom8i

Please explain what Reggie does BEFORE I load it on my machine!?
I hope this helps?



Reggie SE do nothing that can "hurt" your PC, It just change PCI Register Values (that you want) for session that you are using, those changes are not permanent on the next reboot they go away.

So please do what I ask you to do and also can you please:

- Move out the kexts of X3100 from extensions folder (so osx boot with generic driver)
- Delete system.log
- Test if you have full resolution of the screen, and if the brightness keys are working also test if you can change the value of brightness from Reggie SE and if it works
- Send me this system.log

after this move the X3100 kexts in the extensions folder and use disk utility to repair permission and you come back to your original situation.

Finally:
- Test if Reggie SE can change the value of brightness of the screen

#11
mrroboto

mrroboto

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 142 posts
where can i find reggie se?

#12
cele_82

cele_82

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 164 posts

where can i find reggie se?


I write where in the first post.

Download CHUD Tools here http://developer.app...tools/download/

#13
mulletman13

mulletman13

    InsanelyMac Protégé

  • Members
  • PipPip
  • 82 posts
Any updates on this front?

#14
qzl722

qzl722

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
Any updates on this front?

#15
mulletman13

mulletman13

    InsanelyMac Protégé

  • Members
  • PipPip
  • 82 posts
This thread seemed so promising.... cele_82 have you received any information about it? Have you played around with it anymore?

#16
qzl722

qzl722

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
Any updates on this front?

#17
jodo

jodo

    InsanelyMac Protégé

  • Members
  • PipPip
  • 95 posts
I tried my best on this issue. For one moment I thought it was solved - by changing nothing but the AppleIntegratedFramebuffer.kext to an older Version (10.4 I think) from this thread: http://forum.insanel...showtopic=65480

But what I've got then are mouse artifacts. When rolling back to the 10.5 framebuffer, everything is fine, but I cannot control the backlight. Seems that this problem is closely related to the framebuffer.kext...

#18
cele_82

cele_82

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 164 posts

I tried my best on this issue. For one moment I thought it was solved - by changing nothing but the AppleIntegratedFramebuffer.kext to an older Version (10.4 I think) from this thread: http://forum.insanel...showtopic=65480

But what I've got then are mouse artifacts. When rolling back to the 10.5 framebuffer, everything is fine, but I cannot control the backlight. Seems that this problem is closely related to the framebuffer.kext...


Yes jodo... but I think that you have the GMA950 video card.. Am I Wrong? This "trick" is not valid for x3100.


Please someone (I have not time) test what I wrote before... and I write it again:

Requirement:
A laptop that have the brightness in Windows controlled by software (like my HP 6720s with QuickLaunchButtons)
if the software is loaded Brightness controls work if not... it doesn't work...

Test:
We have to debug the application that control the brightness (ollydbg is a good debugger) to find where and what write in memory for changing brightness.

Hopes:
Maybe doing the same in the memory registers that make in Windows brightness change works also in Leopard.


I really hope that someone, have the time to do it.. because I have not much time now to do this.

#19
mulletman13

mulletman13

    InsanelyMac Protégé

  • Members
  • PipPip
  • 82 posts
I would attempt that, but I have absolutely no idea how to run a Debugger at all. =(

#20
cele_82

cele_82

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 164 posts

I would attempt that, but I have absolutely no idea how to run a Debugger at all. =(


we are in two...





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