Jump to content

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


frankiee
 Share

120 posts in this topic

Recommended Posts

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.

 

 

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.

 

The DSDT patch does always work I think. However, if you have "nvda_drv=1" as a boot arg then it will lead to a black screen if old versions of the Nvidia drivers are present on that installation. That is why you are able to boot your Recovery HD, but not your main install.

 

So, if you want to boot after an update, you need to not only have GFX1 set in the DSDT, but you must also temporarily remove the nvda_drv=1 boot arg before starting up. As far as I can tell, this is required no matter what method you choose to get around AGC.kext, as this is a separate NVDAStartup.kext issue.

 

Test it yourself and you will see that you do not need nv_disable=1 when you have GFX1 set, so long as nvda_drv=1 is also not present.

 

 

 

Maybe editing NVDAStartup's Info.plist should be the next task?

 

Can we patch with Clover to an older OS version so that the driver loads even after an OS update? Although, the target for that patch would change each time a new driver is installed, unless Clover allows wildcards in the search parameters (which I do not believe it does).

 

I suppose I can handle some slight user interaction in order to get to desktop after an update, but leave any ideas you have. This is the only thing that is currently required after an update and I would sure love to get rid of it ;p

Link to comment
Share on other sites

Yes, meanwhile the SSDT patch does also work for me. Maybe this did not work the first time because I think back then the plist patch still was in effect. So yeah, great solution - kudos to cecekpawon! - esp. since you also can fix the 2nd stage bootlogo glitch within the same SSDT entry. One step more to "vanilla" ...

Link to comment
Share on other sites

  • 3 months later...

Interesting patch... 'board-id' to 'board-ix'. So... Apple's code, failing to get the board-id from the ioreg, returns success for a whitelist check! Nice...

 

Too bad I don't think they do the same in AirPortBrcm4360.

 

Note: I have developed a patch (not board-id specific) for abgn whitelist, but no way to test (do not have the hardware subject to this whitelist check).

This patch may not works on OS X 10.11.5 and clover r3543, I don't know why.

Link to comment
Share on other sites

This patch may not works on OS X 10.11.5 and clover r3543, I don't know why.

 

I had consistent problems with Pike's patch from the get go.

 

The SSDT patch seems superior anyway since it works in the Recovery HD, alternatively you can use Clover to rename a DSDT device instead.

 

For example, on the ASUS X99 Deluxe i can rename H000->GFX1 and voila. Same principle as the SSDT patch.

Link to comment
Share on other sites

  • 3 weeks later...

Guys, any idea how to get an Nvidia GTX 950 up and running using Nvidia web driver?

 

The computer just restarts on the second stage boot, if I add nvda_drv=1 boot flag. If I don't add anything, or if I add nv_disable=1, it will boot ok but it will default to OS X driver, which has no acceleration and no support for this card.

 

I tried setting ConfigMap values to none, I'm not sure that's what I was supposed to do. But it still doesn't work.

 

Any idea?

 

UPDATE:

 

Nevermind. I installed the Nvidia Driver in Safe Mode. Apparently that caused all the issues.

 

So: uninstall (in normal mode) -> reinstall -> enable = all fixed.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

just put the modified into FakeSMC's Info.plist like this:

attachicon.gifBF92FF77-9728-4869-8E3A-1F911D70826B.jpg

Excellent idea ! It worked for me !

 

- In the ConfigMap entry, I replaced the string assigned to my board-ID (Mac-B809C3757DA9BB8D) with ‘none’

- As an additional measure, I renamed the entry keyed ‘Config2’ to ‘Config9’ to better ensure that it will not be loaded

 

You can have an idea of my detailed config and progresses here : https://github.com/barijaona/CLOVER_GA-Z170X-Gaming5/tree/video12

Link to comment
Share on other sites

Excellent idea ! It worked for me !

 

- In the ConfigMap entry, I replaced the string assigned to my board-ID (Mac-B809C3757DA9BB8D) with ‘none’

- As an additional measure, I renamed the entry keyed ‘Config2’ to ‘Config9’ to better ensure that it will not be loaded

 

