Jump to content
onejay09

please help me fix Brightness Control Nvidia Graphics Only Laptop

182 posts in this topic

Recommended Posts

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 !

Try with this DSDT.

 

thanks for your help, ill let you know soon if it works! wifi not working on osx yet!

 

What model?

DSDT.aml.zip

Share this post


Link to post
Share on other sites
Advertisement

no, ill be back after i try that thanks!

That kext is used on desktops with problems with AGDP.kext. Maybe your Board-ID is not supported "Out of the box" (like many desktop Board-IDs).

Share this post


Link to post
Share on other sites

In EFI/CLOVER/kexts/10.1x (depending on OS version). With latest Lilu.kext


Still no slider bar. Will check further and report back, Thanks !

Try with this one. I renamed PEGP to GFX0 into your DSDT.

 

Edit:

 

@onejay09, if you still have black screen, you can change connector id into DSDT

from LVDS:

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

to HDMI

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

DSDT.aml.zip

Share this post


Link to post
Share on other sites

 

In EFI/CLOVER/kexts/10.1x (depending on OS version). With latest Lilu.kext

Try with this one. I renamed PEGP to GFX0 into your DSDT.

 

 

Still no slider. Meanwhile i will check if there is any conflict in config.plist and acpi aml file .  Will report any new outcome.

Thanks !

Share this post


Link to post
Share on other sites

update:

i managed to make the display to power on by adding my board id to /System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/AppleGraphicsDevicePolicy.kext/Contents/Info.plist:

and changing the config to none, but no brightness slider if i do this.

 

pikeralpha made a patch for this issue that i havent tried yet,


            <dict>
                <key>Comment</key>
                <string>AppleGraphicsDevicePolicy (board-id) Patch (c) Pike R. Alpha</string>
                <key>Find</key>
                <data>
                Ym9hcmQtaWQ=
                </data>
                <key>Name</key>
                <string>AppleGraphicsDevicePolicy</string>
                <key>Replace</key>
                <data>
                Ym9hcmQtaXg=
                </data>
            </dict>
 

Share this post


Link to post
Share on other sites

You can try it. It works on Sierra. On HS, sometimes it doesn't work (you need to add NvidiaGraphicsFixup).

I tried a few things on my hack. These are my conclusions:

To get brightness fully working, you need three things:

1)Display detected as "Apple Backlight Display"

2) Brightness slider in System Preferences.

3) Slider working correctly.

 

1)

To get display detected as Apple Backlight Display, you have to open ioreg and see where is the monitor. Supposing it is under @0, you have to apply this patch to DSDT (or SSDT)

"@0,built-in", 
Buffer (Zero) {}

This patch works even if display is not under @0 port as you can see from these screenshots from my ioreg:

@0

post-1506069-0-39138500-1515591620_thumb.png

@3

 

 

"@3,built-in", 
Buffer (Zero) {} 

 

 

post-1506069-0-71720100-1515594311_thumb.png

No real need to change connector ids.

 

2)

To get brightness slider in System Preferences, you need 1) and these kexts loaded (kextstat | grep -i back):

133    1 0xffffff7f82122000 0x5000     0x5000     com.apple.driver.AppleBacklightExpert (1.1.0) 0EF5445E-D379-3470-8006-E5D35E61A5B9 <93 92 13 12 5 4 3>
134    0 0xffffff7f831e9000 0x5000     0x5000     com.apple.driver.AppleBacklight (170.10.2) 876BC025-F6D1-3445-BC47-67899C2839B2 <133 93 92 12 5 4 3>

3) (Not 100% sure about this)

To have a fully functional slider, we need brightness get/set methods (usually _BCL, _BCM, _BQC) under dGPU

Looking at iMac14,2 and iMac17,1 Acpi tables, i found that at SSDT-4 (iMac14,2) and at SSDT-5 (iMac17,1) there is this code:

