Jump to content
InsanelyMac Forum
onejay09

please help me fix Brightness Control Nvidia Graphics Only Laptop

Recommended Posts

Hi Everyone
I'm Trying to get my laptop running OS X Sierra, So far everything is working except for screen backlight and keyboard backlight.
this laptop has not got intel graphics its disabled from factory, the Nvidia graphics work fine with the new pascal web drivers but I can't find a working solution to fix the backlight control.
I can't figure out why none of the patches I apply to the DSDT Fix the backlight, theres not much documentation regarding dedicated graphics in laptops that help with this issue

1st I noticed that the display prefpane looks like MacOS thinks its an external Display, so PNLF is pointless without the display being classed as "Built-In" I presume?
2nd theres no default PNLF device in the dsdt,


but theres something similar in one of the ssdt's, note I added rename GFX0 to IGPU.patch to all my Tables

    Scope (\_SB.PCI0)
    {
        Device (DPLY)
        {
            Name (_HID, EisaId ("INT3406"))  // _HID: Hardware ID
            Name (_UID, "DPLY")  // _UID: Unique ID
            Name (BDLI, 0x20)
            Name (BDHI, 0x52)
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (LEqual (DISE, One))
                {
                    Return (0x0F)
                }
                Else
                {
                    Return (Zero)
                }
            }

            Method (DDDL, 0, NotSerialized)
            {
                Return (BDLI)
            }

            Method (DDPC, 0, NotSerialized)
            {
                Return (BDHI)
            }

            Method (_BCL, 0, NotSerialized)  // _BCL: Brightness Control Levels
            {
                If (CondRefOf (\_SB.PCI0.IGPU.LCDD._BCL))
                {
                    Return (\_SB.PCI0.IGPU.LCDD._BCL ())
                }
                Else
                {
                    Return (Package (0x01)
                    {
                        Zero
                    })
                }
            }

            Method (_BCM, 1, NotSerialized)  // _BCM: Brightness Control Method
            {
                If (CondRefOf (\_SB.PCI0.IGPU.LCDD._BCM))
                {
                    \_SB.PCI0.IGPU.LCDD._BCM (Arg0)
                }
            }

            Method (_BQC, 0, NotSerialized)  // _BQC: Brightness Query Current
            {
                If (CondRefOf (\_SB.PCI0.IGPU.LCDD._BQC))
                {
                    Return (\_SB.PCI0.IGPU.LCDD._BQC ())
                }
                Else
                {
                    Return (Zero)
                }
            }

            Method (_DCS, 0, NotSerialized)  // _DCS: Display Current Status
            {
                If (CondRefOf (\_SB.PCI0.IGPU.LCDD._DCS))
                {
                    Return (\_SB.PCI0.IGPU.LCDD._DCS ())
                }
                Else
                {
                    Return (Zero)
                }
            }
        }
    }

this is what I added to the dsdt

        Device (PNLF)
        {
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
            Name (_CID, "backlight")  // _CID: Compatible ID
            Name (_UID, 0x0A)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
            Method (_DOS, 1, NotSerialized)  // _DOS: Disable Output Switching
            {
            }

            Method (_BCL, 0, NotSerialized)  // _BCL: Brightness Control Levels
            {
                Return (^^PCI0.PEG0.IGPU.LCDD._BCL ())
            }

            Method (_BCM, 1, NotSerialized)  // _BCM: Brightness Control Method
            {
                ^^PCI0.PEG0.IGPU.LCDD._BCM (Arg0)
            }

            Method (_BQC, 0, NotSerialized)  // _BQC: Brightness Query Current
            {
                Return (^^PCI0.PEG0.IGPU.LCDD._BQC ())
            }
        }
    }

theres no backlight control atall
can someone please help me figure this out as the laptop is rather new and so is the graphics chip, theres not much documentation thats helpful at the moment
also could web drivers be a possible issue regarding this?

Ive attached my patched and unpatched DSDT's in my signature, if you need more information just let me know
my whole Clover Folder can be found Here, the original decompiled DSDT's are in /efi/efi/clover/acpi/backup/

I've attached an IOreg to this post
Thanks

intel 6th gen skylake I5 6300HQ
Nvidia dedicated graphics card GTX1060 6g
8gb ddr4 ram
intel h170 chipset
alc255
I needed USBinjectAll.kext and sata-100-series-unsuppoted.kext to get this to boot

Share this post


Link to post
Share on other sites
Advertisement

I just had to repatch my haswell laptop for this reason (non working backlight) intelbacklight and acpibacklight kexts no longer work nor do the normal dsdt ssdt patches. You need to use an additional kext, (AppleBacklightInjector.kext) a ssdt-pnlf and a config.plist patch. All previously used kexts need to be removed same as acpi patches. Either remove patches or repatch from start without pnlf patching.

This is only based on what I did and that was for haswell with Intel graphics (Nvidia disabled via dsdt and ssdt).

 

