Jump to content

please help me fix Brightness Control Nvidia Graphics Only Laptop


onejay09
 Share

199 posts in this topic

Recommended Posts

  • 2 weeks later...

I have High Sierra 10.13.4 with Alienware 15R3 7700HQ with GTX1070 and HD630.  Screen is 15" FHD G-SYNC.  Same Hardware as Xela.

 

Trying to solve the Backlight issue.  I'm using EDID Fix to convince the display that it's internal, and that's it's AppleBacklightDisplay.  But I cannot get backlight slider to show up and cannot adjust brightness.  See attached troubleshooting files and displaymergenub kext.

 

(this site has issues uploading kexts so I took a screenshot of kexts/other to show which I'm loading.)

 

A15R3 iMac.zip

patchmatic extract.zip

Screen Shot 2018-05-24 at 1.42.24 PM.png

Terminal Output.txt

Screen Shot 2018-05-24 at 1.42.56 PM.png

CLOVER.zip

 

 

Oh, one thing to note, my laptop IS loading AppleBacklight kexts (see Terminal output).  I think this is due to spoofing the display with EDID fixer.

 

Edit: Note that I've already done the steps to create the Applebacklight Injector.  However, I confess I don't know exactly know how to do the steps below, which are finding the _dsm methods and inserting the additional acpi code.  I think it means to recompile the dsdt,, however, I'm using Clover to hotpatch _DSM to XDSM, so I guess I'd NOT use that patch and rather rename directly in the dsdt? and in any ssdts that have PEG0?  (I have 2 ssdts that refer to PEG0).

Also, I'm using clover to rename IGPU to GFX0, and rename PEGP to GFX0, do these patches stay?

Edited by MacMerlin
Updated to show High Sierra 10.13.4
Link to comment
Share on other sites

On 4/20/2017 at 3:10 PM, onejay09 said:

this post has been updated with the fix that works for my setup and a few others, my laptop is an asus gl702 but this has worked for others with dedicated nvidia graphics also.

if your laptop is optimus then this will not work for you.

 

fist find the _DSM method for your Graphics card, ignore any devices that are on PCI0 ie: PCI0.GFX0 your looking for graphics cards Under PCI0.PEG0

ie: PCI0.PEG0.GFX0._DSM  or  PCI0.PEG0.PEGP._DSM

rename the _DSM Method to XDSM and insert this Below


        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
        {
            If (LEqual (Arg2, Zero))
            {
                Return (Buffer (One)
                {
                     0x03                                           
                })
            }

            Return (Package (0x34)
            {
                "AAPL,backlight-control", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "@0,backlight-control", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "AAPL,aux-power-connected", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "@0,AAPL,boot-display", 
                Buffer (One)
                {
                     0x01                                           
                }, 

                "@0,display-cfg", 
                Buffer (0x04)
                {
                     0xFF, 0xFF, 0x36, 0x00                         
                }, 

                "@1,display-cfg", 
                Buffer (0x04)
                {
                     0xFF, 0xFF, 0xFF, 0xFF                         
                }, 

                "@0,connector-type", 
                Buffer (0x04)
                {
                     0x00, 0x08, 0x00, 0x00                         
                }, 

                "@1,connector-type", 
                Buffer (0x04)
                {
                     0x00, 0x08, 0x00, 0x00                         
                }, 

                "@0,built-in", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x01                         
                }, 

                "@0,use-backlight-blanking", 
                Buffer (0x04) {}, 
                "AAPL,gray-page", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "AAPL00,inverter", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x00                         
                }, 

                "@1,can-hot-plug", 
                Buffer (0x04) {}, 
                "AAPL00,blackscreen.preferences", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x08                         
                }, 

                "AAPL01,blackscreen.preferences", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x08                         
                }, 

                "@0,pwm-info", 
                Buffer (0x18)
                {
                    /* 0000 */  0x02, 0x18, 0x00, 0x64, 0x90, 0x59, 0x02, 0x00,
                    /* 0008 */  0x08, 0x52, 0x00, 0x00, 0xA5, 0x1C, 0x00, 0x00,
                    /* 0010 */  0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 
                }, 

                "@0,NVMT", 
                Buffer (0x70)
                {
                    /* 0000 */  0x0E, 0x03, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
                    /* 0008 */  0x40, 0x0B, 0x08, 0x07, 0xE0, 0x0B, 0x70, 0x0B,
                    /* 0010 */  0x90, 0x0B, 0x00, 0x00, 0x3C, 0x07, 0x0B, 0x07,
                    /* 0018 */  0x11, 0x07, 0x00, 0x00, 0xF0, 0xA7, 0x21, 0x14,
                    /* 0020 */  0x00, 0x00, 0x00, 0x01, 0xAF, 0x00, 0x00, 0x00,
                    /* 0028 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0030 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0038 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0040 */  0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
                    /* 0048 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0050 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
                    /* 0058 */  0x00, 0x00, 0x00, 0x00, 0xBC, 0x02, 0x01, 0x5A,
                    /* 0060 */  0x0A, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
                    /* 0068 */  0x40, 0x0B, 0x08, 0x07, 0x40, 0x0B, 0x08, 0x07 
                }, 

                "NVPM", 
                Buffer (0x1C)
                {
                    /* 0000 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0008 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0010 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0018 */  0x00, 0x00, 0x00, 0x00                         
                }, 

                "@0,compatible", 
                Buffer (0x0B)
                {
                    "NVDA,NVMac"
                }, 

                "@0,device_type", 
                Buffer (0x08)
                {
                    "display"
                }, 

                "@0,display-type", 
                Buffer (0x04)
                {
                    "LCD"
                }, 

                "@0,name", 
                Buffer (0x0F)
                {
                    "NVDA,Display-A"
                }, 

                "@1,compatible", 
                Buffer (0x0B)
                {
                    "NVDA,NVMac"
                }, 

                "@1,device_type", 
                Buffer (0x08)
                {
                    "display"
                }, 

                "@1,name", 
                Buffer (0x0F)
                {
                    "NVDA,Display-B"
                }, 

                "hda-gfx", 
                Buffer (0x0A)
                {
                    "onboard-1"
                }
            })
        }

