Jump to content

Hex Backlight Driver for Laptops with Nvidia Go graphics cards


Hex Hex
 Share

4 posts in this topic

Recommended Posts

I'd like to announce the release of Hex Backlight v2.0 beta1...

 

I've written a driver, Preference Pane and MenuBar utility to allow control of the LCD Brightness (Backlight) for laptops with Nvidia Go graphics cards. There is also some generic ACPI support via the _BCM method in DSDT but that is still a work in progress for non-Nvidia graphics cards.

 

The Pref Pane consists of four tabs. The first tab being the main one with control of the brightness level. You also enable the MenuBar utility and can run a complete 100% to 15% to 100% cycle test so you can safely determine the best levels for your laptop:

 

HexBacklight_v2_PrefTab1_01.png

 

The second tab shows you the current brightness values in ACPI when the laptop is running from Battery and AC power. Currently you can't change these values and they don't work i.e. plugging-in your laptop doesn't yet cause a brightness change as I'm still writing the hooks into the Power Management system. But it will work in the next release.

 

HexBacklight_v2_PrefTab2_01.png

 

The third tab is a status tab, shows the methods that Hex Backlight is using to control LCD brightness. It's really there for debugging and to make it easier for me to extend support non-Nvidia cards and generally it's just rather cool to see some of the internal workings. Some of the flags are not yet reporting the right information (Nvidia card, Graphics card name etc):

 

HexBacklight_v2_PrefTab3_01.png

 

The MenuBar utility shares the same icon as the Pref Pane and provides realtime brightness control and a button to get to the Pref Pane quickly. If the slider is greyed out then the driver (HexBacklight.kext) is not running and it goes into a loop until it can connect to the driver. Sliding up and down occurs instantly i.e. before you Mouse-Up unlike the main Pref Pane Brightness slider:

 

HexBacklight_v2_MenuBar_01.png

 

 

Installlation:

To install download the installer from my file share: http://mediafire.com/hexhex and file name "Hex Backlight Installer v2.0.pkg" and run it. I highly recommend installing to the default locations (S/L/E for driver and /Library/PreferencePanes for the PrefPane) as I don't think it will work otherwise.

 

Please note, I compiled this under OS X 10.6 but it should work under 10.5 although I haven't tested it on 10.5.x except the earlier versions which worked fine.

 

BIG FAT WARNING: If your graphics card doesn't store the brightness registers in the location Hex Backlight goes probing then there is a risk this driver will kernel panic your system. There is no exception handling with OS X drivers so the Kernel Panic can't be avoided. If your card is supported then there is nothing to worry about. If you KP then remove the driver and send me a PM and I'll figure out if I can add support for your card.

 

Whats planned for the next release:

1) Automatic brightness change based on power source change (bat/AC etc)

2) Generic control via ACPI for non-Nvidia laptops

3) Brightness level persistence across reboots

4) Hotkey and/or Fn-key support so you can use the normal laptop brightness up/down Fn keys

 

One more thing, this is my first serious OS X combined C++ driver with Cocoa/ObjC app so don't shoot me if things arn't as perfect as they could/should be. It's was a {censored} figuring out how best to access the right registers on my Nvidia 570m card but in the end I feel the driver is incredibly lite and efficient and almost everything is on-demand via notifications rather than timers or workloops. There is still the odd bit of inefficient code but but it's in the seldom used places so shouldn't matter too much.

 

Good luck and any feedback would be great.

 

Hex Hex

 

 

Developed on and for: HP 8510w laptop with Nvidia Quadro 570m card with 256mb ram. Running OS X 10.6 with 4GB ram.

Desktop screen cap: http://www.mediafire.com/file/dgjhyc2tzo2/...2_Screen_01.png

Link to comment
Share on other sites

  • 3 months later...

Hello,

 

I just tested it, and the kext seems to load correctly (shows in IORegisteryExplorer), but the PreferencePanel won't load, at least under leopard (10.5.8).

 

Could you recompile for leo or post the sources ?

 

Thanx.

Link to comment
Share on other sites

Does this work with CCFL displays ?

 

My real brightness values are for AC 7/7 and for BAT 3/7

 

and driver reports AC 7/100 and BAT 3/100, because the minimum that the prefpane is able to set is 15/100 there is no way to turn the brightness down (of course it does not go upper than what is allowed by the CCFL LCD)

 

Could you compile it for SL X86_64 instead of X86 ?

 

Any way thanks for this great project.

Link to comment
Share on other sites

  • 11 months later...
 Share

×
×
  • Create New...