Scope (\_SB.PCI0.P0P2)
{
    Device (GFX0)
    {
        //some stuff
        Method (ABCM, 1, NotSerialized)
        {
            //some stuff
        }
        Method (ABCL, 0, NotSerialized)
        {
            //some stuff
        }
        Device (LCD)
        {
            //some stuff
            Method (_BCL, 0, NotSerialized)  // _BCL: Brightness Control Levels
            {
                Return (ABCL ())
            }
            Method (_BCM, 1, NotSerialized)  // _BCM: Brightness Control Method
            {
                ABCM (Arg0)
            }

            Method (_BQC, 0, NotSerialized)  // _BQC: Brightness Query Current
            {
                Return (BRTL)
            }
    }
}

Method ABCM:

 

 

Method (ABCM, 1, NotSerialized)
{
    Store (Arg0, BRTL)
    If (BLCP (\_SB.PCI0.SBUS.BUS0.BLC0.BSET (Arg0), Return (Zero))) {}
    Store (0x02, Local0)
    While (LLess (Local0, 0x11))
    {
        If (LGreaterEqual (DerefOf (Index (BRTN, Local0)), Arg0))
        {
            Break
        }

        Increment (Local0)
    }

    Decrement (Local0)
    Decrement (Local0)
    ShiftLeft (Local0, 0x04, Local0)
    Or (Local0, 0x04, Local0)
    Acquire (MUTX, 0xFFFF)
    Store (Local0, SSMY)
    Store (0xBF, SSMP)
    Release (MUTX)
    Return (Zero)
} 

 

 

Method ABCL

 

 

Method (ABCL, 0, NotSerialized)
{
    Store (DerefOf (Index (BRTN, 0x0F)), Index (BRTN, 0x00))
    Store (DerefOf (Index (BRTN, 0x0A)), Index (BRTN, 0x01))
    Return (BRTN)
} 

 

 

BRTN is defined into DSDT under IGPU.

BRTL is defined into DSDT under here:

OperationRegion (GNVS, SystemMemory, 0x8CD3EA90, 0x026D)

So, it seems that to get brightness slider fully working we need to enable IGPU in "iMac-style" (platform-id with no video outputs and something else, as it doesn't show up in System Profiler):

post-1506069-0-47950000-1515593276_thumb.png

Finally, looking at iMac17,1 SSDT-5, i found a slightly different ABCL Method (the others are the same):

 

 

            Method (ABCL, 0, NotSerialized)
            {
                If (LLess (OSYS, 0x07DC))
                {
                    Store (DerefOf (Index (BRTN, 0x0F)), Index (BRTN, Zero))
                    Store (DerefOf (Index (BRTN, 0x0A)), Index (BRTN, One))
                    Return (BRTN)
                }
                Else
                {
                    Return (Package (0x52)
                    {
                        0x50, 
                        0x32, 
                        One, 
                        0x02, 
                        0x03, 
                        0x04, 
                        0x05, 
                        0x06, 
                        0x07, 
                        0x08, 
                        0x09, 
                        0x0A, 
                        0x0B, 
                        0x0C, 
                        0x0D, 
                        0x0E, 
                        0x0F, 
                        0x10, 
                        0x11, 
                        0x12, 
                        0x13, 
                        0x14, 
                        0x15, 
                        0x16, 
                        0x17, 
                        0x18, 
                        0x19, 
                        0x1A, 
                        0x1B, 
                        0x1C, 
                        0x1D, 
                        0x1E, 
                        0x1F, 
                        0x20, 
                        0x21, 
                        0x22, 
                        0x23, 
                        0x24, 
                        0x25, 
                        0x26, 
                        0x27, 
                        0x28, 
                        0x29, 
                        0x2A, 
                        0x2B, 
                        0x2C, 
                        0x2D, 
                        0x2E, 
                        0x2F, 
                        0x30, 
                        0x31, 
                        0x32, 
                        0x33, 
                        0x34, 
                        0x35, 
                        0x36, 
                        0x37, 
                        0x38, 
                        0x39, 
                        0x3A, 
                        0x3B, 
                        0x3C, 
                        0x3D, 
                        0x3E, 
                        0x3F, 
                        0x40, 
                        0x41, 
                        0x42, 
                        0x43, 
                        0x44, 
                        0x45, 
                        0x46, 
                        0x47, 
                        0x48, 
                        0x49, 
                        0x4A, 
                        0x4B, 
                        0x4C, 
                        0x4D, 
                        0x4E, 
                        0x4F, 
                        0x50
                    })
                }
            } 

 

 

OSYS > 0x07DC means "Darwin" and "Windows 2012". So, we can disable IGPU (no references to BRTN), but we still have to access System Memory (BRTL).

Keep in mind that iMac17,1 has AMD Radeon R9 M390, it thus has a slightly different PNLF patch and it doesn't use AppleBacklight.kext:

 

 

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
    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
    {
        Store (Package (0x04)
        {
            "refnum", 
            Zero, 
            "type", 
            BLCT    //0x49324300 from ioreg
        }, Local0)
        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
        Return (Local0)
    }
} 

 

 

iMac17,1 ioreg (PNLF):

post-1506069-0-63405100-1515594246_thumb.png

iMac17,1 has IGPU enabled with "particular" platoform-id too (maybe related to brightness control?):

post-1506069-0-82439200-1515594259_thumb.png

Share this post


Link to post
Share on other sites

Hello!

 

I tried with this SSDT options and ACPIBacklight.kext and when it boots, the brightness is 0, I cannot increase it... When I remove ACPIBacklight.kext, I have KP loading the Default Brightness kext, I realize, the if I remove the "NVDA,Parent" label from SSDT I avoid the KP...

 

                        Local0 = Package ()
                            {
                                "AAPL,slot-name", 
                                Buffer (0x04)
                                {
                                    "MXM"
                                },
                                "device_type",
                                 Buffer (0x0C)
                                  {
                                  "NVDA,Parent"
                                  },                                
                                "model", 
                                Buffer (0x18)
                                {
                                    "NVIDIA GeForce GTX 1070"
                                }, 
                                "AAPL,HasPanel", 
                                Unicode ("\x01"), 
                                "AAPL,HasLid", 
                                Unicode ("\x01"),                                 
                                "built-in", 
                                Buffer (One)
                                {
                                     0x01                                             /* . */
                                }, 
                                "AAPL,backlight-control", 
                                Unicode ("\x01"), 
                                "@0,backlight-control", 
                                Unicode ("\x01"), 
                                "@0,display-type", 
                                "LCD", 
                                "@0,device_type", 
                                Buffer (0x08)
                                {
                                    "display"
                                }, 
                                "@0,use-backlight-blanking", 
                                Buffer (0x04) {}, 
                                "@0,AAPL,boot-display", 
                                Unicode ("\x01"), 
                                "@0,built-in", 
                                Buffer (One)
                                {
                                     0x01                                             /* . */
                                }
                            }

Share this post


Link to post
Share on other sites

 

Hello!

 

I tried with this SSDT options and ACPIBacklight.kext and when it boots, the brightness is 0, I cannot increase it... When I remove ACPIBacklight.kext, I have KP loading the Default Brightness kext, I realize, the if I remove the "NVDA,Parent" label from SSDT I avoid the KP...               

Local0 = Package ()
                            {
                                "AAPL,slot-name", 
                                Buffer (0x04)
                                {
                                    "MXM"
                                },
                                "device_type",
                                 Buffer (0x0C)
                                  {
                                  "NVDA,Parent"
                                  },                                
                                "model", 
                                Buffer (0x18)
                                {
                                    "NVIDIA GeForce GTX 1070"
                                }, 
                                "AAPL,HasPanel", 
                                Unicode ("\x01"), 
                                "AAPL,HasLid", 
                                Unicode ("\x01"),                                 
                                "built-in", 
                                Buffer (One)
                                {
                                     0x01                                             /* . */
                                }, 
                                "AAPL,backlight-control", 
                                Unicode ("\x01"), 
                                "@0,backlight-control", 
                                Unicode ("\x01"), 
                                "@0,display-type", 
                                "LCD", 
                                "@0,device_type", 
                                Buffer (0x08)
                                {
                                    "display"
                                }, 
                                "@0,use-backlight-blanking", 
                                Buffer (0x04) {}, 
                                "@0,AAPL,boot-display", 
                                Unicode ("\x01"), 
                                "@0,built-in", 
                                Buffer (One)
                                {
                                     0x01                                             /* . */
                                }
                            }

 

Attach ioreg and Acpi folder.

Share this post


Link to post
Share on other sites

IOREG in an specific version?

I'd prefer you to use IORegistryExplorer 2.1

You can find it by clicking the link in my signature.

Share this post


Link to post
Share on other sites

Attach also origin folder with OEM tables. Download Hack_Info, run it and attach the report (zip folder on your desktop).

OS version?

Share this post


Link to post
Share on other sites

You should avoid injecting "cosmetic properties" from _DSM Methods

device_type=NVDA,Parent should appear in ioreg without any injections.

ACPIBacklight.kext doesn't work on High Sierra. Real macs with Nvidia cards use AppleBackight.kext.

Finally, you have a PS2 keyboard, so try to remap brightness hotkeys from DSDT (you need to patch _Qxx Methods depending on your hardware).

Do you have brightness slider without ACPIBacklight.kext?

 

PS.

Where did you find the code in the patched DSDT about the dGPU?

Share this post


Link to post
Share on other sites

My backlight is semi working with asusacpibacklight.kext, And brightness slider from berg designs, but the brightness slider doesn’t work in settings.

My fn keys don’t work never managed to get them working I think my keyboard isn’t ps2?

Share this post


Link to post
Share on other sites

My backlight is semi working with asusacpibacklight.kext, And brightness slider from berg designs, but the brightness slider doesn’t work in settings.

Brightness by bergdesign is not "connected" to the slider in System Preferences. To get brightness slider working we probably need to patch DSDT to add backlight control methods.

 

My fn keys don’t work never managed to get them working I think my keyboard isn’t ps2?

You probably have a I2C keyboard, but you should try to see if brightness fn key are related to Acpi methods. If they are, you can remap the key from DSDT.

Share this post


Link to post
Share on other sites

apparently the fn keys are seperate to the keyboard, and are usb.

what can i do with this?

I: Bus=0003 Vendor=0b05 Product=1837 Version=0110
N: Name="ASASTeK COMPUTER INC. ROG MacroKey"
P: Phys=usb-0000:00:14.0-8/input0
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/0003:0B05:1837.0004/input/input7
U: Uniq=
H: Handlers=sysrq kbd event7 leds
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff9f207ac14057ff febeffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=1f

I: Bus=0003 Vendor=0b05 Product=1837 Version=0110
N: Name="ASASTeK COMPUTER INC. ROG MacroKey"
P: Phys=usb-0000:00:14.0-8/input1
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.1/0003:0B05:1837.0005/input/input8
U: Uniq=
H: Handlers=kbd event8
B: PROP=0
B: EV=1f
B: KEY=3007f 0 0 483ffff17aff32d bf54444600000000 1 130c130b17c000 267bfad9415fed 9e168000004400 10000002
B: REL=40
B: ABS=ffffff0100000000
B: MSC=10

I: Bus=0003 Vendor=0b05 Product=1837 Version=0110
N: Name="ASASTeK COMPUTER INC. ROG MacroKey"
P: Phys=usb-0000:00:14.0-8/input2
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:0B05:1837.0006/input/input9
U: Uniq=
H: Handlers=mouse1 event9
B: PROP=0
B: EV=17
B: KEY=30000 0 0 0 0
B: REL=103
B: MSC=10

Share this post


Link to post
Share on other sites

I've no experience with that setup (I2C keyboard + USB Fn keys), but i can tell you that on my usb keyboard brightness hotkeys work OOB. Try to plug in an external keyboard and check if brightness keys work (by default they are mapped to F14 and F15).

Share this post


Link to post
Share on other sites

 

In EFI/CLOVER/kexts/10.1x (depending on OS version). With latest Lilu.kext

Try with this one. I renamed PEGP to GFX0 into your DSDT.

 

Edit:

 

@onejay09, if you still have black screen, you can change connector id into DSDT

from LVDS:

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

to HDMI

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

I am still not able to get brightness slider to show, is there anything else I should look at ? I am using macbookpro14,3 in smbios, had tried iMac14,2 to not avail.

 

Thank You !

 

Laptop:

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 2018-0114.zip

aw15r3.ioreg.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   0 members

    No registered users viewing this page.

×