we also need to add a pnlf patch to your DSDT

 


Scope (_SB)
    {
        Device (PNLF)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
            Name (_CID, "backlight")  // _CID: Compatible ID
            Name (_UID, 0x0A)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
        }
    }

thats all thats needed for the acpi files.

 

we now need to create a backlight injector for your display, use the script below to make the injector and install it to System/Library/Extensions.

https://github.com/onejay09/AppleBacklightInjector

 

if your backlight still isnt working then post problem reporting files.

 


Hi, is it possible the PCI0.PEG0 is in one of the ssdt files?

and do I apply _dsm  patch in clover/acpi/paches or macaisl patching? (and both? or one? or do I require every file that mentions the peg0 method?

also the first dsm in peg is in PCI0.PEG0 (in the ssdt I mentioned just above)

soon it changes to PCI0.PEG0.PEGP its only _PRW , before it goes to PCI0.PEG1

and then in specific once I know where about to patch. between which 2 lines should I add your giant code?

 

thanks in advance and thanks for your work and efforts in this matter, appreciate it

 

 

Link to comment
Share on other sites

  • 2 weeks later...
On 6/2/2018 at 11:23 PM, mtuan293 said:

Am I doing it right? I clicked save and it threw this error. I also attached my DSDT.aml file below. Any help would be greatly appreciated :lol:128255191_ScreenShot2018-06-03at3_11_28AM.thumb.png.99de7eb7ddf298758b44067d58a609e4.png

2062677332_ScreenShot2018-06-03at3_13_08AM.thumb.png.36b8a36a0ab812dad3ccc8df8ca890c5.png

DSDT.aml.zip

I'm not a pro at DSDT editing.  But I think you need to search for a guide on patching laptop DSDT, and search specifically for the part about disassembling ACPI files with refs.  If you find it you'll know what I mean.  This will help you get clean files to work with and help eliminate errors in compiling.

Link to comment
Share on other sites

@onejay09 - I just wanted to let you know that your brightness fix is working for the Thinkpad T61 (Nvidia graphics) running High Sierra 10.13.5.  Thanks again for great work!  My system config is as follows:

  • Laptop: Lenovo Thinkpad T61
  • CPU: Penryn T9300
  • RAM: 8GB DDR2
  • Graphics: Nvidia Quadro NVS 140m (Nvidia Web Driver 387.10.10.10.35.106)
  • OSX: High Sierra 10.13.5 (HFS+)
  • Bootloader: CLOVER (Legacy) r4509
Edited by tonyx86
Link to comment
Share on other sites

Hi everybody

 

I need your help with backlight

 

My laptop

 

Samsung r528

Core i3-330m

nvidia GT310m (NVDAstartup.kext from ELCapitan and Fake id from GT330M)

 

I did all the point from the first post except patching PNLF because i did not find it in my dsdt.aml

Also i unchecked "ADDPNLF" option in clover but than i received not working sleep mode, so now it enabled

Now i have working backlight but without slider 

Could you help me with solving this problem ?

 

My config,acpi folder, and ioreg in attachments

Desktop.zip

Edited by Disbalance
fix
Link to comment
Share on other sites

  • 3 weeks later...

@onejay09

 

I have been beating my head on this most of the week read through this great thread and I just cannot get brightness to work.  My DSDT was prepared by the famous EmlyDinesh but back when I was on 10.11.  I have the Apple Animation Brightness working and in System Preferences, Display I have the slider and the F5/6 key is in sync with the slider.  I have 64 positions for the F5/F6 key thanks to Emly great talents in many driver releases he has created.

 

I ran a script to generate all needed files. 

 

Funny thing if I remove DSDT I can boot no problems and the F5/F6 generate brightness not fully working but no Apple Animation or slider is present and for obvious reasons.

 

This G51JX Laptop with GTS 360M GFX has a Legacy Bios but I still install clover into EFI.

 

Won't let me upload files so here is a dropbox link to them.

 

https://www.dropbox.com/s/iy6z5egwpbckx2a/debug_12496.zip?dl=0

Edited by oSxFr33k
Link to comment
Share on other sites

Hi,

 

I am doing this patch on High Serria OS X 10.13.5. So far the farthest I got was

- getting the display recognized as Internal

- brightness slider show up but no effect (brightness by Berg Design was unresponsive)

- FN brightness key translucent feedback works but no effect

 

My default LCD display at NVDA,Display-B@1, so I did those necessary change ( I hope ). What I've done:

- Brightness and PNLF patch applied in DSDT.aml

- AppleBacklightInjector.kext into /L/E with patched display id

 

Specs:

Dell Alienware 15 r3, i7-7700HQ/Intel Kaby Lake rev. 05, BIOS 1.0.9, Intel® HD Graphics 630/

NVIDIA GeForce GTX 1070 (1920x1080) G-SYNC Panel 16GB RAM.

 

OS: High Serria 10.13.5, with Clover UEFI v4444 and Nvidia Web Driver: 387.10.10.10.35.106.

 

CLOVER and IOREG attach.

Archive.zip

 

Thanks!

Edited by xela
Link to comment
Share on other sites

  • 5 weeks later...
On 4/20/2017 at 9:10 AM, onejay09 said:

this post has been updated with the fix that works for my setup and a few others, my laptop is an asus gl702 but this has worked for others with dedicated nvidia graphics also.

if your laptop is optimus then this will not work for you.

 

fist find the _DSM method for your Graphics card, ignore any devices that are on PCI0 ie: PCI0.GFX0 your looking for graphics cards Under PCI0.PEG0

ie: PCI0.PEG0.GFX0._DSM  or  PCI0.PEG0.PEGP._DSM

rename the _DSM Method to XDSM and insert this Below


        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
        {
            If (LEqual (Arg2, Zero))
            {
                Return (Buffer (One)
                {
                     0x03                                           
                })
            }

            Return (Package (0x34)
            {
                "AAPL,backlight-control", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "@0,backlight-control", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "AAPL,aux-power-connected", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "@0,AAPL,boot-display", 
                Buffer (One)
                {
                     0x01                                           
                }, 

                "@0,display-cfg", 
                Buffer (0x04)
                {
                     0xFF, 0xFF, 0x36, 0x00                         
                }, 

                "@1,display-cfg", 
                Buffer (0x04)
                {
                     0xFF, 0xFF, 0xFF, 0xFF                         
                }, 

                "@0,connector-type", 
                Buffer (0x04)
                {
                     0x00, 0x08, 0x00, 0x00                         
                }, 

                "@1,connector-type", 
                Buffer (0x04)
                {
                     0x00, 0x08, 0x00, 0x00                         
                }, 

                "@0,built-in", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x01                         
                }, 

                "@0,use-backlight-blanking", 
                Buffer (0x04) {}, 
                "AAPL,gray-page", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "AAPL00,inverter", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x00                         
                }, 

                "@1,can-hot-plug", 
                Buffer (0x04) {}, 
                "AAPL00,blackscreen.preferences", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x08                         
                }, 

                "AAPL01,blackscreen.preferences", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x08                         
                }, 

                "@0,pwm-info", 
                Buffer (0x18)
                {
                    /* 0000 */  0x02, 0x18, 0x00, 0x64, 0x90, 0x59, 0x02, 0x00,
                    /* 0008 */  0x08, 0x52, 0x00, 0x00, 0xA5, 0x1C, 0x00, 0x00,
                    /* 0010 */  0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 
                }, 

                "@0,NVMT", 
                Buffer (0x70)
                {
                    /* 0000 */  0x0E, 0x03, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
                    /* 0008 */  0x40, 0x0B, 0x08, 0x07, 0xE0, 0x0B, 0x70, 0x0B,
                    /* 0010 */  0x90, 0x0B, 0x00, 0x00, 0x3C, 0x07, 0x0B, 0x07,
                    /* 0018 */  0x11, 0x07, 0x00, 0x00, 0xF0, 0xA7, 0x21, 0x14,
                    /* 0020 */  0x00, 0x00, 0x00, 0x01, 0xAF, 0x00, 0x00, 0x00,
                    /* 0028 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0030 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0038 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0040 */  0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
                    /* 0048 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0050 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
                    /* 0058 */  0x00, 0x00, 0x00, 0x00, 0xBC, 0x02, 0x01, 0x5A,
                    /* 0060 */  0x0A, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
                    /* 0068 */  0x40, 0x0B, 0x08, 0x07, 0x40, 0x0B, 0x08, 0x07 
                }, 

                "NVPM", 
                Buffer (0x1C)
                {
                    /* 0000 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0008 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0010 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0018 */  0x00, 0x00, 0x00, 0x00                         
                }, 

                "@0,compatible", 
                Buffer (0x0B)
                {
                    "NVDA,NVMac"
                }, 

                "@0,device_type", 
                Buffer (0x08)
                {
                    "display"
                }, 

                "@0,display-type", 
                Buffer (0x04)
                {
                    "LCD"
                }, 

                "@0,name", 
                Buffer (0x0F)
                {
                    "NVDA,Display-A"
                }, 

                "@1,compatible", 
                Buffer (0x0B)
                {
                    "NVDA,NVMac"
                }, 

                "@1,device_type", 
                Buffer (0x08)
                {
                    "display"
                }, 

                "@1,name", 
                Buffer (0x0F)
                {
                    "NVDA,Display-B"
                }, 

                "hda-gfx", 
                Buffer (0x0A)
                {
                    "onboard-1"
                }
            })
        }

