***I am not using AGDPfix at the moment. I am trying to keep macOS files untouched if possible and it might be worth noting that my HD 530 graphics is completely handled by Whatevergreen as described in post #1 of the link below. I don't use any other kexts or injection of any kind***
The code at the bottom I added to Devices\Properties. It essentially switches the connection index of connections 2 and 3 as shown in Hackintool:
This is for Skylake using PlatformID 0x19120000 with the framebuffer for macOS 10.14 selected in Hackintool.
[-1] busID: 0x00, Pipe: 0, Type: Dummy, Flags: 0x00000020
[1] busID: 0x05, Pipe: 9, Type: DP Flags: 0x00000187
[2] busID: 0x04, Pipe: 10, Type: DP Flags: 0x00000187
[3]. busID: 0x06, Pipe: 10, Type: DP Flags: 0x00000187
I realised from the below information that I read here,
https://www.tonymacx86.com/threads/guide-intel-framebuffer-patching-using-whatevergreen.256490/ (Post #2, Skylake 1912000 Section), that the connection index shown in Hackintool under connections was incorrect. In IOReg AppleIntelFramebuffer@2 was showing a Port Number of 0x6 which was the busID of connectection 3 in Hackintool which is inaccessible as you can see below there are only 3 indexes (-1 being a dummy) not 4 like in Hackintool.
ID: 19120000, STOLEN: 34 MB, FBMEM: 21 MB, VRAM: 1536 MB, Flags: 0x0000110F
TOTAL STOLEN: 56 MB, TOTAL CURSOR: 1 MB (1572864 bytes), MAX STOLEN: 124 MB, MAX OVERALL: 125 MB (131608576 bytes)
GPU Name: Intel HD Graphics 530
Model Name(s): iMac17,1
Camelia: Disabled, Freq: 1388 Hz, FreqMax: 1388 Hz
Mobile: 1, PipeCount: 3, PortCount: 3, FBMemoryCount: 3
[-1] busId: 0x00, pipe: 0, type: 0x00000001, flags: 0x00000020 - Dummy
[1] busId: 0x05, pipe: 9, type: 0x00000400, flags: 0x00000187 - DP
[2] busId: 0x04, pipe: 10, type: 0x00000400, flags: 0x00000187 - DP
FF000000 01000000 20000000
01050900 00040000 87010000
02040A00 00040000 87010000
So the below code essentially switches index 2 and index 3 around. This then gives you a port number of 0x7 under AppleIntelFramebuffer@2 in IOReg which in turn allows the second display to work. Only under hot plug after you are at the desktop at the moment but it seems promising.
I am unsure whether the port number needs to be changed to 0x6 to match the busID and if so, whether this will allow the audio to work over the second monitor. I have noticed that when the second monitor is connected that the audio-codec-info under AppleIntelFramebuffer@1 and AppleIntelFramebuffer@2 in IOReg are different. I am new to framebuffer patching so this may be the case anyhow.
I'm not 100% sure why this works and I may have left some information out as it was 3am when I was experimenting with this and I am now trying to remember what I did but it seems to work fine so far as long as you hot plug.
Oh and the framebuffer-unifiedmem patch ups the VRAM from 1536 Mb to 2048 Mb and you can remove that if you decide to try this.
<key>Properties</key>
<dict>
<key>PciRoot(0x0)/Pci(0x2,0x0)</key>
<dict>
<key>AAPL,ig-platform-id</key>
<data>
AAASGQ==
</data>
<key>device-id</key>
<data>
EhkAAA==
</data>
<key>framebuffer-con2-enable</key>
<data>
AQAAAA==
</data>
<key>framebuffer-con2-index</key>
<data>
AwAAAA==
</data>
<key>framebuffer-con3-enable</key>
<data>
AQAAAA==
</data>
<key>framebuffer-con3-index</key>
<data>
AgAAAA==
</data>
<key>framebuffer-patch-enable</key>
<data>
AQAAAA==
</data>
<key>framebuffer-unifiedmem</key>
<data>
AAAAgA==
</data>