Jump to content
frankiee

AppleGraphicsDevicePolicy "on the fly" patching - impossible? (alternate idea, but still does not seem to work)

120 posts in this topic

Recommended Posts

@cacekpawon

Great Idea! Work with OS X 10.11.2 El Capitan
I renamed the DSDT.aml in PEGP ➝ GFX1, GFX0 ➝ GFX2.
Original AppleGraphicsControl.kext S / L / E.
GTX650 working multiple displays.
 
post-1073423-0-39564800-1448549064_thumb.png
 
post-1073423-0-65150500-1448549074_thumb.png
 
Thank you!
 
 
 
 

Share this post


Link to post
Share on other sites
Advertisement

Renaming the GPU device also works, but then the ACPI calls to it all fail. Not so great for power management.

 

Could you give us more details Pike? What should i check?

Share this post


Link to post
Share on other sites

I can confirm that cecekpawon's patch works also on the recovery partition and installer.

 

I've been using Rampagedev's SSDT method and simply changed his SSDT entry for the graphics from GFX0 to GFX1.

 

That means I now have pretty much everything patched and loading from Clover (USB fixes etc.) except for Pike's HDA injection kext and power management. If only there was a way to get that loading from the EFI too! I still have to patch AICPUPM manually as the MSR fix in Clover does work on my X79-UD5 and for whatever reason I've not gotten the bin patch for AICPUPM on that one working from Clover either.

 

Either way, well done.

Share this post


Link to post
Share on other sites

So jealous, Pike quote everyone except me, am i in trouble now?

I'm so sorry. Had to take a break first. Ok. Power management. Well. Open your DSDT and GPU related SSDT table(s) and then you quickly find that certain calls to the GPU bits in the ACPI tables are not there anymore, and some of them are related to GPU Power Management.

 

Let's not forget that Skylake is the first chipset/CPU combination to introduce new power managment features for desktops. The real question is if you can do away with the missing ACPI bits and pieces ;)

Share this post


Link to post
Share on other sites

Thankyou. Ivybridge here Pike, i do mass rename all labelled by "GFX0" & "PEGP" in dsl or aml binary by Clover, all methods work as advertised. I can switch my internal / discrete gpu from bios / to activate both of them without any sleep / wake problem so far. Since im not an expert, i dont know what "GPU bits" problems is until you have time to explain it here

 

@bs0d i cant watch movies before i fix my power management

Share this post


Link to post
Share on other sites

OK, now for the more interesting stuff. I tried cecekpawons solution now, and what really confuses me it that with my test install I do get the infamous black screen again, but with the recovery partition on the same drive it actually works! Why is that? Have I overlooked something?

 

Here is what the relevant part of my SSDT looks like:

