Jump to content

[EFI - Opencore] HP Prodesk 400 G3 Mini. *** Success OC 7.3 ***


Pluskat5000Schiffe
 Share

55 posts in this topic

Recommended Posts

Attached you find an EFI archive usable for a HP Prodesk 400 G3 mini.

 

  • Upgrade to latest bios, (you can do this from BIOS itself)
  • Use BIOS settings as precise as possible as mentioned in the excelent guide here as a reference.  
  • Add your serial / MLB / GUID / Serial 
  • Reboot enjoy

 

What doesn't work:

 

  • Wake / Sleep (if someone knows an easy Kaby Lake Wake / Sleep trick please let us know and mention it below)

 

My files in the discussion with Tony are deleted. 

 

@tonyx86 Thank you for your help!

 

 

EFI HP Prodesk 400 G3 Mini OpenCore 7.3.zip

Edited by Pluskat5000Schiffe
Link to comment
Share on other sites

@Pluskat5000Schiffe It's been a while since I attempted a G3 build, but here's what I remember:

  • The ACPI is NOT the same as a G4 or G5.  You need to extract the original ACPI to determine necessary ACPI patches.  Using my ACPI patches here would not be correct.  One of the differences I remember is the PMCR patch.  I think that the G3 did not require a PMCR patch, because its ACPI already defined the device.
  • I never got wake from sleep to work.  At the time, this was a well-known kabylake problem which I believe has still not been resolved.  I am not sure that you can get working wake with this rig.
  • When I patched my G3 Mini, I needed another ACPI patch that you can find by searching for "FIX for boot hangs after BIOS update (ACPI PATCH)" (posted by mattystonnie in another forum).  Without this patch, my G3 would not boot.

 

I hope this helps you.

  • Like 1
Link to comment
Share on other sites

On 9/17/2021 at 3:48 AM, tonyx86 said:

I hope this helps you.

 

Thanks @tonyx86 for coming back to me. I think I have managed to have the correct SSDTs. It works quite well already with Open Core 6.6 only the upgrade to 7.3 fails with same config, depart from new parts in the config.plist 

 

I have attached also my IOReg. Mind you to look into it what can be optimized? 

 

Edited by Pluskat5000Schiffe
Link to comment
Share on other sites

@Pluskat5000Schiffe Have you tried reverting to previous versions of OC (6.7, 6.8...) to determine which version of OC "breaks" your rig?  If it is something in the OC version, it might help to know the OC version so that we might find the incremental OC change that is causing the problem for you.

 

Also, I'm curious - are you able to sleep and then wake your G3?

  • Like 1
Link to comment
Share on other sites

@tonyx86Well I've managed some progress tonight / today 😉. All Kextst are latest and running. Also Updated OC to 6.9 latest. OC 7.x and beyond is using new syntax in the config.plist. I started all over using the manuals advice to use sample.plist Is there another (easier) way to upgrade a current 6.x config.plist to a 7.x config.plist?

 

So -> OC 6.6 Upgraded to 6.9

Kexts like Lilu / WEG etc all to latest

 

Sleep unfortunately not till this moment. I think you are right it won't work on a Kaby Lake which is really strange because of the fact that in the iMac 18,2 the same processor is used (well without the T). This Hack is for my daughter to do her homework on a bigger screen. So I can't spend too much time on it because she needs it soon. I also ordered the official MacBook Air Wifi adaptor which soon arrives. Is that maybe an issue for sleep? I had it on my own hack, sleep worked after adding the official wifi adapter to it.

 

Link to comment
Share on other sites

