Jump to content

please help me fix Brightness Control Nvidia Graphics Only Laptop


199 posts in this topic

Recommended Posts

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.

Edited by onejay09
  • Like 1
  • Thanks 1

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

  • Like 1

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.

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

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.

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
 

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

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

  • 1 month later...
  • 6 months later...

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)?

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.

  • Like 1

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

Can you both attach an ioreg?

 

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

 

Thank You !

aw15r3 2018-0110.ioreg.zip

aw15r3_CLOVER 2018-0110.zip

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

  • Like 5
×
×
  • Create New...