You can have an idea of my detailed config and progresses here : https://github.com/barijaona/CLOVER_GA-Z170X-Gaming5/tree/video12

it changes with new version of colvetr 3758

Thanks for posting that

ADGPFIX works fine on sierra..thank you

Link to comment
Share on other sites

Two way of achieving the same goal… I have no problem about that, but for me, the real novelty is the patching of FakeSMC's Info.plist

i have identical hardwares with you...i use adgpfix fo patch the kext to enable gtx960 with system definition ima 17.1...

Link to comment
Share on other sites

i use adgpfix fo patch the kext to enable gtx960 with system definition ima 17.1...

I know it can be done with this script, but the goal in this thread is to find a solution which does not require reapplying the script at each macOS update…

 

I prefer the solution I found which packs everything in Clover folder in the ESP and does not require any change in S/L/E.

 

Currently, my hack runs with SIP enabled, like a standard Mac. It would be impossible if I have used adgpfix

Link to comment
Share on other sites

I know it can be done with this script, but the goal in this thread is to find a solution which does not require reapplying the script at each macOS update…

 

I prefer the solution I found which packs everything in Clover folder in the ESP and does not require any change in S/L/E.

 

Currently, my hack runs with SIP enabled, like a standard Mac. It would be impossible if I have used adgpfix

how to do that?

Link to comment
Share on other sites

Basically :

- reinstall Apple's version of AppleGraphicsControl.kext and AppleGraphicsDevicePolicy.kext

- just to be sure, repair permissions :

sudo /usr/libexec/repair_packages --verify --standard-pkgs --volume / 

 - mount the EFI partition, locate FakeSMC.kext into it

- add informations to its Info.plist, as this commit does

thank you..i will try...great work..it should be the best method i have seen

Link to comment
Share on other sites

I haven't tested Sierra yet.

I am still trying to identify what are the pre-requisites to make this work.

But I am pretty confident that, once these conditions are identified, this should work in Sierra too.

 

So far, I have identified that this trick requires the monitor to be connected to the DVI port of the Nvidia card. It does not work when I connect my monitor to a Display Port.

I haven't tested multiple monitors yet.

  • Like 1
Link to comment
Share on other sites

So far, my conclusions regarding the trick with FakeSMC.kext :

  • one must connect the monitor to the DVI port of the discrete GPU
  • no need to patch DSDT, at least with the mobo/GPU set I use
  • no explicit clover injection needed (cf. attached Clover's config.plist which remains functional while I removed many things related to video)
  • with Clover 3761 (latest release), one needs to have both :

nvda_drv=1 in Boot/Arguments

NvidiaWeb : true in SystemParameters,

which seems a bit counterintuitive, but I understand that the SystemParameters value is needed to emulate NVRAM, while the boot argument will require the graphics drivers to load

  • near the end of the boot sequence, the screen remains black for 3 or 4 seconds, but eventually OS X's login screen appears…
  • sleep and wake up seem perfect to me

 

Attached : minimalist config.plist and FakeSMC with modified Info.plist (original version taken from http://hwsensors.com/)

WorkaroundBlackScreen-iMac17,1.zip

  • Like 2
Link to comment
Share on other sites

no need to add in argument if NvidiaWeb is used

If your motherboard support NVRAM.

 

Series 100 motherboards like mine do not support NVRAM. You need either to keep the boot argument, or have the EmuVariableUefi-64 driver in your Clover setup

Doesn't appear to work for me on sierra.  I have to manually edit the AGDP info.plist.

I have just upgraded to Sierra and can confirm that it does not work anymore  :(

 

I still think this could be a part of a longer term solution.

Link to comment
Share on other sites

If your motherboard support NVRAM.

 

Series 100 motherboards like mine do not support NVRAM. You need either to keep the boot argument, or have the EmuVariableUefi-64 driver in your Clover setup

I have just upgraded to Sierra and can confirm that it does not work anymore  :(

 

I still think this could be a part of a longer term solution.

 

I tried the fakesmc kext you posted earlier today and I added my my board-id to the info.plist and it's working on sierra. I use clover kext injection for fakesmc.

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...