Jump to content
Meowthra

Haswell GT1 Brightness fix

1 post in this topic

Recommended Posts

for example: Intel HD Graphics Haswell GT1 0x0a06

 

#############################################
### DSDT Patch:
#############################################
 

into_all device label PNLF remove_entry;
into definitionblock code_regex . insert
begin
Scope (_SB)\n
{\n
    Device (PNLF)\n
    {\n
        Name (_ADR, Zero)\n
        Name (_HID, EisaId ("APP0002"))\n
        Name (_CID, "backlight")\n
        Name (_UID, 15)\n
        Name (_STA, 0x0B)\n
    }\n
}\n
end;

# to avoid conflict with root scope PNLF
into_all method code_regex Store\s+\(PNLF,\s+(.*)\) replaceall_matched begin Store(\\PNLF, %1) end;

 

#############################################
### Build IntelBacklight
#############################################
Download Source:

git clone https://github.com/RehabMan/OS-X-Intel-Backlight.git

Patch Source:

sed -i "" 's/0x0a168086/0x0a068086 0x0a168086/g' OS-X-Intel-Backlight/IntelBacklight/IntelBacklight-Info.plist

Build with Xcode

 

copy IntelBacklight.kext to /System/Library/Extensions/

sudo chown -R 0:0 /System/Library/Extensions/IntelBacklight.kext

 

#############################################
### Rebuild Kernel Caches
#############################################

sudo rm -r /System/Library/Caches/*
sudo rm -rf /System/Library/PrelinkedKernels/prelinkedkernel
sudo touch /System/Library/Extensions/
sudo kextcache -a x86_64 -e

 

#############################################
### Display Color Profile
#############################################

PRODUCT_NAME="Color LCD"
VENDOR_DEC=$(ioreg -lw0 | grep DisplayVendorID | sed 's/.*= //g')
PRODUCT_DEC=$(ioreg -lw0 | grep DisplayProductID | sed 's/.*= //g')
VENDOR=$(printf "%x\n" $VENDOR_DEC)
PRODUCT=$(printf "%x\n" $PRODUCT_DEC)

if [ -d "/System/Library/Displays/Contents/Resources/Overrides" ]; then
    DISPLAYS_PATH=/System/Library/Displays/Contents/Resources/Overrides
else
    DISPLAYS_PATH=/System/Library/Displays/Overrides
fi

sudo mkdir -p $DISPLAYS_PATH/DisplayVendorID-$VENDOR

sudo sh -c "cat > $DISPLAYS_PATH/DisplayVendorID-$VENDOR/DisplayProductID-$PRODUCT << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>DisplayBacklight</key>
    <real>392.5</real>
    <key>DisplayBlueGamma</key>
    <real>1.269989013671875</real>
    <key>DisplayBluePointX</key>
    <real>0.1559906005859375</real>
    <key>DisplayBluePointY</key>
    <real>0.089996337890625</real>
    <key>DisplayBrightReflection</key>
    <real>389.30000000000001</real>
    <key>DisplayDarkReflection</key>
    <real>4.6950000000000003</real>
    <key>DisplayGammaChannels</key>
    <integer>3</integer>
    <key>DisplayGammaEntryCount</key>
    <integer>256</integer>
    <key>DisplayGammaEntrySize</key>
    <integer>2</integer>
    <key>DisplayGammaTable</key>
    <data>
    AAAAAQAEAAoAEgAcACgANgBGAFcAagCAAJQAqQDAANgA8QEMASgBRQFjAYIBowHEAecC
    CwIwAlcCggKvAt0DDAM9A3ADpAPZBBAESASBBLwE+AU2BXMFqwXfBhUGSwaCBrsG9Qcx
    B24HrgfvCDIIeAjACQwJWgmqCf4KVAqvCxMLeQvhDEwMuQ0qDZ0OEw6MDwkPiBAJEI4R
    FRGfEi0SvBNNE98UchUGFZoWLhbCF1cX7BiCGRkZsRpSGvobpBxQHP0drR5dHw8fwiB2
    ISsh4CKWI04kBiS9JXQmLSbpJ6kobCkyKfsqySuaLG4tRS4fLvwv2zC9MYwyXTMyNAs0
    6DXJNq83mjiJOXw6cjttPGk9aT5qP2ZATUE0QhpDAEPmRM5FtkahR45IfklzSmxLa0xv
    TXpOik+hULlR01LvVA1VLVZRV3dYoFnMWvtcLV1iXppf1WETYlNjmGTdZiJnZ2itafNr
    OmyDbcxvGHBmcbdzCnRhdbt3HXi6el18CH25f3CBK4LphKeGY4gcidOLh404jzGRbpPL
    lkmY45uJnimgsaMhpXmntqnirBSuTbCOstm1L7eSugG8fL8EwZbEAsZdyLzLIM2Hz/TS
    ZtTe11vZ3dx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mk35T1dQ11JmU/pVkVcmWLhaRVvKXUdevmAvYZxj
    CmR9ZfRnbWjqamlr6m1sbu5wcXH0c3d0+nZ9eBl5w3txfSJ+1YCHgjeD44WKhyuIx4pf
    i/KNgo8YkLGSTJPplYiXJ5jHmmacBZ2inz+g2qJ0pA6lp6dBqN6qfawercCvZLEJsrC0
    VrX9t6S5S7ryvJm+QL/nwY/DHcSUxg/HjckPypXMHs2ozzLQvtJI09LVVtbY2FbZz9tE
    3LTeId+F4OziWuPY5V/m6Ohu6ejrUuyv7fDvIPA88UPyNvMg8+30uvVy9hr2wvdh9+b4
    bPjx+XT52vpA+qb7Dftz+8b8D/xX/KD86P0x/Xn9wv3x/h3+Sf51/qD+zP74/yT/UP97
    /6f/0///
    </data>
    <key>DisplayGreenGamma</key>
    <real>2.079986572265625</real>
    <key>DisplayGreenPointX</key>
    <real>0.3264923095703125</real>
    <key>DisplayGreenPointY</key>
    <real>0.5507965087890625</real>
    <key>DisplayLeakage</key>
    <real>0.49990000000000001</real>
    <key>DisplayLowestLevel</key>
    <real>2</real>
    <key>DisplayLowestMeasured</key>
    <real>0.69520000000000004</real>
    <key>DisplayProductID</key>
    <integer>$PRODUCT_DEC</integer>
    <key>DisplayProductName</key>
    <string>$PRODUCT_NAME</string>
    <key>DisplayRedGamma</key>
    <real>2.2899932861328125</real>
    <key>DisplayRedPointX</key>
    <real>0.582489013671875</real>
    <key>DisplayRedPointY</key>
    <real>0.343994140625</real>
    <key>DisplayVendorID</key>
    <integer>$VENDOR_DEC</integer>
    <key>DisplayWhitePointX</key>
    <real>0.3126983642578125</real>
    <key>DisplayWhitePointY</key>
    <real>0.3289947509765625</real>
    <key>IOGFlags</key>
    <integer>4</integer>
    <key>dmdg</key>
    <data>
    AAAAAg==
    </data>
    <key>scale-resolutions</key>
    <array>
        <data>
        AAAFVgAAAwAAAAAB
        </data>
        <data>
        AAAFQAAAAvQAAAAB
        </data>
        <data>
        AAAFAAAAAtAAAAAB
        </data>
    </array>
</dict>
</plist>
EOF"

 

save as Display-Profile.sh

 

Run Script:

chmod 755 ./Display-Profile.sh
./Display-Profile.sh

Reboot Computer

 

qK47qCd.png

 

9Ya5CDU.png

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×