@Pluskat5000Schiffe While you're determining whether reverting to a previous OC makes sense, here are some additional observations:

  • I do not use CPUFriend.  I find that with the proper SMBIOS, CPU power management works well
  • You should not need boot-arg 'disablegfxfirmware' - once your graphics device properties are correct, you should remove this boot-arg
  • Maybe I missed it, but it doesn't appear that you are patching RTC?  rtcfx_exclude=00-FF (in your boot-args) with RTCMemoryFixup kext created CPU power management problems for me (probably why you need CPUFriend).  I see that RTCMemoryFixup kext is disabled in your config.plist; however, if you want to use RTCMemoryFixupu, you must find the minimal rtcfxexclude range necessary for RTC patching, better still - abandon RTCMemoryFixup (I don't use it) and use the RTC0 SSDT patch in my EFI instead.  
  • There are two other boot-args that helped me with my HP Minis: igfxagdc=0 igfxonln=1 
  • I don't think this is your issue, but I disable HPET for the reasons I mentioned here.  It is disabled in a real iMac18,1 and a real MacMini8,1.  If you want to eliminate your HPET ACPI patches/renames and your IRQ patches, just disable HPET using my ACPI patch.
  • You don't have an XOSI ACPI patch.  See my ACPI.
  • You define Method DTGP multiple times in your ACPI patches.  Your Plugin patch shouldn't need DTGP if you follow the Dortania example (this is not a problem - just cosmetic)
  • I think I recall that Quirk ResetLogoStatus caused boot problems for me.  I'm not sure,  but experiment with and without this Quirk enabled.
  • You might need Quirk AppleXcpmCfgLock enabled since you can't unlock MSR 0xE2
  • Dortania guide says that Quirk UnblockFsConnect should be enabled for HP PCs.  Not sure if this is your issue, but try it
  • Like 1
Link to comment
Share on other sites

Thanks! Just what I need. I wan't this Prodesk 400 G3 Mini as clean as possible but I'm tired now 😉 Will dig into your tips and guidance tonight and this weekend. Really appreciated! We can share eventualy the best config and a small guide so, the scope of Hackable Prodesk's will be increased for the osx86 community. 

 

 

Edited by Pluskat5000Schiffe
  • Like 1
Link to comment
Share on other sites

28 minutes ago, Pluskat5000Schiffe said:

@tonyx86Well I've managed some progress tonight / today 😉. All Kextst are latest and running. Also Updated OC to 6.9 latest. OC 7.x and beyond is using new syntax in the config.plist. I started all over using the manuals advice to use sample.plist Is there another (easier) way to upgrade a current 6.x config.plist to a 7.x config.plist?

 

So -> OC 6.6 Upgraded to 6.9

Kexts like Lilu / WEG etc all to latest

 

Sleep unfortunately not till this moment. I think you are right it won't work on a Kaby Lake which is really strange because of the fact that in the iMac 18,2 the same processor is used (well without the T). This Hack is for my daughter to do her homework on a bigger screen. So I can't spend too much time on it because she needs it soon. I also ordered the official MacBook Air Wifi adaptor which soon arrives. Is that maybe an issue for sleep? I had it on my own hack, sleep worked after adding the official wifi adapter to it.

 

Just to clarify - your rig stops working when you upgrade to OC 0.7.0, but it works with OC 0.6.9?

 

Also, I don't think that Wi-Fi is causing the wake problem.  I had Wi-Fi completely disabled on my G3 Mini and wake did not work.  I think this is the well-known Kabylake problem.  

 

That's great that you ordered a genuine Apple Wi-Fi.  If you need another option, this works for me.

Link to comment
Share on other sites

Well that was a comprehensive task. I upgraded until 7.3 ... 7.3 was indeed failing to boot. 7.2 worked. I verified with the 7.2 version of ocvalidate. Corrected all the issues which was easy with your efi (to find locations etc). I had also the 6.6 config updated and validated for 7.2 Downloaded 7.3 again and started the 7.3 ocvalidate to verify the 7.2 config and after a small corrections I replaced the 7.2 config with the validated 7.3 config together with the OC 7.3 release files.

Guess what? It worked! 

 

So now I have latest Lulu with latest WEG / Realtek / etc

I have OC 7.3 with a validated 7.3 config.

 

I adjusted my boot args to:

 

igfxagdc=0 igfxonln=1 forceRenderStandby=0 swd_panic=1 keepsyms=1 debug=0x100 rtcfx_exclude=00-FF alcid=28

Next step is RTC... I have sometimes message that the clock is incorrect 01-01-1999 01:00 not always. Lost a little your comments on that. 

Can you clearly direct me what to remove and what to add to get a proper clock working?   (Thanks again)

 

Quote

That's great that you ordered a genuine Apple Wi-Fi.  If you need another option, this works for me.

 

Well I ordered the HP Prodesk 400 G3 with the Genuine Apple wifi card (M2 NGFF <> flex cable <> NGFF to Apple converter to put it somewhere else) without seeing it internal. The G4 needs this solution, when using genuine apple wifi, because it has less room left behind the NGFF socket. When I received the G3 I noticed it had plenty room for a DW1640 solution or so. But I paid about 30 euro for original card with flex and antenna's so that's reasonable I think. 

 

Edited by Pluskat5000Schiffe
  • Like 1
Link to comment
Share on other sites