Sent from my SM-G930F using Tapatalk

Share this post


Link to post
Share on other sites

I found this info about the PNLF'ish looking piece if code

 

 

 

 

prompt: ACPI INT3406 display thermal driver

type: tristate

depends on: CONFIG_ACPI_VIDEO

defined in drivers/thermal/int340x_thermal/Kconfig

found in Linux kernels: 4.7–4.10, 4.11-rc+HEAD

modules built: int3406_thermal

Help text

 

The display thermal device represents the LED/LCD display panel that may or may not include touch support. The main function of the display thermal device is to allow control of the display brightness in order to address a thermal condition or to reduce power consumed by display device.

Share this post


Link to post
Share on other sites

anyone know if this would work?

    Scope (\_SB.PCI0)
    {            
        Device (PNLF)
        {
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
            Name (_CID, "backlight")  // _CID: Compatible ID
            Name (_UID, 0x0A)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
            Method (_DOS, 1, NotSerialized)  // _DOS: Disable Output Switching
            {
            }

            Method (_BCL, 0, NotSerialized)  // _BCL: Brightness Control Levels
            {
                Return (\_SB.PCI0.IGPU.LCDD._BCL ())

            }

            Method (_BCM, 1, NotSerialized)  // _BCM: Brightness Control Method
            {
                \_SB.PCI0.IGPU.LCDD._BCM (Arg0)
            }

            Method (_BQC, 0, NotSerialized)  // _BQC: Brightness Query Current
            {
                Return (\_SB.PCI0.IGPU.LCDD._BQC ())            }
        }
    }

I added this to my ssdt instead as the methods didn't exist in the dsdt?

I still dont have backlight control, in display prefs

Share this post


Link to post
Share on other sites

I just had to repatch my haswell laptop for this reason (non working backlight) intelbacklight and acpibacklight kexts no longer work nor do the normal dsdt ssdt patches. You need to use an additional kext, (AppleBacklightInjector.kext) a ssdt-pnlf and a config.plist patch. All previously used kexts need to be removed same as acpi patches. Either remove patches or repatch from start without pnlf patching.

This is only based on what I did and that was for haswell with Intel graphics (Nvidia disabled via dsdt and ssdt).

 

Sent from my SM-G930F using Tapatalk

thanks for the info mate, tbh I didn't see the AppleBacklightInjector.kext part the last rime I read it, I didn't know the 10.12.4 update broke backlight... oh well ill see if I can get it working with this approach.

Share this post


Link to post
Share on other sites

I've same prob too. brightness backlight work flawlessly on 10.10.5 (up/down FN Keys or slider on display pref). after Sierra 10.12.4 the slider won't work. I tried different version PNLF dsdt patch, and update to AsusACPIBacklight 1.7 kext by Dinesh but still same.

PS: Asus K/A43SM GT630M, default NVdrivers, no intel HD
 

Share this post


Link to post
Share on other sites

so this dsdt with the PNLF patch works in Yosemite?


