glasgood Posted July 4, 2020 Share Posted July 4, 2020 (edited) HP ProDesk 400 G4 Mini, MacMini8,1 [macOS Big Sir OpenCore v 0.6.3 EFI HP ProDesk 400 G4] 08/12/20 updated, here it is ==>> OC 063.zip [macOS Catalina OpenCore v 0.5.9 EFI HP ProDesk 400 G4] 07/07/20 updated, here it is 07/07/20 ==>> EFI.zip Just recently purchased this mini pc ( eBay bargain ) as a second machine and was wondering how easily it would be to install macOS Catalina, so I had a look around to see if a EFI existed for the HP ProDesk 400 G4 Mini and I found an excellent guide for the HP EliteDesk 800 G4 that was created by @tonyx86 here at InsanelyMac. By referencing this HP EliteDesk 800 G4 Mini Clover EFI guide I have now created an OpenCore EFI for the HP ProDesk 400 G4 Mini and now attached it to this post. On the surface both machines look very similar, but the HP ProDesk 400 G4 Mini has Intel B360 Chipset and a RTL811HSH-CG Ethernet controller. The HP EliteDesk 800 G4 has a Q370 chipset and uses the Intel 1219LM GbE Ethernet controller and comes with USB type C. I have posted the EFI above, mostly everything is working including iMessages and FaceTime. Please feel free to use this, adapt and share. This most likely will work with the HP EliteDesk 800 G4 too, but will require a custom USBPorts.kext using Hackintool, also RealtekRTL8111.kext would need to be replaced with IntelMausi.kext. System Specifications Intel i3-8100 Graphics Intel UHD 630 8 GB DDR4 RAM Ethernet - Realtek RTL8111HSH-CG Gbe Audio - Conexant CX20632 240GB Sandisk SSD ( macOS Catalina ) 256 GB NVMe SDD ( Windows 10 ) 4 x USB 3.x Ports 2 x USB 2.0 Ports Chipset Intel B360 HP ProDesk 400 G4 Mini PC - 4CZ91ET#ABU Use the BIOS settings from HP ELiteDesk 800 G4 ==> guide Spoiler WIFI PARTS REQUIRED ADAPTER CARD WITH FLEXIBLE CABLE BCM94360CD/BCM94360CS2/BCM943224PCIEBT2 Card To M.2 Key A/E Cable BCM94360CS2 Genuine WiFi Card 653-0020 Macbook Air 13" A1466 Mid 2013 2017 / Early 2014 2015 Antenna 20cm IPEX to RP-SMA Female Pigtail Cable for NGFF Wireless Card & M.2 (NGFF) DO NOT USE THE NGFF M.2 Key A/E adapter as there is not enough room for this to fit! ( Card can length can't exceed 30mm ) A1398 BCM943602CS BCM94360CS wireless cards to NGFF M.2 Key A/E adapter fo D RC Spoiler Spoiler HOW TO INSTALL THE WIFI CARD AND ANTENNA Spoiler Using a flat head screwdriver, remove the antenna metal covers ( metal covers are attached by a small amount of metal ) so just twist them off with screwdriver. IGPU BUS PATCHING Spoiler FANTASTIC IGPU BUS PATCHING GUIDE =>HERE<= Dortania CREDITS OpenCore Developers OpenCore Desktop Guide Insanelymac [GUIDE] Catalina on HP EliteDesk 800 G4 Mini - The perfect MacMini8,1 Hackintosh Edited December 8, 2020 by glasgood Update EFI 8 Link to comment Share on other sites More sharing options...
glasgood Posted July 4, 2020 Author Share Posted July 4, 2020 The HP DeskPro 400 G4 will sleep, one small issue at the moment is that the DeskPro will wake from sleep and show a black screen with mouse cursor, if you press the monitor button off and on then display wakes from sleep. Waiting on an MacBook Air broadcom wifi blutooth card and adapter, so will update wifi soon. 1 Link to comment Share on other sites More sharing options...
deeveedee Posted July 5, 2020 Share Posted July 5, 2020 @glasgood Excellent work! I'm glad my HP EliteDesk 800 G4 Mini guide helped you! You just may inspire me to learn and create an OC solution for my rig. Nice job! 2 Link to comment Share on other sites More sharing options...
glasgood Posted July 5, 2020 Author Share Posted July 5, 2020 32 minutes ago, tonyx86 said: @glasgood Excellent work! I'm glad my HP EliteDesk 800 G4 Mini guide helped you! You just may inspire me to learn and create an OC solution for my rig. Nice job! Thanks, and you too. I'm still digging around and trying get the attached monitor to display on wake, if I press the power button off / on the monitor wake from sleep resumes as normal. Just trying different frame buffers at the moment. Link to comment Share on other sites More sharing options...
deeveedee Posted July 5, 2020 Share Posted July 5, 2020 (edited) 4 hours ago, glasgood said: Thanks, and you too. I'm still digging around and trying get the attached monitor to display on wake, if I press the power button off / on the monitor wake from sleep resumes as normal. Just trying different frame buffers at the moment. You may also want to play with connector flags. As I recall, the following influenced sleep / wake behavior of my UHD 630 (which is now sleeping / waking perfectly): Intel ME must be enabled (BIOS setting) connector flags must be set (see here when I was experimenting with device properties) @glasgood One other thing: You may want to try SMBIOS MacModel iMac19,2 if you haven't already. See this post here. Good luck! Edited July 5, 2020 by tonyx86 Added note about iMac19,2 Link to comment Share on other sites More sharing options...
glasgood Posted July 5, 2020 Author Share Posted July 5, 2020 2 minutes ago, tonyx86 said: You may also want to play with connector flags. As I recall, the following influenced sleep / wake behavior of my UHD 630 (which is now sleeping / waking perfectly): Intel ME must be enabled (BIOS setting) connector flags must be set (see here when I was experimenting with device properties) Good luck! Ah, the Pro Desk has no Intel ME in BIOS. Think Intel ME must be the Elite range. I my machine has i3-8100T with device ID 0x3E91 and your i7-8700T has device ID 0x3E92 some of the selected Framebuffer include both our device ID's. At the moment I'm look into this WEG boot arg and property: Added igfxonln=1 boot argument and force-online IGPU property force online status for all displays Here is some of the other connector flags that I have been trying. config3E91.plist config3E92.plist Link to comment Share on other sites More sharing options...
deeveedee Posted July 5, 2020 Share Posted July 5, 2020 47 minutes ago, glasgood said: Ah, the Pro Desk has no Intel ME in BIOS. Think Intel ME must be the Elite range. I my machine has i3-8100T with device ID 0x3E91 and your i7-8700T has device ID 0x3E92 some of the selected Framebuffer include both our device ID's. At the moment I'm look into this WEG boot arg and property: I edited my previous post and wanted to make sure you saw this: You may want to try SMBIOS MacModel iMac19,2 if you haven't already. See this post here. 1 Link to comment Share on other sites More sharing options...
glasgood Posted July 6, 2020 Author Share Posted July 6, 2020 7 hours ago, tonyx86 said: I edited my previous post and wanted to make sure you saw this: You may want to try SMBIOS MacModel iMac19,2 if you haven't already. See this post here. Was considering switching to iMac19,2 possibly will try that. Thanks Link to comment Share on other sites More sharing options...
glasgood Posted July 6, 2020 Author Share Posted July 6, 2020 19 hours ago, tonyx86 said: I edited my previous post and wanted to make sure you saw this: You may want to try SMBIOS MacModel iMac19,2 if you haven't already. See this post here. @tonyx86 I got wake from sleep working, the machine wakes immediately but the display seems to take just over a minute to wake. Tried iMac19,2 SMBIOS and removed USBPorts.kext and replaced this with USBInjectall.kext and also enabled the ports limit patch and followed the usual protocol for preparing to use Hackintool to map the USB ports. But upon rebooting I could not use mouse and keyboard at the login screen when using the iMac19,2 SMBIOS. I thought that maybe USBInjectall.kext was not loading. So I changed over to testing out iMac19,1 SMBIOS and was able to login to desktop, so USBInject all was working. I retried changing over to iMac19,2 again and same problem persisted with frozen login screen, unable to move mouse or use keyboard. Link to comment Share on other sites More sharing options...
deeveedee Posted July 6, 2020 Share Posted July 6, 2020 (edited) @glasgood I'm not sure I understand your system's current state. Did I understand correctly that IM19,2 and IM19,1 didn't work (USB issues), so you're using MM8,1? If that's correct, then am I also correct in understanding that your only remaining display issue is that display wakes one minute after the system wakes? If that's true, what did you do to "fix" wake from sleep? Note that I found that my displays wake faster from sleep after I simplified my graphics device properties as discussed here. @glasgood Unfortunately, I don't know anything about OC, so if the issues have anything to do with the order of kext loading or ACPI patches, I'm at a loss. Edited July 6, 2020 by tonyx86 Link to comment Share on other sites More sharing options...
glasgood Posted July 6, 2020 Author Share Posted July 6, 2020 (edited) 16 hours ago, tonyx86 said: If that's true, what did you do to "fix" wake from sleep? UPDATE 07/07/20 @tonyx86 Now have sleep working, so monitor now wakes when display is connected to both display ports on machine. Seem that AAPL,ig-platform-id 07009B3E is better option for the i3-8100T. I simplified the device property by using the framebuffer-conX-alldata property to inject: Port, BusID, Pipe Number, Connector Type and Flags. Have added igpu bus patching diagram to the guide above. Just waiting on adapter card for wifi, so should have wifi sorted soon. These HP Mini PC's are fantastic! <key>PciRoot(0x0)/Pci(0x2,0x0)</key> <dict> <key>AAPL,ig-platform-id</key> <data> BwCbPg== </data> <key>AAPL00,override-no-connect</key> <data> AP///////wAGECeSHwAjFiMWAQS1PCJ4Im+xp1VMniUM UFSlSwCzANEAcU+pQIGAd4ABAQEBVl4AoKCgKVAwIDUA VVAhAAAaAAAA/wBDMDJKOTAwWEYyR0MKAAAA/ABUaHVu ZGVyYm9sdAogAAAA/QA4Vh5xHgEKICAgICAgAe4= </data> <key>AAPL01,override-no-connect</key> <data> AP///////wAGECeSHwAjFiMWAQS1PCJ4Im+xp1VMniUM UFSlSwCzANEAcU+pQIGAd4ABAQEBVl4AoKCgKVAwIDUA VVAhAAAaAAAA/wBDMDJKOTAwWEYyR0MKAAAA/ABUaHVu ZGVyYm9sdAogAAAA/QA4Vh5xHgEKICAgICAgAe4= </data> <key>framebuffer-con0-alldata</key> <data> AQUJAAAEAADHAwAA </data> <key>framebuffer-con0-enable</key> <data> AQAAAA== </data> <key>framebuffer-con1-alldata</key> <data> AgYJAAAEAADHAwAA </data> <key>framebuffer-con1-enable</key> <data> AQAAAA== </data> <key>framebuffer-con2-alldata</key> <data> AwAJAAAEAADHAwAA </data> <key>framebuffer-con2-enable</key> <data> AQAAAA== </data> <key>framebuffer-patch-enable</key> <data> AQAAAA== </data> <key>framebuffer-stolenmem</key> <data> AAAwAQ== </data> </dict> Spoiler // Changed the EDID over for ThunderBolt Display, much nicer Edited July 7, 2020 by glasgood update 2 Link to comment Share on other sites More sharing options...
deeveedee Posted July 7, 2020 Share Posted July 7, 2020 @glasgood Outstanding work. Very nice bus patching diagram! 1 Link to comment Share on other sites More sharing options...
deeveedee Posted July 17, 2020 Share Posted July 17, 2020 (edited) @glasgood - I'm looking at an OpenCore solution for my HP EliteDesk 800 G4 Mini and scrutinizing my ACPI patches in preparation. Quick questions for you: Why do you declare External (_SB_.PCI0.PMCR, DeviceObj) in your SSDT-PM where you are also defining Device (PMCR)? Did you experiment with the Scope for Device PMCR (options are _SB_.PCI0 and _SB_.PCI0.LPCB) and if so, did you notice any difference when injecting PMCR in the two scopes? Details I'm reviewing Dortania's ACPI guide here and comparing the recommendations to my ACPI patches for my HP EliteDesk 800 G4 Mini. One of Dortania's recommendations is to place Device (PMCR) in Scope (_SB.PCI0.LPCB) so that the device "loads earlier." I modeled my PCMR patch after a real MacMini8,1 DSDT where Device (PMCR) is in Scope (_SB.PCI0) and as I'm comparing my system operation with the two different Scopes, I don't notice any difference in system behavior. Also, Device (PMCR) as viewed in IORegistry Explorer is loaded in Scope (_SB.PCI0) regardless of whether the SSDT Scope for PMCR is _SB_.PCI0 or _SB_.PCI0.LPCB. Edited July 17, 2020 by tonyx86 Link to comment Share on other sites More sharing options...
glasgood Posted July 19, 2020 Author Share Posted July 19, 2020 On 7/17/2020 at 7:10 PM, tonyx86 said: @glasgood - I'm looking at an OpenCore solution for my HP EliteDesk 800 G4 Mini and scrutinizing my ACPI patches in preparation. Quick questions for you: Why do you declare External (_SB_.PCI0.PMCR, DeviceObj) in your SSDT-PM where you are also defining Device (PMCR)? Did you experiment with the Scope for Device PMCR (options are _SB_.PCI0 and _SB_.PCI0.LPCB) and if so, did you notice any difference when injecting PMCR in the two scopes? Details I'm reviewing Dortania's ACPI guide here and comparing the recommendations to my ACPI patches for my HP EliteDesk 800 G4 Mini. One of Dortania's recommendations is to place Device (PMCR) in Scope (_SB.PCI0.LPCB) so that the device "loads earlier." I modeled my PCMR patch after a real MacMini8,1 DSDT where Device (PMCR) is in Scope (_SB.PCI0) and as I'm comparing my system operation with the two different Scopes, I don't notice any difference in system behavior. Also, Device (PMCR) as viewed in IORegistry Explorer is loaded in Scope (_SB.PCI0) regardless of whether the SSDT Scope for PMCR is _SB_.PCI0 or _SB_.PCI0.LPCB. I pulled SSDT-PM from my Z390 EFI, power management is working well in HP hack. The SSDT-PM was possibly created by Maldon. My WIFI card and adapters arrived, once installed WIFI was natively recognised and iMessages and FaceTime worked instantly. Have attached photos of the Wifi install. 1 Link to comment Share on other sites More sharing options...
deeveedee Posted July 19, 2020 Share Posted July 19, 2020 (edited) On 7/19/2020 at 6:57 AM, glasgood said: I pulled SSDT-PM from my Z390 EFI, power management is working well in HP hack. The SSDT-PM was possibly created by Maldon. My WIFI card and adapters arrived, once installed WIFI was natively recognised and iMessages and FaceTime worked instantly. Have attached photos of the Wifi install. I'm trying to learn more about ACPI / DSDT / SSDT so forgive the remedial questions. My HP EliteDesk 800 G4 Mini does not have Device (PMCR) defined in ACPI, which may be why I don't need the 'External' declaration. Maybe your Z390 rig does? Also, @MacKonsti alerted me to a promising Intel Wi-Fi/Bluetooth project here. This might be an option for those with our HP hacks. Also, I see that @MaLd0n liked your opening post in this thread, so maybe he'll be able to provide an explanation of the External declaration and Scope of PMCR. Edited July 21, 2020 by tonyx86 Link to comment Share on other sites More sharing options...
MacKonsti Posted July 19, 2020 Share Posted July 19, 2020 (edited) Both my NUC and Lenovo do not have Device (PMCR) anywhere in any table (looked all AML files extracted via Clover) as this appears to be present natively on Apple DSDTs. According to a recent article https://dortania.github.io/Getting-Started-With-ACPI/Universal/nvram-methods/manual.html This device is loaded early on, allows for NVRAM to be re-enabled on some systems, too. Not sure what it does for those that already support NVRAM. In any case, on my hacks, Device PMCR loads com.apple.driver.AppleIntelPCHPMC driver. Spoiler Device THRM is a custom-named device that doesn't have a name in IORegistry, that I also set as compatible to a vanilla device. Here's part of my SSDT and Clover configuration for you to study. Reference to be found in /System/Library/Extensions/AppleIntelPCHPMC.kext/Contents/Info.plist Device (THRM) // Intel Corporation Coffee Lake Thermal Controller [8086:9df9] { Name (_ADR, 0x00120000) } <key>PciRoot(0x0)/Pci(0x12,0x0)</key> <dict> <key>compatible</key> <string>pci8086,9d21</string> <key>model</key> <string>Intel Corporation 100 Series Thermal Controller</string> </dict> Edited July 19, 2020 by MacKonsti Link to comment Share on other sites More sharing options...
deeveedee Posted July 19, 2020 Share Posted July 19, 2020 (edited) 10 minutes ago, MacKonsti said: According to a recent article https://dortania.github.io/Getting-Started-With-ACPI/Universal/nvram-methods/manual.html This device is loaded early on, allows for NVRAM to be re-enabled on some systems, too. Not sure what it does for those that already support NVRAM. In any case, on my hacks, Device PMCR loads com.apple.driver.AppleIntelPCHPMC driver. I did experiment with PMCR scope here and decided to leave mine defined in _SB_.PCI0 which is consistent with the ACPI for a real MacMini8,1. I didn't notice any difference in behavior with PMCR in Scopes _SB_.PCI0 and _SB_.PCI0.LPCB and regardless of the scope I specified, IORegistry Explore listed PMCR loaded in the same place. Maybe this is because I'm still using CLOVER and not OC? Spoiler Edited July 19, 2020 by tonyx86 Link to comment Share on other sites More sharing options...
MacKonsti Posted July 19, 2020 Share Posted July 19, 2020 Makes two of us: Still under Clover and attached PMCR under PCI0 like the real MacMini8,1 indeed. Link to comment Share on other sites More sharing options...
deeveedee Posted December 6, 2020 Share Posted December 6, 2020 @glasgood Have you ever investigated the BIOS CFG Lock on your ProDesk 400 G4? It's one of the last things I'd like to figure out on my 800 G4 Mini. I have confirmed that MSR 0xE2 is locked (using OC's Verify tool). I've tried examining the .bin with UEFITool and I've tried Brumbauer's tool (here), but no luck. HP's BIOS has hidden the CFG Lock mechanism extremely well. Link to comment Share on other sites More sharing options...
MacKonsti Posted December 6, 2020 Share Posted December 6, 2020 2 hours ago, tonyx86 said: @glasgood Have you ever investigated the BIOS CFG Lock on your ProDesk 400 G4? It's one of the last things I'd like to figure out on my 800 G4 Mini. I have confirmed that MSR 0xE2 is locked (using OC's Verify tool). I've tried examining the .bin with UEFITool and I've tried Brumbauer's tool (here), but no luck. HP's BIOS has hidden the CFG Lock mechanism extremely well. Have a look here mate, it worked on my Intel NUC 10th Generation via a USB OpenCore booted (as an on-screen option to run it): Link to comment Share on other sites More sharing options...
deeveedee Posted December 6, 2020 Share Posted December 6, 2020 (edited) Brumbaer's solution is one of the options that didn't work for me (similar to what you noted here). Seems that your NUC9i7BEH2 and my HP EliteDesk 800 G4 Mini hide CFG Lock very well. I did find a forum where someone claims to have used Firewolf's method here to find the CFG Lock offset for an HP EliteDesk 800 G1 Mini, but I was never able to get anywhere with that claim. EDIT: @MacKonsti Something you might want to consider - if you are able to use Brumbaer's tool to unlock MSR 0xE2 on your NUC10i7FNH2, then you should be able to use Firwolf's method to find the CFG Lock offset in your NUC10i7FNH2. What are the chances that Intel is consistent, and the CFG Lock offset in your NUC10i7FNH2 (which you can unlock with Brumbaer's tool) is the same as the CFG Lock offset in your NUC9i7BEH2 (which you can't unlock with Brumbaer's tool). If they are the same, could you use the Firewolf's method and the offset you discover in NUC10i7FNH2 to unlock CFG in your NUC9i7BEH2? Sounds like a long shot, but interesting. Edited December 6, 2020 by tonyx86 Link to comment Share on other sites More sharing options...
MacKonsti Posted December 7, 2020 Share Posted December 7, 2020 Hi mate, sorry it was a wrong typo, it's NUC8i7BEH, I corrected this in Brumbaer's thread. I used the same OpenCore USB stick that boots successfully my NUC10 and added that EFI tool, which did not detect the variable name in the NVRAM of the NUC8. As I may seriously brick the NUC if I tamper with hidden NVRAM settings that do not, I repeat, do not get "overwritten" with a BIOS reflash as I found out recently (I contacted Intel for another problem with Boot0000 error in UEFI Shell when typing "bcfg boot dump" who told me to reflash BIOS to revert... right.) I do not want to tamper with that, therefore, as both Clover and OC seem to be able to solve this with a flag. Not sure what is the real, true benefit of CFG UN-lock to be honest, no concrete documentation found yet. Perhaps on a non-officially supported CPU like my NUC10 the Power Management can work better; but on my NUC8 it works just fine, judging from the Intel Power Gadget output... I suggest we don't tamper with this (my NUC8 is my primary PC). I know Firewolf and his site but he abandoned his tool long time ago; I could not find the reference you mention, however, on CFG Lock, can you post the direct link please? Just to read and know what the "procedure" is... Besides, I think you did a far more better job on your HP than me on my NUC, as you managed to grasp Frame Buffering and I am still lagging behind Link to comment Share on other sites More sharing options...
deeveedee Posted December 7, 2020 Share Posted December 7, 2020 8 hours ago, MacKonsti said: I know Firewolf and his site but he abandoned his tool long time ago; I could not find the reference you mention, however, on CFG Lock, can you post the direct link please? Just to read and know what the "procedure" is... You'll need to follow this link that I previously posted and extrapolate the concept to CFGLock. 8 hours ago, MacKonsti said: Besides, I think you did a far more better job on your HP than me on my NUC, as you managed to grasp Frame Buffering and I am still lagging behind The framebuffer patching was definitely the hardest part - extremely tedious trial and error. Further complicated by the fact that I'm using DP->DVI adapters on my HackMini8,1. I found that once video adapters are introduced, the "conventional" framebuffer patching logic goes out the window and it definitely becomes a process of elimination. I just completed the framebuffer patching on an HP EliteDesk 800 G3 Mini (i7-7700T Kabylake) using the same DP->DVI adapters. Through experimentation, I found that choosing SMBIOS MacMini8,1 (even though it's not the correct match for CPU power management) is the most forgiving SMBIOS for IntelHD framebuffer patching. Once I found the correct busids, indices, flags, etc. for working graphics, I was able to switch the SMBIOS to iMac18,2 for optimal CPU power management. After the SMBIOS switch, framebuffer patching remained valid. We're getting dangerously close to offending the off-topic police. Sorry I hijacked your thread @glasgood! 1 Link to comment Share on other sites More sharing options...
Pluskat5000Schiffe Posted September 14, 2021 Share Posted September 14, 2021 Glasgood / Tony / Konsti thank you for your effort. I've ordered a HP Deskpro 400 G3 which was really a bargain (100 euro). It's based on a i5 - 7500T which holds the H270 chipset if I read through the specs. Can I just throw in this EFI as a start? Your extension cable solution, how long does the flex cable needs to be? Is it possible to glue internal (laptop) antennes somewhere to the front side (plastic) to eliminate the big antennas on the back? Link to comment Share on other sites More sharing options...
Recommended Posts