we also need to add a pnlf patch to your DSDT

 


Scope (_SB)
    {
        Device (PNLF)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
            Name (_CID, "backlight")  // _CID: Compatible ID
            Name (_UID, 0x0A)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
        }
    }

thats all thats needed for the acpi files.

 

we now need to create a backlight injector for your display, use the script below to make the injector and install it to System/Library/Extensions.

https://github.com/onejay09/AppleBacklightInjector

 

if your backlight still isnt working then post problem reporting files.

 

I'm having a hard time following the instructions, can you help please? For example, I don't know what you mean by find the _DSM method for your graphics card. I looked at ioreg and I can find the graphics card listed under PEG0@1, but I don't know how to find the _DSM method.

I also didn't follow where to insert the code listed above. I think I figure out the pnlf patch of the DSDT but haven't done that before.

 

I have the Nvidia web drivers working and using third party tools like https://github.com/superduper/BrightnessMenulet I can adjust the brightness of external displays, but not the internal display.

 

Sorry for the novice questions, really appreciate the work done to support various hardware.

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

Sorry to revive and old thread but am hoping to gain some help and advice.

 

I'm having a little bit of trouble trying to get this patch to work on my Metabox Prime-X P750TM-G (clevo rebrand)
build. Dedicated 1080 and no Intel Graphics, 10.13.6 OSX.

 

