Contribute
Register

<< Solved >> Dell Optiplex 7020 - 4K monitors on Intel 4600 Integrated GPU

Joined
Jan 21, 2012
Messages
1,000
Motherboard
HP 8300 Elite
CPU
i5-3570
Graphics
GT 710
Mobile Phone
  1. Android
Well, I physically swapped the plugs, and now my 4k shows up as "Built-in Retina display". For whatever reason the system thinks my second DP plug *is* my internal display. Regardless, it's working with the patch and I can now rotate the second display. Anyone else have this behaviour??
Yes - it seems to be normal - If you are wanting to make it right I think there may be other System Definitions that you would need to try and a bunch of stuff I dont know much about relating to ports and connectors.
 
Joined
Jan 21, 2012
Messages
1,000
Motherboard
HP 8300 Elite
CPU
i5-3570
Graphics
GT 710
Mobile Phone
  1. Android
@mgrimace would you mind posting your config from opencore - (deleting serial numbers before posting) It would help me make this next jump and I suspect others too.
Any comments or things you learned on following the instructions between the method described here and opencore would also be appreciated.
 
Joined
Jun 5, 2020
Messages
35
Motherboard
Optiplex 7020 SFF
CPU
i5 4590
Graphics
HD4600
Yes - it seems to be normal - If you are wanting to make it right I think there may be other System Definitions that you would need to try and a bunch of stuff I dont know much about relating to ports and connectors.

Ha ok, thanks! As long as it's working now I'm good. To clarify for folks, physical DP port 1 (DP1; near top of case, ps2 ports) = external; DP port 2 (DP2; near VGA port) = "internal" display. The internal display will be recognized as "Built-in Retina display" if using 4k, or "iMac" if using 1080p. Also, the internal display won't give you the option to rotate. if you want to rotate your display for whatever reason, use DP1.

@mgrimace would you mind posting your config from opencore - (deleting serial numbers before posting) It would help me make this next jump and I suspect others too.
Any comments or things you learned on following the instructions between the method described here and opencore would also be appreciated.

Absolutely! I'd be happy to help, I basically followed Zearp’s OptiHack guide on GitHub and I'm using an Optiplex 7020 SFF, 8gb RAM. The only hardware change I made was that I swapped the HDD for a 2.5" SSD. The EFI and config.plist is basically the same as found on Github with the only changes being ethernet MAC address, serials, the 4k patch posted below and from the OP in this thread, and I also added the line from the OP to increase the video memory to 2gb. Note the attached config.plist is sanitized (no serials or MAC address).