@Pluskat5000Schiffe Congratulations on your progress!  In my opinion, the best way to patch RTC is to use an SSDT patch and not RTCMemoryFixup.kext.  Note that this is contrary to the opinion of the Acidanthera team (they prefer RTCMemoryFixup.kext). I don't have your original DSDT, so you'll need to figure out the correct ACPI patch for RTC.  The attached SSDT is what I use to disable HPET and patch RTC for my HP Envy laptop.  This should serve as a good example for you.  The SSDT disables HPET (by setting HPTE = 0), disables the original RTC device, and adds a new RTC0 device with memory length = 2.  If you don't understand all this, you'll learn a lot by doing your homework.

 

You will not need the rtcfx_exclude boot-arg when you patch RTC with the ACPI patch.

 

SSDT-HPET-RTC.aml.zip

Edited by tonyx86
Link to comment
Share on other sites

Quote
  • I do not use CPUFriend.  I find that with the proper SMBIOS, CPU power management works well
  • You should not need boot-arg 'disablegfxfirmware' - once your graphics device properties are correct, you should remove this boot-arg
  • Maybe I missed it, but it doesn't appear that you are patching RTC?  rtcfx_exclude=00-FF (in your boot-args) with RTCMemoryFixup kext created CPU power management problems for me (probably why you need CPUFriend).  I see that RTCMemoryFixup kext is disabled in your config.plist; however, if you want to use RTCMemoryFixupu, you must find the minimal rtcfxexclude range necessary for RTC patching, better still - abandon RTCMemoryFixup (I don't use it) and use the RTC0 SSDT patch in my EFI instead.  
  • There are two other boot-args that helped me with my HP Minis: igfxagdc=0 igfxonln=1 
  • I don't think this is your issue, but I disable HPET for the reasons I mentioned here.  It is disabled in a real iMac18,1 and a real MacMini8,1.  If you want to eliminate your HPET ACPI patches/renames and your IRQ patches, just disable HPET using my ACPI patch.
  • You don't have an XOSI ACPI patch.  See my ACPI.
  • You define Method DTGP multiple times in your ACPI patches.  Your Plugin patch shouldn't need DTGP if you follow the Dortania example (this is not a problem - just cosmetic)
  • I think I recall that Quirk ResetLogoStatus caused boot problems for me.  I'm not sure,  but experiment with and without this Quirk enabled.
  • You might need Quirk AppleXcpmCfgLock enabled since you can't unlock MSR 0xE2
  • Dortania guide says that Quirk UnblockFsConnect should be enabled for HP PCs.  Not sure if this is your issue, but try it

 

The Striketrough parts above are done. I used your SSDT-HPET-RTC file but this was not what was intended by you I guess because now I see the BIOS RTC warning. For me this is quite hard to fix messing around with SSDTs etc. But I have installed a debug version of OC 7.3 to generate a Sysreport which includes the DSDT file. I also included current config / current ACPIs current IOReg and the whole Sysreport. Maybe it is for you quite easy to make the corrections. It would be a great help if you can help with this because its finished then. 

 

 

Edited by Pluskat5000Schiffe
Link to comment
Share on other sites

@Pluskat5000Schiffe It is best for you to learn ACPI patching.  

 

  1. Start by searching for "Patching Laptop DSDT/SSDT Rehabman" and read Rehabman's first post in that thread.    
  2. I devoted a lot of time to my HP EliteDesk 800 G4/G5 Mini thread to make it a valuable reference and teaching resource.  I would suggest that you read it completely.  You will learn how I determined the necessary patches for the G4/G5 Mini (which will help you to patch your G3)
  3. Review your extracted original DSDT and attempt to determine your own RTC SSDT patch.
  4. Post your attempted RTC SSDT patch and extracted DSDT here if your RTC patch does not work and you still need help

 