I added the patch from post one in the SSDT-1-NdvTabl, added a PNLF device to my DSDT and then placed them in EFI/Clover/ACPI/Patched

 

Ran the script to create the Kexts and have installed in L/E/ however I still cannot even gain a brightness bar under my display.

 

I also believe I am missing something in regards to patching my HDMI audio from the Nvidia card.

 

I've attached the edited and original files here with IOReg. Let me know if you need anything further for fault finding/comparisons.

 

Any help would be appreciated, as the iASL editing side of things is quite new to me.

 

Cheers,

 

EDIT: Update, Followed the instructions as my Display was on B1. Have Lilu, AppleALC and whateberGreen installed to L/E.

 

Now have Brightness slider, however it does nothing. If I boot with either Inject EDID on clover I boot into black screen with mouse cursor and from all account can login blind, however still no desktop. if I remove the InjectEDID and repeat with injectNvidia (always am injecting webdrivers regardless) I can boot with screen yet still no control over brightness, however the system now sees my Video Memory as 256MB as opposed to the 8GB it was seeing prior the the patching.

 

Any ideas? I can easily attach further required files if anyone has the time to help

 

Cheers,

 

 

DSDT.aml

SSDT-1-NvdTabl.aml

 

 

 

DSDT.aml

SSDT-1-NvdTabl.aml

IOReg 25-8-18.png

Edited by Rehb
Link to comment
Share on other sites

Hi Guys,

 

Attached is the problem reporting files from my Metabox (Clevo Rebrand).

 

I had a bit more of a play and research over the weekend, and It looks like the majority of the settings are already there and could be supported, I'm just too new to this to link all the devices together with the correct syntax.

 