Some install notes:
  • If you want to swap in a 2.5” SSD from a 3.5” HDD, then you might want to grab the cheap caddy adapter on amazon: Search R494D approx. 10-15$. It fits inside the proprietary tray and holds 2xSSDs. This is the one I’m using.
  • Make sure the Optiplex 7020 is on A18 BIOS. I ended up installing windows first on the old HDD and running the Dell Bios updater tool. This makes it easier to disable CFG lock (needed) and change the DVMT pre-allocation (to support 4k monitors). Don’t change the values for these on the wrong BIOS.
  • In the BIOS load default settings, but change the boot settings to UEFI (or else you’ll get no boot device error and have to hit F12 to enter the boot menu to pick your USB installer)
  • I set my DVMT pre-allocation to 96 mb setup_var 0x263 0x3 which was recommended for 4k support (didn't work out of the box, still had to patch).
  • I haven't enabled EHCI hand-off yet, I didn't want to screw up the USB ports during the install process when I need them, and now things seem to be working fine.
  • When installing MacOS boot from installer first, then boot from the internal hard drive (it says boot from external as your second step on the GitHub guide)
Post-install 4k patch
  • Optional: I added the line framebuffer-unifiedmem to increase the video memory to 2gb from the OP as a new line in DeviceProperties
Key Type Value
framebuffer-unifiedmem
Data
00000080

  • Using Propertree to edit the config.plist, paste the following patch to root/kernal/patch to enable 4k (note: there won't be any patches here yet):
Code:
<array>
       <dict>
               <key>Base</key>
               <string></string>
               <key>Comment</key>
               <string>Enable 4k</string>
               <key>Count</key>
               <integer>0</integer>
               <key>Enabled</key>
               <true/>
               <key>Find</key>
               <data>
               AwAiDQADAwMAAAACAAAwAQ==
               </data>
               <key>Identifier</key>
               <string>com.apple.driver.AppleIntelFramebufferAzul</string>
               <key>Limit</key>
               <integer>0</integer>
               <key>Mask</key>
               <data>
               </data>
               <key>Replace</key>
               <data>
               AwAiDQADAwMAAAAEAAAAAw==
               </data>
               <key>ReplaceMask</key>
               <data>
               </data>
               <key>Skip</key>
               <integer>0</integer>
       </dict>
</array>

OR you can manually enter these values:

Key Type Value
Base
String
Comment
String
Enable 4k
Count
Number
0
Enabled
Boolean
True
Find
Data
0300220D 00030303 00000002 00003001
Identifier
String
com.apple.driver.AppleIntelFramebufferAzul
Limit
Number
0
Mask
Data
Replace
Data
0300220D 00030303 00000006 00000003
ReplaceMask
Data
Skip
Number
0


With credit to Zearp and everyone in this thread, here’s what the patch does (in find):
  • 0300220D = Platform ID
  • 00030303 = Pipe and port count
  • 00000002 = DVMT allocation
  • 00003001 = Framebuffer memory
The patch changes the last two values (in replace):
  • Changing the DVMT from 00000002 to 00000004 would set a 64MB DVMT allocation which was the original suggestion for the patch. I tried changing it to 00000006 to 96MB (which is what I did in the BIOS earlier already). I tried both values (04, 06) and both seem to work, and I ended up leaving it on 04 when I found your earlier post about this.
  • The other one changes the framebuffer memory size from 00003001 (32MB) to 00000003 (48MB).
Alternative to patch?
Both of these changes be done with WhateverGreen by adding a framebuffer-stolenmem option and setting that to 00000003 and framebuffer-memorycount and setting that to 00000004 (or 00000006) in the config.plist DeviceProperties section. I tried deleting the patch and adding those two values to the config and see if 4k still works (it didn't, more below). Here’s what that looks like under DeviceProperties:

Key Type Value
framebuffer-stolenmem
Data
00000003
framebuffer-memorycount
Data
00000004


Zearp suggested this would be a preferred method to the patch because it won’t break when Apple changes the AppleIntelFramebufferAzul.kext in an update (this was in an issues thread that's now closed).

The problem is, when I tested this method it still caps the resolution at 2560x1600 and introduces a weird cursor glitch (where the cursor appears all artifacty). I had zero luck playing around with this method (e.g., changing -memorycount to 0000006 for 96mb, only including framebuffer-stolenmem, etc.) and ended up reverted to the patch.

I think that's all, and all this information comes from other much smarter folks like the people in this thread and the Optihack GitHub. I didn't figure any of this out myself, I'm just summarizing!
 

Attachments

  • config.plist
    17.4 KB · Views: 88
Last edited:
Joined
Jan 21, 2012
Messages
1,000
Motherboard
HP 8300 Elite
CPU
i5-3570
Graphics
GT 710
Mobile Phone
  1. Android
I think that's all, and all this information comes from other much smarter folks like the people in this thread and the Optihack GitHub. I didn't figure any of this out myself, I'm just summarizing!
Thank You. Excellent - I appreciate the effort and will use it in my move to OC. ah! but you understand what the clever people say it seems, and Im not sure if that can be said about all of us. I shall be using your post to try and understand framebuffers and the like - because it's particular rather than the complexities of speaking about all machines and we have the same machines, I'm hoping between your post and the clever peoples ... Thanks again
 
Last edited:
Joined
Jun 5, 2020
Messages
35
Motherboard
Optiplex 7020 SFF
CPU
i5 4590
Graphics
HD4600
Thank You. Excellent summary - I appreciate the effort and will use it in my move to OC. ah! but you understand what the clever people say it seems, and Im not sure if that can be said about all of us. I shall be using your post to try and understand framebuffers and the like - because it's particular rather than the complexities of speaking about all machines and we have the same machines, I'm hoping between your post and the clever peoples ... Thanks again

Thanks and happy to help! My next steps if anyone has any ideas would be to try and fix 4k directly in DeviceProperties. I'm reasonably sure it's something to do with the Framebuffer, and I'm speculating that the Pipe and Port count would fix the internal vs., external display thing going on with the 2xDP ports. I need to read up on all this a lot more, and if anyone else has any ideas in the meantime I'm happy to test!
 
Joined
Jan 21, 2012
Messages
1,000
Motherboard
HP 8300 Elite
CPU
i5-3570
Graphics
GT 710
Mobile Phone
  1. Android
Thanks and happy to help! My next steps if anyone has any ideas would be to try and fix 4k directly in DeviceProperties. I'm reasonably sure it's something to do with the Framebuffer, and I'm speculating that the Pipe and Port count would fix the internal vs., external display thing going on with the 2xDP ports. I need to read up on all this a lot more, and if anyone else has any ideas in the meantime I'm happy to test!
Conversation in @trs96 Dell 7020 thread about the port type issues. I think the sticking point related to the display types being tied to the sysdefs but not sure if I understood too well.
 
Last edited:
Joined
Jan 21, 2012
Messages
1,000
Motherboard
HP 8300 Elite
CPU
i5-3570
Graphics
GT 710
Mobile Phone
  1. Android
Short Instructions on changing uefi settings - read the first post for warnings
1. Make bootable USB
2. Boot from USB
3. Make changes

1. Make bootable USB
Using a 32GB or smaller USB drive, format it on OSX with the following settings
181122-0002.jpg

Mount the EFI folder on the USB and copy over boot64.efi (attached below) to \EFI\boot\ folder (make folders as needed)

2. Boot from USB
Interrupt boot using F12 and select UEFI:USB drive to boot from

3. Make changes
You should now be at a grub command prompt -
Type
setup_var 0xDA2
and note the number it returns - this is the original CFG Lock setting
setup_var 0xDA2 0x0
this disables CFG Lock

if you are wanting to use 4K monitors on the HD4600 then also type -
setup_var 0x263
and note the number this returns - this is the original DVMT alloaction (where 1=32MB, 2=64MB, 3=96MB)
If it is 3 then there is nothing to do, if it is 2 then there is probably nothing to do (try first) and if it is 1 then
setup_var 0x263 0x3
sets DVMT to 96MB (although 64MB will probably be enough)
 

Attachments

  • bootx64.efi
    5.3 MB · Views: 42
Last edited:
Joined
Jun 5, 2020
Messages
35
Motherboard
Optiplex 7020 SFF
CPU
i5 4590
Graphics
HD4600
Hi folks, back with a quick potential patch-less solution to 4k with HD4600 (in OpenCore).

Another user msg'd me (waiting for consent to post their name for credit) with a suggestion to trial removing the connection settings for WhateverGreen in the config.plist. They had a suspicion that those were messing things up and after playing around here's what I've done:

(note: trialing this with a bootable USB and leaving primary system EFI untouched for now):

Test 1: deleted the following entries from config.plist (OpenCore)
Code:
framebuffer-con0-alldata
framebuffer-con0-enable
framebuffer-con3-alldata
framebuffer-con3-enable
kept 4k patch enabled (i.e., make sure it actually boots with these values deleted, etc.)

Response 1: It boots, 4k still working, no unusual behaviour in first few minutes

Test 2: Delete connection entries AND delete 4k patch
Response 2: It boots, 4k still working, no unusual behaviour... SUCCESS?!?

I'm going to double check that I actually booted from the USB and didn't do anything else dumb, then trial the changes with my system EFI!

If this works then we have a patch-less solution to 4k with HD4600 in OpenCore that should be more resilient to system updates. I expect this could be replicated in Clover but I have never used Clover so I'll let someone else take over with that.

Cons: I have zero understanding of why this works other than something in the connector settings for WhateverGreen are wonky.

Caution: I tested with the same unpatched config.plist (confs deleted) on both USB and HDD, and it works booting from USB, but doesn't work (2k) when booting from HDD. I'm missing something here so caution if you're testing this (and any suggestions are appreciated!)

Caution 2:
Please consider this method not-working for now (and see stable OpenCore folder in my post below). It'll boot, but I'm not having success consistently getting 4k. I think there might be some element of graphics settings being preserved from a previous boot or something that's throwing things off. Basically, USB boot works (4k), HDD boot doesn't work (2k) with same config, but USB didn't work (2k) after I tried a few other things.
 
Last edited:
Joined
Jan 21, 2012
Messages
1,000
Motherboard
HP 8300 Elite
CPU
i5-3570
Graphics
GT 710
Mobile Phone
  1. Android
Thanks @mgrimace, Useful info. It would be good to have a Open core efi folder available to those who want to try, would you provide yours? It may translate to Clover but even if it does not, the info about the framebuffer may bear on other issues we have with the hd4600.
 
Joined
Jun 5, 2020
Messages
35
Motherboard
Optiplex 7020 SFF
CPU
i5 4590
Graphics
HD4600
No problem @nicksoph, here is my complete OpenCore folder with a few things to note:
  • It has been anonymized, input your own serials and MAC address!
  • This folder is the stable folder
  • In /OC there is an additional, anonymized config called config.TEST which is where I'm testing the patchless 4k (please consider this unstable).
  • If you just want a stable OpenCore EFI, it's probably best to delete config.TEST (I'm not sure if it will mess anything up just by being there)
  • If you want to test/play around with the patchless 4k (please!) move the stable config.plist somewhere safe, then rename config.TEST to config.plist (don't forget to add your serials/MAC to this as well!).
Otherwise for OpenCore installation instructions, follow Zearp's guide here. Note the cautions about moving from Clover to OC (i.e., perform a clean install).
 

Attachments

  • OC TestEFI anonymized.zip
    6.1 MB · Views: 56
Top