you have a custom edit in this dsdt


            Device (PEGR)
            {
                Name (_ADR, 0x00010000)  // _ADR: Address
                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (GPRW (0x09, 0x04))
                }

                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (PICM)
                    {
                        Return (AR02 ())
                    }

                    Return (PR02 ())
                }

                Device (GFX0)
                {
                    Name (_ADR, Zero)  // _ADR: Address
                    OperationRegion (VSID, PCI_Config, Zero, 0x04)
                    Field (VSID, ByteAcc, NoLock, Preserve)
                    {
                        REG0,   32
                    }

                    Name (BLAC, Package (0x0B) {})
                    Name (_SUN, One)  // _SUN: Slot User Number
                    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                    {
                        Store (Package (0x3C)
                            {
                                "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)
                                {
                                     0x03, 0x01, 0x00, 0x00                         
                                }, 

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

                                "@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 
                                }, 

                                "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,EDID", 
                                Buffer (0x80)
                                {
                                    /* 0000 */  0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
                                    /* 0008 */  0x30, 0xE4, 0xF8, 0x02, 0x00, 0x00, 0x00, 0x00,
                                    /* 0010 */  0x00, 0x14, 0x01, 0x03, 0x80, 0x1F, 0x11, 0x78,
                                    /* 0018 */  0x0A, 0x0D, 0x45, 0x9D, 0x5A, 0x55, 0x96, 0x26,
                                    /* 0020 */  0x1A, 0x50, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01,
                                    /* 0028 */  0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
                                    /* 0030 */  0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x58, 0x1B,
                                    /* 0038 */  0x56, 0x7E, 0x50, 0x00, 0x0E, 0x30, 0x24, 0x30,
                                    /* 0040 */  0x35, 0x00, 0x35, 0xAE, 0x10, 0x00, 0x00, 0x19,
                                    /* 0048 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                    /* 0050 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                    /* 0058 */  0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x4C,
                                    /* 0060 */  0x47, 0x20, 0x44, 0x69, 0x73, 0x70, 0x6C, 0x61,
                                    /* 0068 */  0x79, 0x0A, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFE,
                                    /* 0070 */  0x00, 0x4C, 0x50, 0x31, 0x34, 0x30, 0x57, 0x48,
                                    /* 0078 */  0x34, 0x2D, 0x54, 0x4C, 0x43, 0x31, 0x00, 0x08 
                                }, 

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

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

                                "@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"
                                }, 

                                "NVCAP", 
                                Buffer (0x18)
                                {
                                    /* 0000 */  0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
                                    /* 0008 */  0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
                                    /* 0010 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
                                }, 

                                "VRAM,totalsize", 
                                Buffer (0x04)
                                {
                                     0x00, 0x00, 0x00, 0x80                         
                                }, 

                                "device_type", 
                                Buffer (0x0C)
                                {
                                    "NVDA,Parent"
                                }, 

                                "model", 
                                Buffer (0x17)
                                {
                                    "NVIDIA GeForce GT 630M"
                                }, 

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

                                "rom-revision", 
                                Buffer (0x0F)
                                {
                                    "70.08.92.00.15"
                                }
                            }, Local0)
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                        Return (Local0)
                    }

Share this post


Link to post
Share on other sites

yes, I remembered last time added some patch in PEGR/GFX0 to enabling brightness animation.
but for brightness slider asusacpibacklight kext still needed .

Share this post


Link to post
Share on other sites

its strange that i cant apply an custom EDID with both clover and via dsdt like above, the display product/vendor id stay the same no matter what, it was an attempt to get the display recognised as built-in with backlight but it thinks its on a displayport, with PNLF in dsdt also.

i cant figure it out,

 

maybe its something with 10.12.4 thats stopping me

Share this post


Link to post
Share on other sites

i have a good new and a bad new

 

good new : we can enable brightness slide bar.  :D

bad new : display not change birghtness when slide the brightness bar. :blush:

2hYoTNC.jpg

Share this post


Link to post
Share on other sites

i have a good new and a bad new

 

good new : we can enable brightness slide bar.  :D

bad new : display not change birghtness when slide the brightness bar. :blush:

Hi, can you attach Acpi folder? Do brightness fn keys work (even if brightness doesn't actually change)?

Share this post


Link to post
Share on other sites

Wow!

@DuongTHVN!!!

 

How do you do to enable the Brightness Slider on Pascal???

 

I have a 1070 on a notebook...

 

Please share.

Attach your Clover folder, with Acpi tables. Enabling the slider is quite easy. The real trick is to get it working.

Put your hardware specs into signature.

Share this post


Link to post
Share on other sites

Attach your Clover folder, with Acpi tables. Enabling the slider is quite easy. The real trick is to get it working.

Put your hardware specs into signature.

 

Another 1 here, Thanks in advance

 

Computer:

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, Clover UEFI

aw15r3_CLOVER.zip

Share this post


Link to post
Share on other sites

heres my ioreg, i uploaded to my github 

ioreg

 

thanks mate

Just sharing my experience with my desktop. :thumbsup_anim:

These are the patches i added to my DSDT:

PNLF patch taken from a real iMac14,2 DSDT (with GeForce GTX 775M):

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
    }
}

Changed _DSM method of Nvidia (PEG0.GFX0) to match iMac14,2 and iMac17,1 ioregs:

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

                    Return (Package (0x18)
                    {
                        "@0,connector-type", 
                        Buffer (0x04)
                        {
                             0x02, 0x00, 0x00, 0x00                         
                        }, 

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

                        "@0,built-in", 
                        Buffer (Zero) {}, 
                        "@0,display-connect-flags", 
                        Buffer (0x04)
                        {
                             0x04, 0x00, 0x00, 0x00                         
                        }, 

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

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

                        "@0,display-type", 
                        "LCD", 

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

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

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

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

On this particular patch, i changed connectors to match my actual ones, but i think that you can still have the slider with HDMI (00080000) connectors.

On real iMacs with discrete graphics, dGPU is hda-gfx=onboard-1. But probably, the trick is to set the @0 port as "built-in".

iMac14,2:

post-1506069-0-83073800-1515528787_thumb.png

post-1506069-0-35937800-1515528804_thumb.png

This is the result on my desktop with GTX 950:

post-1506069-0-65474700-1515528837_thumb.png

post-1506069-0-83954400-1515528853_thumb.png

Unfortunately, even on Windows i don't have brightness control, but you might be luckier than me.

 

@onejay09, here's your DSDT (just added the two patches above).

 

@xela, you're the next ;)

 

Edit:

I forgot the DSDT... :hysterical:

DSDT.aml.zip

Share this post


Link to post
Share on other sites

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   1 member

×