I also still am having issues keeping the brightness slider and seeing my laptop in built as an in built display. In fact I have seen it again since my previous post.

 

Please find attached files for trouble shooting and advice. Would love to get this up and running, but I feel like I have gone stagnant.

 

Cheers,

 

debug_14079.zip

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
On 4/20/2017 at 3:10 PM, onejay09 said:

this post has been updated with the fix that works for my setup and a few others, my laptop is an asus gl702 but this has worked for others with dedicated nvidia graphics also.

if your laptop is optimus then this will not work for you.

 

fist find the _DSM method for your Graphics card, ignore any devices that are on PCI0 ie: PCI0.GFX0 your looking for graphics cards Under PCI0.PEG0

ie: PCI0.PEG0.GFX0._DSM  or  PCI0.PEG0.PEGP._DSM

rename the _DSM Method to XDSM and insert this Below


        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
        {
            If (LEqual (Arg2, Zero))
            {
                Return (Buffer (One)
                {
                     0x03                                           
                })
            }

            Return (Package (0x34)
            {
                "AAPL,backlight-control", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "@0,backlight-control", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "AAPL,aux-power-connected", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "@0,AAPL,boot-display", 
                Buffer (One)
                {
                     0x01                                           
                }, 

                "@0,display-cfg", 
                Buffer (0x04)
                {
                     0xFF, 0xFF, 0x36, 0x00                         
                }, 

                "@1,display-cfg", 
                Buffer (0x04)
                {
                     0xFF, 0xFF, 0xFF, 0xFF                         
                }, 

                "@0,connector-type", 
                Buffer (0x04)
                {
                     0x00, 0x08, 0x00, 0x00                         
                }, 

                "@1,connector-type", 
                Buffer (0x04)
                {
                     0x00, 0x08, 0x00, 0x00                         
                }, 

                "@0,built-in", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x01                         
                }, 

                "@0,use-backlight-blanking", 
                Buffer (0x04) {}, 
                "AAPL,gray-page", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "AAPL00,inverter", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x00                         
                }, 

                "@1,can-hot-plug", 
                Buffer (0x04) {}, 
                "AAPL00,blackscreen.preferences", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x08                         
                }, 

                "AAPL01,blackscreen.preferences", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x08                         
                }, 

                "@0,pwm-info", 
                Buffer (0x18)
                {
                    /* 0000 */  0x02, 0x18, 0x00, 0x64, 0x90, 0x59, 0x02, 0x00,
                    /* 0008 */  0x08, 0x52, 0x00, 0x00, 0xA5, 0x1C, 0x00, 0x00,
                    /* 0010 */  0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 
                }, 

                "@0,NVMT", 
                Buffer (0x70)
                {
                    /* 0000 */  0x0E, 0x03, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
                    /* 0008 */  0x40, 0x0B, 0x08, 0x07, 0xE0, 0x0B, 0x70, 0x0B,
                    /* 0010 */  0x90, 0x0B, 0x00, 0x00, 0x3C, 0x07, 0x0B, 0x07,
                    /* 0018 */  0x11, 0x07, 0x00, 0x00, 0xF0, 0xA7, 0x21, 0x14,
                    /* 0020 */  0x00, 0x00, 0x00, 0x01, 0xAF, 0x00, 0x00, 0x00,
                    /* 0028 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0030 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0038 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0040 */  0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
                    /* 0048 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0050 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
                    /* 0058 */  0x00, 0x00, 0x00, 0x00, 0xBC, 0x02, 0x01, 0x5A,
                    /* 0060 */  0x0A, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
                    /* 0068 */  0x40, 0x0B, 0x08, 0x07, 0x40, 0x0B, 0x08, 0x07 
                }, 

                "NVPM", 
                Buffer (0x1C)
                {
                    /* 0000 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0008 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0010 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0018 */  0x00, 0x00, 0x00, 0x00                         
                }, 

                "@0,compatible", 
                Buffer (0x0B)
                {
                    "NVDA,NVMac"
                }, 

                "@0,device_type", 
                Buffer (0x08)
                {
                    "display"
                }, 

                "@0,display-type", 
                Buffer (0x04)
                {
                    "LCD"
                }, 

                "@0,name", 
                Buffer (0x0F)
                {
                    "NVDA,Display-A"
                }, 

                "@1,compatible", 
                Buffer (0x0B)
                {
                    "NVDA,NVMac"
                }, 

                "@1,device_type", 
                Buffer (0x08)
                {
                    "display"
                }, 

                "@1,name", 
                Buffer (0x0F)
                {
                    "NVDA,Display-B"
                }, 

                "hda-gfx", 
                Buffer (0x0A)
                {
                    "onboard-1"
                }
            })
        }

