Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tqbinh

macrumors newbie
Original poster
Jul 5, 2016
12
4
(for those who do not want a detailed explaination of the method, go directly to session 3)

1. Introduction

The 15" (A1286) and 17" (A1297) Macbook Pro early and late 2011 models suffered from infamous problem of dead dedicated ATI 6750M/6770M GPU (hereafter called dGPU). There are several workarround methods for bypassing/disabling dGPU and use only Intel HD 3000 GPU (iGPU):

1. Adding some parameters in NVRAM and modifying GPU kext. I did not try this method since all Macbooks I received had already disabled dGPU by method 2. I suspect that this method is not stable and requires somewhat working dGPU, since it is not very popular today.

2. Use cables to connect directly the outputs of iGPU to the screen controller, bypassing GMUX chip. The GMUX chip is responsible for switching between iGPU and dGPU. It also is responsible for sending brightness regulation value to screen's LED backlight driver (or controller) chip (more about this chip in the next session). So this method has drawback that the screen is always on maximum brightness. However, this method is very stable and therefore are widely used before the method 3 was published.

3. Reprogramming GMUX chip with some hardware modification. This method is better than method 2 in the sense that it allows to change screen brightness. However, it was published about 2 years ago when a large number of Macbooks 2011 were already fixed by method 2.

In this article, I will discuss on the problem of changing brightness for those Macbooks that were/are fixed with method 2.

Up to day, the only method available for changing (reducing) brightness on these Macbook is to use software (like Shady or similar) to make an software layer "overlayed" on the screen (i.e. change color/contrast of the screen) to reduce the user-percepted brightness. Since the LED backlight diod arrays still are on there max brightness, this method has several drawbacks:

- The screen constrastness is decreased proportionally with the decrease of brightness.

- The power consumption is high and the battery life is reduced (for comparison: the idle power consumption on max brightness (level of 127/127) on my A1297 is 16+ watts, after the hack it reduces to around 13-13.5 watts at brightness level of 72/127).

- The lifetime of LCD backlight is reduced since it always works on max mode.

My method bellow will write some values to the EEPROM registry of LED backlight controller chip (PL8550 or PL8545) to alter maximum current that power the LED arrays of LCD. Note this method not only can reduce but also increase (be carefull if you want to increase) max brightness on compatible Macbooks.

2. The method

According to macbook's schematics, all (or almost) all model of Macbook Pro/Air model 2010-2012 (correct me if I was wrong) use Texas Instrument's LP8550 or LP8545 High-Efficiency LED Backlight Driver (hereafter I will call it LED controller). This chip is denoted by U9701 on Macbook schematics. When it takes BKLT_EN signal, it turn on a boost voltage to LED array (28-35V for 13.3 and 15.4" model, 45-48V for 17" model). Upon LVDS_BKL_PWM_RC signal from GMUX chip, it change the current flowing through LED array to pins OUT1-OUT6 to change brightness. Since when disabling dGPU, we already bypassed GMUX chip, so there is no LVDS_BKL_PWM_RC and LED controller by default put maximum programmed current to LED array (about 20mA).

We can change this maximum programmed current by two way:

- Alter BKL_ISET resistor R9714 value (14.7K on my A1297), higher value of this resistor lead to lower maximum current passed to LED arrays. This method requires desoldering R9714 resistor on the backside of logic board and replace it with other one, so it takes time and is suitable for professionals only. Moreover, this method is not flexible since you have only one fixed brightness value if use a fixed-value resistor. The use of variable resistor requires complex cable routing and not stable due to signal interference.

- Change the EEPROM registry value of LED controller chip. Fortunaty, there are very detailed explainations about these values on LP8550/LP8545 datasheets and they are readily available on internet. This method is the subject of this article.

According to session 8.6.2.2 (EEPROM Address 0) of LP8550 datasheet, the 8-bits at register address A0h (called CURRENT register) control the LED array current:

"Backlight current adjustment. If EN_I_RES = 0 the maximum backlight current is defined only with these bits as described below. If EN_I_RES = 1, then the external resistor connected to ISET pin also scales the LED current. With a 16-kΩ resistor and CURRENT set to 7Fh, the output current is then 23 mA".

By design, our Macbook has EN_I_RES = 1 and CURRENT = 127 (decimal value, or binary value of 01111111b, or hex value of 7Fh). According to the datasheet, with the ISET resistor R9714 = 14.7KOm on my A1297, the max current passed to the LED array is (127/255)*600*1.23/14.7 = 25mA (on A1286 R9714=16.2KOm and max current = 22.6mA).

By manipulating the value of the CURRENT register, we will achieve different brightness level from 0 to maximum (127), or even over maximum if you set the value higher than 127, but it is not recommended since there is a risk of damaging the LCD's LED arrays. To alter the value of the CURRENT register, we need to use I2C/SMBUS protocol.

As far as I know, MacOS does not support (or poorly supports) I2C/SMBUS protocol. Fortunately, from the logi.wikisite, I have know about a very useful Python script written by github member Piernov. This original script runs from live Ubuntu disk and changes the brightness regulation slope of the Macbook Air 2012 model. By modifying this script a bit, I can make it work for our purpose.

3. Installation

For installation, you will need a 4GB USB stick (2GB may be enough also, I did not test it). The steps are follows:

1. Download Linux Lite (advantage over Ubuntu distro: small (1.3GB vs 2.7GB), already contain Macbook's Broadcom Wifi driver, and it can read MacOS HFS+ drive), I use 5.2 version (link).

2. Burn ISO file to USB (I use Rufus in Windows, but you can use any software capable for it). 4GB USB stick is more than enough.

3. Download my script (click on Raw button and then save) to the root of USB (or any other location convenient for you, even on your Mac's hard drive, just to make sure that you can access it from Live Linux).

4. Start Linux Lite from USB, use Live System mode (first line in the selection menu). To start from USB, press Option key when the Macbook is booting up, then select the yellow EFI icon.

5. After Linux Lite start up, connect to your wifi.

6. Open Terminal (from bottom left conner of the screen), install python3-smbus package by the following command:

sudo apt install python3-smbus

7. Run the script by the following command (the location might be different if you copy the script in other location in step 3):

sudo python3 '/media/cdrom/cdrom/set_brightness_int.py'

8. Enter values between 1 and 127 to set brightness level. Higher value means higher brightness. You can set value higher than 127 but it is not recommended since it may shorten lifetime of screen's backlight. From my experience, values between 60 and 80 are most suitable.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.