Jump to content

please help me fix Brightness Control Nvidia Graphics Only Laptop


onejay09
 Share

199 posts in this topic

Recommended Posts

@onejay09 - Thank you!  Your AppleBacklightInjector.kext fixed backlight on my Thinkpad T61 / Sierra.  Previously, I was able to control my backlight with Bergdesign's Brightness (annoying, since I had to restore backlight levels after sleep and after boot)  and now with your solution my native SysPrefs->Display control works!  Nice work!  The complete solution for me was

  • Follow your directions to create AppleBacklightInjector.kext and install in S/L/E
  • Apply your PNLF patch
  • Insert my desired default BacklightLevel value in config.plist
  • Reboot

Now, everything works except I lose my Ethernet connection when I wake from sleep.  To restore, I need to toggle en0 down and up.  I'm using AppleIntelE1000e.kext version 3.3.6 which I think has this known issue.

My system is as follows:

  • Lenovo Thinkpad T61
  • Dual-boot Windows 7x64 / OSX Sierra
  • Clover (Legacy) 4439
  • Penryn T9300
  • 8GB DDR2-800
  • 256GB SSD
  • Thanks 1
Link to comment
Share on other sites

Hi onejay,

 

I have an issue with my Apple cinema displays not working with my desktop hackintohes with brightness. They work on fresh boot does do not work on wake from sleep (the brightness is fixed from pre sleep level). All other functions of keyboard and monitor are ok except brightness. I have a feeling it has something to do with the issues in this thread. Can you please guide me, in baby steps, on how to implement your patch?

 

I have AppleDisplay in IO and I dont know how or where to change it before applying your patch. Thank you.

 

Link to comment
Share on other sites

48 minutes ago, wolfie81 said:

Hi onejay,

 

I have an issue with my Apple cinema displays not working with my desktop hackintohes with brightness. They work on fresh boot does do not work on wake from sleep (the brightness is fixed from pre sleep level). All other functions of keyboard and monitor are ok except brightness. I have a feeling it has something to do with the issues in this thread. Can you please guide me, in baby steps, on how to implement your patch?

 

I have AppleDisplay in IO and I dont know how or where to change it before applying your patch. Thank you.

This is for Nvidia laptops not desktops

Link to comment
Share on other sites

@onejay09 - your instructions at https://github.com/onejay09/osx refer to changes that are required for graphics power management.  I've read your last paragraph that begins with "AppleGraphicsPowerManagment.kext: to have better power management..." and admit that I don't know enough to understand.  Would you mind elaborating on your instructions to dumb them down a little for me?  My Thinkpad T61 with Nvidia Quadro NVS 140m (running Sierra) is configured as a MacBook Pro 6,1.  I reviewed the info.plist in AppleGraphicsPowerManagement.kext and I know my Board ID, but that's as far as I got.

 

My graphics is named GFX0 in my DSDT, so are your directions saying that I could simply replace Mac-2BD1B31983FE1663 in the info.plist with my Board ID?

 

Thank you.

Edited by tonyx86
Link to comment
Share on other sites

You need to modify the info.plist,

Find a mbp that has Nvidia graphics, change its board I'd to your board I'd, and delete the old section with your board id.

Also make sure the GPU is named gfx0 in the info.plist for your new settings.

Link to comment
Share on other sites

@onejay09  - thanks again for your help and advice.  I tried various combinations of Info.plist mods (Adding a new Machine entry with my Board ID and GFX0, adding GFX0 to the MacBookPro6,1 Machine entry and adding a Vendor/Device entry to the Board ID and MacBookPro6,1 Machine entries. I thought these might make a difference, but after comparing GPU temps and frequencies to those reported in Windows 7, I'm not seeing any difference.  It appears as though AGPM is natively detecting and handling power management of the NVidia Quadro NVS 140m without any Info.plist mods.

 

Thanks again.

Edited by tonyx86
Link to comment
Share on other sites

  • 2 weeks later...
On 4/21/2018 at 1:56 AM, onejay09 said:

This is for Nvidia laptops not desktops

 

Hi onejay,

 

I know is for laptops, but I have the same laptop problem. On wake from sleep the slider bar for brightness in Display Preferences does not work. I can slide it, but no effect. The brightness is locked on the monitor and cannot control via Apple Keyboard. Im getting desperate as I tried the brightness app posted and it didn't work. I really think because I have an older mDP Cinema Display, the brightness app does not work as it relies on a certain protocol. This is why I am treating my Hackintosh as a Nvidia Laptop. Same problem.

 

Can you please help me. Im trying to understand your script, but I don't know how to change the AppleDisplay to AppleBackLightDisplay for your script or kext to work.

 

Can you please take a look and help me? Really appreciated.

 

https://www.dropbox.com/sh/h4tr8kpg4m1a2gg/AAAtqLVSqU5dxqDWDy1Jh9xXa?dl=0

 

For some reason, I couldn't upload my Clover folder here as it had an upload error.

 

 

 

 

Link to comment
Share on other sites

On 1/28/2018 at 2:18 PM, onejay09 said:

yes it works on hight sierra on running 10.13.3, ill take a look at your dsdt

 

 

 

decompile with refs.txt first then copy the changes i made

 

here is your dsdt, note you will need lilu.kext and nvidiagraphicsfixup.kext

 

 


            Device (PEG0)
            {
                Name (_ADR, 0x00010000)  // _ADR: Address
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    Store (One, ^GFX0.HDAE)                    
                    If (PICM)
                    {
                        Return (AR01)
                    }

                    Return (PR01)
                }
            }