we also need to add a pnlf patch to your DSDT

 


Scope (_SB)
    {
        Device (PNLF)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
            Name (_CID, "backlight")  // _CID: Compatible ID
            Name (_UID, 0x0A)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
        }
    }

thats all thats needed for the acpi files.

 

we now need to create a backlight injector for your display, use the script below to make the injector and install it to System/Library/Extensions.

https://github.com/onejay09/AppleBacklightInjector

 

if your backlight still isnt working then post problem reporting files.

 

Link to comment
Share on other sites

Hi mates,

 

Another trying to get brightness bar and control keys.

 

That PNLF patch doesn't work for me. MaciASL doesn't do nothing when I copy it .

 

I'm using right now Applebacklightinjector in L/E.

_DSM renamed to XSDM.

The patch from Rehabman repository called "Birgthness fix (Haswell/Broadwell)" but nothing works.

 

How could I get it???

 

Problems files attached.

debug_7029.zip

Edited by narayan
Link to comment
Share on other sites

  • 2 weeks later...
On 4/20/2017 at 3:10 PM, onejay09 said:

this post has been updated with the fix that works for my setup and a few others, my laptop is an asus gl702 but this has worked for others with dedicated nvidia graphics also.

if your laptop is optimus then this will not work for you.

 

fist find the _DSM method for your Graphics card, ignore any devices that are on PCI0 ie: PCI0.GFX0 your looking for graphics cards Under PCI0.PEG0

ie: PCI0.PEG0.GFX0._DSM  or  PCI0.PEG0.PEGP._DSM

rename the _DSM Method to XDSM and insert this Below


        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
        {
            If (LEqual (Arg2, Zero))
            {
                Return (Buffer (One)
                {
                     0x03                                           
                })
            }

            Return (Package (0x34)
            {
                "AAPL,backlight-control", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "@0,backlight-control", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "AAPL,aux-power-connected", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "@0,AAPL,boot-display", 
                Buffer (One)
                {
                     0x01                                           
                }, 

                "@0,display-cfg", 
                Buffer (0x04)
                {
                     0xFF, 0xFF, 0x36, 0x00                         
                }, 

                "@1,display-cfg", 
                Buffer (0x04)
                {
                     0xFF, 0xFF, 0xFF, 0xFF                         
                }, 

                "@0,connector-type", 
                Buffer (0x04)
                {
                     0x00, 0x08, 0x00, 0x00                         
                }, 

                "@1,connector-type", 
                Buffer (0x04)
                {
                     0x00, 0x08, 0x00, 0x00                         
                }, 

                "@0,built-in", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x01                         
                }, 

                "@0,use-backlight-blanking", 
                Buffer (0x04) {}, 
                "AAPL,gray-page", 
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }, 

                "AAPL00,inverter", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x00                         
                }, 

                "@1,can-hot-plug", 
                Buffer (0x04) {}, 
                "AAPL00,blackscreen.preferences", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x08                         
                }, 

                "AAPL01,blackscreen.preferences", 
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x08                         
                }, 

                "@0,pwm-info", 
                Buffer (0x18)
                {
                    /* 0000 */  0x02, 0x18, 0x00, 0x64, 0x90, 0x59, 0x02, 0x00,
                    /* 0008 */  0x08, 0x52, 0x00, 0x00, 0xA5, 0x1C, 0x00, 0x00,
                    /* 0010 */  0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 
                }, 

                "@0,NVMT", 
                Buffer (0x70)
                {
                    /* 0000 */  0x0E, 0x03, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
                    /* 0008 */  0x40, 0x0B, 0x08, 0x07, 0xE0, 0x0B, 0x70, 0x0B,
                    /* 0010 */  0x90, 0x0B, 0x00, 0x00, 0x3C, 0x07, 0x0B, 0x07,
                    /* 0018 */  0x11, 0x07, 0x00, 0x00, 0xF0, 0xA7, 0x21, 0x14,
                    /* 0020 */  0x00, 0x00, 0x00, 0x01, 0xAF, 0x00, 0x00, 0x00,
                    /* 0028 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0030 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0038 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0040 */  0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
                    /* 0048 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0050 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
                    /* 0058 */  0x00, 0x00, 0x00, 0x00, 0xBC, 0x02, 0x01, 0x5A,
                    /* 0060 */  0x0A, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
                    /* 0068 */  0x40, 0x0B, 0x08, 0x07, 0x40, 0x0B, 0x08, 0x07 
                }, 

                "NVPM", 
                Buffer (0x1C)
                {
                    /* 0000 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0008 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0010 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0018 */  0x00, 0x00, 0x00, 0x00                         
                }, 

                "@0,compatible", 
                Buffer (0x0B)
                {
                    "NVDA,NVMac"
                }, 

                "@0,device_type", 
                Buffer (0x08)
                {
                    "display"
                }, 

                "@0,display-type", 
                Buffer (0x04)
                {
                    "LCD"
                }, 

                "@0,name", 
                Buffer (0x0F)
                {
                    "NVDA,Display-A"
                }, 

                "@1,compatible", 
                Buffer (0x0B)
                {
                    "NVDA,NVMac"
                }, 

                "@1,device_type", 
                Buffer (0x08)
                {
                    "display"
                }, 

                "@1,name", 
                Buffer (0x0F)
                {
                    "NVDA,Display-B"
                }, 

                "hda-gfx", 
                Buffer (0x0A)
                {
                    "onboard-1"
                }
            })
        }