Device (_SB.PCI0.NPE3.GFX1)
{
    Name (_ADR, Zero)
    Method (_DSM, 4, NotSerialized)
    {
        If (LEqual (Arg2, Zero))
        {
            Return (Buffer (One)
            {
                0x03
            })
        }

        Return (Package (0x12)
        {
            "AAPL,slot-name", 
            Buffer (0x0B)
            {
                "PCI Slot 1"
            }, 

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

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

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

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

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

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

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

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

Device (_SB.PCI0.NPE3.HDAU)
{
    Name (_ADR, One)
    Method (_DSM, 4, NotSerialized)
    {
        If (LEqual (Arg2, Zero))
        {
            Return (Buffer (One)
            {
                0x03
            })
        }

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

I also checked my DSDT and there were no traces of the former device (PXS1), so I do not think I am missing something from that side. But why does it only work with the recovery partition (where Pikes patch did not work)? Do I actually have to "nullify" the original device name as well? Any help greatly appreciated!

Share this post


Link to post
Share on other sites

Frankiee, the code seems much the same as what I'm using, which is basically Rampagedev's with some code stripped out (see attached.) I don't use a DSDT on my board, I've got everything working without it.

 

I don't know if it's a kext issue with the Titan card, I'm just using a GTX-670 which is natively supported. I'm not using the nvidia web driver.

 

Might be a stupid question, but you reset any kext patches, either manual ones or in the bootloader?

SSDT-1.aml.zip

Share this post


Link to post
Share on other sites

Hmm, I tried with both the web driver and the native one, with and without kextcache but result is still the same. And I am using the same config for recovery as for the regular boot partition, so I really really wonder why it works there.

 

And yeah your SSDT looks (almost) identical, apart from the "@2,AAPL,boot-display" fix I use in addition but again, this is also effective with recovery. What exactly do you mean by "reset kext patches?" Of course I removed Pikes before, only clover patch that remains is for AppleHDA, but I do not think thats a problem. Plus, if I boot with this SSDT and a 5,1 SMBIOS machine also boots fine, and I see the device correctly as "GFX1" in ioReg. But yeah, 5,1 is of course not what I want.

 

Hmmmm. Really like that solution - think thats the best you can get, as it will work everywhere without any patches ... if it works, that is.

 

So, any ideas, anyone?

Share this post


Link to post
Share on other sites

OK, now for the more interesting stuff. I tried cecekpawons solution now, and what really confuses me it that with my test install I do get the infamous black screen again, but with the recovery partition on the same drive it actually works! Why is that? Have I overlooked something?

 

Here is what the relevant part of my SSDT looks like:

Device (_SB.PCI0.NPE3.GFX1)
{
    Name (_ADR, Zero)
    Method (_DSM, 4, NotSerialized)
    {
        If (LEqual (Arg2, Zero))
        {
            Return (Buffer (One)
            {
                0x03
            })
        }

        Return (Package (0x12)
        {
            "AAPL,slot-name", 
            Buffer (0x0B)
            {
                "PCI Slot 1"
            }, 

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

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

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

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

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

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

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

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

Device (_SB.PCI0.NPE3.HDAU)
{
    Name (_ADR, One)
    Method (_DSM, 4, NotSerialized)
    {
        If (LEqual (Arg2, Zero))
        {
            Return (Buffer (One)
            {
                0x03
            })
        }

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

I also checked my DSDT and there were no traces of the former device (PXS1), so I do not think I am missing something from that side. But why does it only work with the recovery partition (where Pikes patch did not work)? Do I actually have to "nullify" the original device name as well? Any help greatly appreciated!

 

Anyone better educated than me, please feel free to correct me. Because I use Nvidia, I named my GPUs PXS1/2 instead of GFX1/2 in my SSDTs to avoid OS X calling to the very unique and specific Real MacPro6,1 AMD GPUs (which don't exist on our X79 machines and neither does a integrated GPU like plain IvyBridge). There is no ACPI code for GPUs (that I can find) in Asus OEM X79 ACPI tables because there is no integrated GPU. In the real Mac Pro, GFX1 is unloaded and used for processing power only. Displays are plugged into GFX2. If you really want to match ACPI names you'd change NPE3 to GFXB and name the Nvidia GPU GFX2. Same as the real mac pro ACPI tables. However, I don't think you want OS X treating your Nvidia GPU like the AMD card from the Mac Pro.

 

For installing and recovery boot I've always just used nv_disable=1 or you could probably just change MacPro6,1 to MacPro5,1 in the smbios section of the clover GUI for that one boot operation.

 

EDIT: Even though the plist declares "GFX1" "unload", it seems that GFX1 remains the functional device and GFX2 is dead after OS X loads on a hackintosh. The usual school of thought says, give all individual devices unique names IE: GPU # 1 = GFX1 GPU # 2 = GFX2 etc etc, but naming multiple GPUs GFX1 works! If you have multiple discrete GPUs, use GFX1 in ACPI for all GPUs and they will all work. No kext binary patch or plist edit necessary.

Share this post


Link to post
Share on other sites

If you really want to match ACPI names you'd change NPE3 to GFXB and name the Nvidia GPU GFX2. Same as the real mac pro ACPI tables. However, I don't think you want OS X treating your Nvidia GPU like the AMD card from the Mac Pro.

 

Interesting idea, I tried though, black screen again.

 

Frankie, I just meant any kext patching in GraphicsDevicePolicy, though if that was patched you'd probably be seeing something. Dunno, it is weird that you can get to the Recovery but not the desktop. Something in the cache?

Share this post


Link to post
Share on other sites

@shilohhh is right, GFX2 as primary (boot-display), not sure about GFX1 as power only. For me, changing its parent to GFXA/B has no effect. From my experience, if i do reverse those labels: igpu ("GFX0") to "GFX1" & discrete ("PEGP") to "GFX2" everytime i got that black screen (maybe @J Lamp can proof it later). I need to enable Asus MVP from bios to activate both, and maybe because of this kind of technology my board can survive for this method (discrete actually routed from iGPU?), and ppl with no iGPU dont? About "treating" GPU, do you think is really bad idea to use NVDIA with macpro6 sysdef?

 

@frankiee since we use Clover, what i can advise is patch from Clover first (by duplicating default config, changing it values) to play with and do SSDT hack later. I can confirm it does work for recovery too. What im afraid to play with other smbios like @shilohhhs suggest maybe it can damage our internet account like current working iMessage, but it can be wrong..

Share this post


Link to post
Share on other sites

I tried the bin patch and no matter what I do, 1 of my 2 nvidia maxwell card has no signal after booting. It's not predictable which one will work. When I change config1 to none in the plist everything works flawlessly. I will keep using my AGDPfix app to autopatch the plist after updateshttp://www.insanelymac.com/forum/files/file/424-agdpfix/

 

 

 

 

EDIT: Even though the plist declares "GFX1" "unload", it seems that GFX1 remains the functional device and GFX2 is dead after OS X loads on a hackintosh. The usual school of thought says, give all individual devices unique names IE: GPU # 1 = GFX1 GPU # 2 = GFX2 etc etc, but naming multiple GPUs GFX1 works! If you have multiple discrete GPUs, use GFX1 in ACPI for all GPUs and they will all work. No kext binary patch or plist edit necessary.

 

The attached SSDTs are for Asus Rampage IV Black Edition and Extreme motherboards (maybe other X79 boards too but you'll need to verify your device paths). You could also just use them for examples.

Nvidia Maxwell (5port) HDMI GPU SSDT.zip

Share this post


Link to post
Share on other sites
I use my desktop computer, @cecekpawon DSDT patch for days. It works perfectly. I use it for work, so do not care about power management, performance only.

This is a convenient solution on the fly.

What is the difference fakeSMC, fake ID, DSDT patch, Etc ..? Deceiving the OS X. This is our task.   :)

Share this post


Link to post
Share on other sites

Yeah, so it seems we have different solutions and we also need them all:

  1. DSDT solution does not seem to work for everyone
  2. Binpatch by Pike also seems to have problems with multiple GPUs
  3. Manual plist patching seems to work for everyone, but needs manual work after updates and does not work with boot stick or recovery partitions

So, choose what works best I guess.

 

For installing and recovery boot I've always just used nv_disable=1 or you could probably just change MacPro6,1 to MacPro5,1 in the smbios section of the clover GUI for that one boot operation.

 

I want to add a small hint for those who are using their recovery partitions - instead of having to set nv_disable manually, you can also do the following:

  1. Clone your standard info.plist and name it for example "config_alt.plist". Save it in the same location.
  2. Change the SMBIOS type in this plist to, for example "MacPro 5,1" - or set nv_disable in the boot args, that should also work
  3. Add a custom entry for your recovery partition
  4. Use a  Clover setting described here: http://www.insanelymac.com/forum/topic/304530-clover-change-explanations/?p=2168344
  5. I.e. add a key named "Settings" with the name of your alternate config.plist (but omit the suffix!), like this:
<dict>
    ....
    <key>Settings</key>
    <string>config_alt</string>
</dict>

Now each time you boot into recovery this config is used automatically instead of the default one. Plus, in case of needing to patch AGDP you also can choose this config for regular booting manually in the clover boot screen (under "options"). It might also be a good idea to set csr-active-config to "allow all" in this special config, to have a kind of fallback just in case your "standard boot" goes wrong bc of SIP issues.

Share this post


Link to post
Share on other sites

I recommended my fellow mods to cleanse this topic of all off-topic posts (even mine, when it's done). Regardless of the actual merit of it, this is not the place to call out Pike for his copyright claims and/or his supposed nickname changes.

Share this post


Link to post
Share on other sites

I recommended my fellow mods to cleanse this topic of all off-topic posts (even mine, when it's done). 

Not aware of this Topic until someone link me here quoting one post. 

What to say, Insanelymac these technical arguments but I found a bit of {censored} and OT here , so I cleaned really many posts.

I believe that in the future those who do not comply with simple rules will be punished with the tools that the Forum provides (incremental score that leads to being banned, so please read before writing if collides with our simple rules.).

Share this post


Link to post
Share on other sites

@shilohhh is right, GFX2 as primary (boot-display), not sure about GFX1 as power only. For me, changing its parent to GFXA/B has no effect. From my experience, if i do reverse those labels: igpu ("GFX0") to "GFX1" & discrete ("PEGP") to "GFX2" everytime i got that black screen (maybe @J Lamp can proof it later). I need to enable Asus MVP from bios to activate both, and maybe because of this kind of technology my board can survive for this method (discrete actually routed from iGPU?), and ppl with no iGPU dont? About "treating" GPU, do you think is really bad idea to use NVDIA with macpro6 sysdef?

 

The MacPro6,1 kexts must be doing something tricky under the hood. Even though the plist declares "GFX1" "unload", it seems that GFX1 remains the functional device and GFX2 is dead after OS X loads on a hackintosh. Maybe something to do with "Device (GCON)" in the OEM DSDT. I'm no coder so I don't know. The usual school of thought says, give all individual devices unique names IE: GPU # 1 = GFX1 GPU # 2 = GFX2 etc etc, but naming multiple GPUs GFX1 works! If you have multiple discrete GPUs, use GFX1 in ACPI for all GPUs and they will all work. No kext binary patch or plist edit necessary.

 

If you name discrete GPU to GFX1 and leave the IGPU name alone, does the integrated graphics still work? I don't have a system with integrated graphics to test.

Share this post


Link to post
Share on other sites

Never did that before (since i believe "IGPU" label [as primary / mirror] just for some book / mini / imac family, not macpro), including your style to rename multiple devices with non unique label seem to "hacky" for me, take a good reference here >>> Sorry, no other monitor ready for test right now

Share this post


Link to post
Share on other sites

Never did that before (since i believe "IGPU" label [as primary / mirror] just for some book / mini / imac family, not macpro), including your style to rename multiple devices with non unique label seem to "hacky" for me, take a good reference here >>> Sorry, no other monitor ready for test right now

I know that Mac Pros have no IGPUs but you might still be able to use the device if OX S isn't doing something strange to it based on the sys def. But probably not as the cards I had named PXS1 and 2 got disabled. I was just curios if your IGPU worked or would work if you kept the name IGPU.

 

Technically 2 GPUs named GFX1 are still unique because of their device path. IE: GPU #1 _SB.PCI0.NPE3.GFX1 and GPU #2 _SB.PCI0.NPE7.GFX1. However, OS X should do whatever it's supposed to do to GFX1 to both cards because of their name at the end. I have a Titan X and a GTX 980 both named GFX1 that both work as they should. Hot plugging monitors and swapping ports, multiple displays on either or both cards and you can choose which monitor has the doc and menu bar in system prefs. I don't think you should name a IGPU as GFX because they share system memory and discrete don't.

 

I am also curious why you prefer MacPro6,1 instead of iMac13,2 which has more similar hardware to your system (IvyBridge CPU, integrated + discrete graphics)?

Share this post


Link to post
Share on other sites

Excite to rename my integrated graphic back to "IGPU" like I did with imac13 sysdef year before, set as primary & single monitor it booted just fine without any glitches. The only reason for me to use macpro6 sysdef & wont go back to imac is to keep my internet account safe & alive. About unique things for devices labeling, please dont get me wrong. Apple seem have specified settings for each products, like they did in USB / Audio / Graphic / etc we both dont know, find pattern & apply settings by label not the device-id, not sure.

 

My original integrated graphic was "GFX0". Maybe you are right, no seriously effect changing its name to "IGPU" or other name. But i prefer to use my current method since "hack" for me is to: clone dumped mac acpi & remove unnecessary devices first as much as we can, and do OS bin patch later, or even buying new hardware to get "survive".

Share this post


Link to post
Share on other sites

The MacPro6,1 kexts must be doing something tricky under the hood. Even though the plist declares "GFX1" "unload", it seems that GFX1 remains the functional device and GFX2 is dead after OS X loads on a hackintosh. Maybe something to do with "Device (GCON)" in the OEM DSDT. I'm no coder so I don't know. The usual school of thought says, give all individual devices unique names IE: GPU # 1 = GFX1 GPU # 2 = GFX2 etc etc, but naming multiple GPUs GFX1 works! If you have multiple discrete GPUs, use GFX1 in ACPI for all GPUs and they will all work. No kext binary patch or plist edit necessary.

 

If you name discrete GPU to GFX1 and leave the IGPU name alone, does the integrated graphics still work? I don't have a system with integrated graphics to test.

Thanks shilohhh. This allows me to get a multi-card setup working with MacPro6,1.

 

Adding an SSDT with GFX1 and voila ;) 

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.

×