theis first one enables your hdmi audio pci slot but you may need toleda's clover hdmi ssdt also, nvidiagraphicsfixup.kext

 

also your HDAU device is named NVAF in dsdt maybe rename nvaf to HDAU before adding toledas ssdt


    Scope (_SB.PCI0.PEG0)
    {
        Device (GFX0)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x09, 0x04))
            }

            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, 0x08, 0x00, 0x00                         
                    }, 

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

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

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

for this you have to rename original dsm method to xdsm


    Scope (_SB)
    {
        Device (PNLF)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
            Name (_CID, "backlight")  // _CID: Compatible ID
            Name (_UID, 0x0E)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
            Method (_BCL, 0, NotSerialized)  // _BCL: Brightness Control Levels
            {
                Return (^^PCI0.PEG0.GFX0.EDPD._BCL ())
            }

            Method (_BCM, 1, NotSerialized)  // _BCM: Brightness Control Method
            {
                Store (^^PCI0.PEG0.GFX0.GCBL (Arg0), Local0)
                Subtract (0x0A, Local0, LBTN)
                ^^PCI0.LPCB.EC0.STBR ()
            }

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

            Method (_DOS, 1, NotSerialized)  // _DOS: Disable Output Switching
            {
                ^^PCI0.PEG0.GFX0._DOS (Arg0)
            }
        }
    }

DSDT.dsl.zip

 

I've tried adding your patches and I keep getting compiler errors. If you are willing to help, my DSDT is attached.

DSDT.aml

Link to comment
Share on other sites

On 5/6/2018 at 9:52 PM, Jacie950 said:

 

I've tried adding your patches and I keep getting compiler errors. If you are willing to help, my DSDT is attached.

DSDT.aml

your nvidia graphics is named PEGP and the dsm method is not in your dsdt, its probably in a ssdt, you should add the pnlf patch to dsdt, then rename gfx0 to pegp in the patch,

and add it to the ssdt.

  • Like 1
Link to comment
Share on other sites

10 hours ago, onejay09 said:

your nvidia graphics is named PEGP and the dsm method is not in your dsdt, its probably in a ssdt, you should add the pnlf patch to dsdt, then rename gfx0 to pegp in the patch,

and add it to the ssdt.

 

Attached are SSDT files in which there is a _DSM method. Do I copy and paste the patch in all, or only specific ones?

SSDTs with _DSM.zip

Edited by Jacie950
Link to comment
Share on other sites

Just now, Jacie950 said:

 

I'm just gonna redo all my ACPI patches. How can I patch the SSDTs from Clover, like Rehabman said?

i dont think he understands that were adding code, not renaming anything, you can rename things in clover, im unaware of any way to add a _DSM method from clover, why dont you ask him?

Link to comment
Share on other sites

6 minutes ago, onejay09 said:

i dont think he understands that were adding code, not renaming anything, you can rename things in clover, im unaware of any way to add a _DSM method from clover, why dont you ask him?

 

Will do.

 

Rehabman says:

Quote

To add _DSM methods, no need to patch anything... (other than normal rename _DSM->XDSM patch).
See examples in ACPI hotpatch guide:
http://www.tonymacx86.com/threads/guide-using-clover-to-hotpatch-acpi.200137/

 

Edited by Jacie950
Link to comment
Share on other sites

 Share

×
×
  • Create New...