HInts (review only if you can't figure out on your own)

Spoiler
  1. The HP EliteDesk 800 G3 Mini DSDT allows control of device HPET by setting HPTE = 0 or 1.  Setting HPTE to 0 (as in the previous example I posted for you) should disable device HPET.  You will need to confirm this in your own DSDT.
  2. The HP EliteDesk 800 G3 Mini DSDT allows control of device RTC by setting variable STAS = 1 to enable RTC and something other than 1 to disable RTC.  If your Prodesk G3 has the same STAS control mechanism, you would add STAS = 0 in the INI method in my previous example SSDT.  Seting STAS = 0 will disable the original RTC.  You will need to confirm this in your own DSDT.
  3. After you disable RTC (by setting STAS = 0 if that is what your DSDT indicates), you can use the RTC0 patch from my previous example to create a new RTC0 device.

 

Edited by tonyx86
  • Like 1
Link to comment
Share on other sites

Tony thanks. So do I understand it correctly?

  • I have extracted a DSDT, this DSDT is an ACPI extract from the BIOS with the current presentation (no modification) of the system,
  • Without adjusting the ACPI macOS can encounter a lot of issues. So we need to correct / patch partial the ACPI so macOS accepts it using custom SSDTs,
  • SSDTs are small / partial corrections mostly focused on a specific function to correct it in the right way so macOS accepts it, 
  • For the Kaby Lake I need these SSDTs to successfully patch ACPI : SSDT-PLUG / SSDT-USBX /NO SSDT-AWAC / and your combo SSDT-HPET-RTC patch which is HP and solution specific (SSDT or load a Kext) related with disabling HPET and Disabling RTC. 
  • I can create these SSDTs just by loading the original DSDT into MacIASL and choose the correct patch which will export that partial SSDT,

Right?

Edited by Pluskat5000Schiffe
Link to comment
Share on other sites

@Pluskat5000Schiffe Looks like you're learning! :)  The only change you are making now is the SSDT-HPET-RTC SSDT patch to fix RTC corruption.  We can look at other changes later.  You need to examine your extracted DSDT to determine the following:

  1. Is HPTE used to enable/disable Device HPET?  I think the answer is "yes," but you need to examine your DSDT to confirm.
  2. Is STAS used to enable/disable Device RTC?  I think the answer is "yes," but you need to examine your DSDT to confirm.
  3. Edit the SSDT-HPET-RTC that I provided previously to disable HPET, disable RTC and add RTC0.
  4. Copy your new SSDT-HPET-RTC to EFI/OC/ACPI
  5. Add SSDT-HPET-RTC to your config.plist
  6. Test

Hint: If you can't figure this out yourself, your new SSDT-HPET-RTC should look something like the attachment.  Without your extracted DSDT, I can't determine the exact patches, so you'll need to confirm this yourself.

SSDT-HPET-RTC.aml.zip

Link to comment
Share on other sites

Tony I already have put the extracted DSDT in the previous post under "Stuff for Tony.zip"... its all in there (SYSReport). Its weekend and I have to do a lot of social things first before I can start the SSDT-HPET-RTC thingy 😉

DSDT in here

Edited by Pluskat5000Schiffe
Link to comment
Share on other sites

On 9/18/2021 at 6:20 PM, tonyx86 said:

@Pluskat5000Schiffe Looks like you're learning! :)  The only change you are making now is the SSDT-HPET-RTC SSDT patch to fix RTC corruption.  We can look at other changes later.  You need to examine your extracted DSDT to determine the following:

  1. Is HPTE used to enable/disable Device HPET?  I think the answer is "yes," but you need to examine your DSDT to confirm.
  2. Is STAS used to enable/disable Device RTC?  I think the answer is "yes," but you need to examine your DSDT to confirm.
  3. Edit the SSDT-HPET-RTC that I provided previously to disable HPET, disable RTC and add RTC0.
  4. Copy your new SSDT-HPET-RTC to EFI/OC/ACPI
  5. Add SSDT-HPET-RTC to your config.plist
  6. Test

Hint: If you can't figure this out yourself, your new SSDT-HPET-RTC should look something like the attachment.  Without your extracted DSDT, I can't determine the exact patches, so you'll need to confirm this yourself.

 

1 Yes I think So:

687133881_Screenshot2021-09-18at23_13_12.png.420efadc5522c387ce2b8d9a45ff1c2e.png

2 Yes I think So

980445111_Screenshot2021-09-18at23_14_38.png.7e56335f07bbecf8f4ccc290d7308ad4.png

 

  • I see 2 devices. In your example file I only see device RTC0 ... lost here.
  • I see also quirks / patches in the config.plist related to RTC / HPET are they also correct needed?

 

Attached current config.plist 

Attached extracted DSDT 

 

 

 

 

 

 

 

 

Edited by Pluskat5000Schiffe
Link to comment
Share on other sites

Sorry it didn't. I included current EFI with current IOReg. Maybe something else in het config is still not good. I see HPET and RTC related patches and Quirks. Maybe these setting prevent correct SSDT working.

 

Thx!

Edited by Pluskat5000Schiffe
Link to comment
Share on other sites

@Pluskat5000Schiffe If you're up for the sleep / wake challenge, I'll help to the extent that I'm able.  I don't think anyone has been able to get sleep / wake to work with Kabylake iGPU.  I won't be available for a day or two, so keep working on your own and I'll check back.

  • Like 1
Link to comment
Share on other sites

@Pluskat5000Schiffe I believe that one way to approach the Kabylake iGPU Sleep/Wake problem is to look at the ACPI _PTS and _WAK methods in Kabylake R laptops where sleep/wake is working.  It's the approach that I took here when no one had solved the sleep wake problem on a Dell Latitude E6410 after 10 years of trying.  I found a newer model Dell laptop where sleep / wake worked and copied some of the _PTS and _WAK code (and other code) from the working Dell laptop to the E6410.  It took a bit of trial and error (I think about 20 hours of work), but it worked and provided working sleep / wake for the first time on the Latitude E6410.

 

I can't guarantee that this same approach will work for the Prodesk G3, but if you're not afraid to try, this would be the approach:

  1. Search for Kabylake R laptop threads where sleep/wake is working and people have posted their original extracted DSDT (this might be hard to find).  If they haven't posted their DSDT, you may need to ask for it.
  2. Compare the _PTS and _WAK methods of the Kabylake R laptop to the Prodesk G3 _PTS and _WAK methods.  
  3. Using a methodical approach, make gradual changes to the G3 _PTS and _WAK methods to determine if you can influence the sleep / wake behavior of the G3
  4. Examine the DSDT of the working laptop and compare to the Prodesk G3 to see if there are other methods that might influence sleep / wake behavior (e.g. Device SLPB and Device PWRB)
  5. Experiment with different graphics device-id and possibly different SMBIOS macmodels to see if this helps your Prodesk G3.  For example, I use SMBIOS macModel MBP14,1 for my HP Envy laptop with Graphics device-id <16590000>.  It's possible that spoofing a different iGPU (like 5916) may help, too.  Read this to learn more.

 

To get you started, my HP Envy laptop has a Kabylake R i5-8250U CPU (UHD620 iGPU).  I spent quite a bit of time patching the ACPI of this laptop to create a perfect hackintosh.  I have not shared my solution anywhere yet.  Everything works perfectly (including sleep / wake).  Attached is my original extracted DSDT for my laptop.  Patching _PTS and _WAK is going to be a new learning experience for you, because you are going to need to rename the original _PTS and _WAK methods and create new _PTS and _WAK methods.  I have included example _PTS and _WAK patches in my attachment, because I had to patch _PTS and _WAK in my laptop.  Examine the sample plist that I included to see how I rename the original _PTS and _WAK methods in order to create new _PTS and _WAK methods.

 

Also included in my attachment is the XOSI patch that you should read about.  This may be something you want to add to your Prodesk G3.  I don't believe that Acidanthera think the XOSI patch is necessary, so my opinion differs from theirs.

 

Understand that after trying all of this, the solution may not work and this may just be a learning experience (or a waste of time).  When I started figuring out Sleep / Wake for the Dell Latitude E6410, I received a lot of bad advice, was told I was wrong and that it wasn't possible.  I would suggest that you ignore anyone who tells you it's impossible.

HP Envy ACPI.zip

Link to comment
Share on other sites

Tony what a story. Yes never give up. I will look into it but I also need to finish this hack for my daughter. She needs it for writing her journals and projects on school. I need to find a slot when I can spend time again. I will try to make the _Xosi working.  Thanks for your great help until now. I will post after that my cleaned EFI to contribute so other people can use this for their G3 as a start and hopefully one day there will be a fairly easy sleep / wake fix for Kaby Lake desktops.

 

Link to comment
Share on other sites

Hi Tony. I was just installing the "we can live with the Hackintosh without sleep / wake" Hack in the bedroom of my daughter when I encountered a missed issue. The Hack won't shutdown. 

Is there an easy fix for this? I tried a few thing without any result. Attached latest EFI. Tell me if you need more information.  

 

 

 

 

 

Edited by Pluskat5000Schiffe
Link to comment
Share on other sites

@Pluskat5000Schiffe Without working sleep/wake, you will need to disable sleep so your daughter doesn't have problems.  With sleep disabled, the display will still sleep (and your daughter will be able to wake the display with a mouse or keyboard event), but the CPU will remain awake.

Link to comment
Share on other sites

 Share

×
×
  • Create New...