we also need to add a pnlf patch to your DSDT

 


Scope (_SB)
    {
        Device (PNLF)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
            Name (_CID, "backlight")  // _CID: Compatible ID
            Name (_UID, 0x0A)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
        }
    }

thats all thats needed for the acpi files.

 

we now need to create a backlight injector for your display, use the script below to make the injector and install it to System/Library/Extensions.

https://github.com/onejay09/AppleBacklightInjector

 

if your backlight still isnt working then post problem reporting files.

Hi my friend... Thanks for this guide. I fix my brightness control.

Link to comment
Share on other sites

Hi, i'm trying to apply this fix to the Acer Predator Helios 500, with mild success so far. Most things are working excepting the internal LCD brightness control. This laptop features a discrete GPU (Nvidia Geforce GTX 1070) with factory disabled Intel GPU (and no way to enable it, even with modded bios, I tried). What I've got so far:

 

- Configured Bios as suggested on other posts: disable vt-d, disabled thunderbolt ports (thanks my modded bios),

- Successfully installed High Sierra (10.13.6) + Nvidia Web Drivers to get full QE/CI on NVMe Samsung 970 EVo 256GB SSD, (without any driver needed for the SSD)

- CPU Intel 8750h is recognized as Unknown Type: tried to fix this by installing High Sierra Update 2, but it refuses to install even with SMBios configured to MacBookPro 15,1. Must be something related to the Intel GPU being disabled, from what I understand the patch checks the graphics ig-platform-id or something related for compatibility (booted with -no_compat_check has no effect). At least, CPU runs cool so power management seems okay,

- Patched DSDT + SSDT (SSDT-8.aml in my case) to include PNLF and modify _DSM method (renaming existing to XDSM): had to adjust the display number within the (my internal LCD runs on display #2),

- Patched AppleBacklight kext and replaced within /System/Library/Extensions, kextcache rebuild and rebooted.

 

Getting black screen on internal LCD, but usable on external Display Port on Acer 32 B326HUL. I'm decompiling and recompiling AML ACPI files using iasl, MacIasl and patchmatic provided by Rehabman. When configuring display through the external monitor, brightness adjustment is available on LCD but has no effect. Screen remains dark (but backlight is on).

 

IOReg recognizes the internal LCD as AppleBacklightDisplay successfully once backlight kext patched and ACPI patched using Clover ACPI/patched (with AutoMerge=true). The internal LCD is "17.3 inch 16:9, 1920 x 1080 pixel 141 PPI, AUO_B173HAN03, IPS, 144 Hz G-Sync, glossy: no" according to notebook check. I'm not willing to upgrade to Mojave yet (this could fix CPU recognition) because Nvidia Web drivers aren't available yet.

 

If someone has an idea what I can do. I thought about the brightness steps which could be wrong, but not sure how to modify those hex values properly (have seen the original brightness control steps within the same SSDT on _SB.PCI0.PEG0.PEGP.LCD0)

Link to comment
Share on other sites

  • 3 weeks later...

Hello all,
Great progress on this, thanks so much for the hard work.

For some reason I am not able to set my built-in display to show up as one. Hence, it's blocking my progress in achieving the backlight control.
I am running a GeForce 1070, IGPU disabled. My built-in display shows up as B@1, external monitor as C@2. Both work perfectly fine with full HW acceleration, but I'm not able to control the brightness (duh).

I've patched the DSDT with @1,built-in, tried changing the connector-type. It still shows up as an external display with <84 41 00 00> connector flag.

 

Could anyone please point me to the right direction? Many thanks in advance.

Screen Shot 2018-11-15 at 19.43.54.png

Link to comment
Share on other sites

Hi, shouldn't the method be named "_DSM" instead of "XDSM"? As your display is not recognized as AppleBacklightDisplay, I suspect you have not patched the right ACPI file. Find the _DSM method of your GPU then rename it to XDSM. Then put the _DSM method provided in first post.

Link to comment
Share on other sites

6 hours ago, foskvs said:

Hard to say without seeing your ACPI tables. Anyway, Device Specific Method MUST be named _DSM. Otherwise, it doesn't inject those properties. That's why you display is not detected as Built-in.

Okay, progress!

However, the brightness slider, as expected, does not work. Currently using shades to just darken the display. Thank you so much for the help!

Screen Shot 2018-11-16 at 18.17.28.png

Link to comment
Share on other sites

  • 1 month later...

This is for the default display at B@1. below is my practical experience.

 

Sierra 10.12.6, Brightness control is working

 

1132130916_ScreenShot2018-12-21at9_52_58PM.thumb.png.13217f6125c0767f960c08905f6757e3.png

 

what did I do:

  • fix XOSI
  • add device PNLF
  • rename GFX0 to _GFX both DSDT and SSDTs
  • rename PEGP to GFX0 both DSDT and SSDTs
  • add device (HDAU) under PEG0
  • return (one) under device (EDP1)

 

Brightness control shortcut key

            Method (_Q10, 0, NotSerialized)  // _Qxx: EC Query
            {
                If (LEqual (GPUM, 0x05))
                {
                    Notify (PS2K, 0x0205)
                    Notify (PS2K, 0x0285)
                }

                If (LEqual (GPUM, 0x03))
                {
                    Notify (^^^_GFX.DD1F, 0x87)
                }
                ElseIf (CondRefOf (\_SB.PCI0.PEG0.GFX0.EDP1))
                {
                    Notify (^^^PEG0.GFX0.EDP1, 0x87)
                }
            }

            Method (_Q11, 0, NotSerialized)  // _Qxx: EC Query
            {
                If (LEqual (GPUM, 0x05))
                {
                    Notify (PS2K, 0x0206)
                    Notify (PS2K, 0x0286)
                }

                If (LEqual (GPUM, 0x03))
                {
                    Notify (^^^_GFX.DD1F, 0x86)
                }
                ElseIf (CondRefOf (\_SB.PCI0.PEG0.GFX0.EDP1))
                {
                    Notify (^^^PEG0.GFX0.EDP1, 0x86)
                }
            }

 

_DSM of Device (GFX0)

                    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                    {
                        If (LEqual (Arg2, Zero))
                        {
                            Return (Buffer (One)
                            {
                                 0x03                                           
                            })
                        }

                        Return (Package (0x18)
                        {
                            "@1,AAPL,boot-display", 
                            Buffer (One)
                            {
                                 0x01                                           
                            }, 

                            "@1,backlight-control", 
                            Buffer (0x04)
                            {
                                 0x01, 0x00, 0x00, 0x00                         
                            }, 

                            "@1,display-type", 
                            Buffer (0x04)
                            {
                                "LCD"
                            }, 

                            "@1,built-in", 
                            Buffer (One)
                            {
                                 0x01                                           
                            }, 

                            "@0,connector-type", 
                            Buffer (0x04)
                            {
                                 0x00, 0x08, 0x00, 0x00                         
                            }, 

                            "@1,connector-type", 
                            Buffer (0x04)
                            {
                                 0x00, 0x04, 0x00, 0x00                         
                            }, 

                            "@2,connector-type", 
                            Buffer (0x04)
                            {
                                 0x00, 0x04, 0x00, 0x00                         
                            }, 

                            "@3,connector-type", 
                            Buffer (0x04)
                            {
                                 0x00, 0x04, 0x00, 0x00                         
                            }, 

                            "@4,connector-type", 
                            Buffer (0x04)
                            {
                                 0x00, 0x04, 0x00, 0x00                         
                            }, 

                            "@5,connector-type", 
                            Buffer (0x04)
                            {
                                 0x00, 0x04, 0x00, 0x00                         
                            }, 

                            "@1,pwm-info", 
                            Buffer (0x14)
                            {
                                /* 0000 */  0x01, 0x14, 0x00, 0x64, 0xA8, 0x61, 0x00, 0x00,
                                /* 0008 */  0x1E, 0x02, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00,
                                /* 0010 */  0x00, 0x04, 0x00, 0x00                         
                            }, 

                            "hda-gfx", 
                            Buffer (0x0A)
                            {
                                "onboard-1"
                            }
                        })
                    }

 

admin’s iMac_builtin1_brightnessOk_butNoHDMI.ioreg

 

DSDT.aml

SSDT-10-84DB.aml

SSDT-XOSI.aml

Edited by mail_hxm
  • Like 2
Link to comment
Share on other sites

 Share

×
×
  • Create New...