Jump to content

[GUIDE] Catalina, Big Sur, Monterey, Ventura, Sonoma on HP EliteDesk 800 G4/G5 Mini - The perfect MacMini8,1 Hackintosh


deeveedee
858 posts in this topic

Recommended Posts

EDIT: A newer version of my OC 0.6.3 EFI is here.

 

I finally got around to testing MSR 0xE2 register (using OC VerifyMsrE2.efi tool described here). The MSR 0xE2 register is locked in the HP EliteDesk 800 G4 Mini BIOS (see attached screenshot). I have attached a revised OC 0.6.3 EFI to this post. This revised EFI enables Kernel Quirks AppleCpuPmCfgLock and AppleXcpmCfgLock (which others had already done. I did not since my system seemed to work fine with these Quirks disabled). I'm not sure if locked MSR 0xE2 explains the real time clock error that I observed during the Big Sur install and I'm not sure if both AppleCpuPmCfgLock and AppleXcpmCfgLock need to be enabled. I'd prefer to make the suggested BIOS mod, but that's not a high priority for me. If someone else wants to try the BIOS mod (described here), that would be great!

Note that I have not tested my posted EFI with any other OS (e.g. Windows). I dual boot my system, but I don't use OC to boot Windows. In rare instances when I want to boot Windows, I manually select Windows by pressing F9 at startup.

 

VerifyMsrE2.efi Screenshot

Spoiler

IMG_1383.thumb.JPG.aeeb5167ef89a5ef5d640feb46e69d38.JPG

 

 

OC0.6.3-EFI-r003.zip

Edited by tonyx86
Fixed broken links
Link to comment
Share on other sites

Hi.

The RTC error is because the default length is 8 and on this device it should be 2.

In MaciASL there is an RTC fix for this.

I have a specific SSDT though.

 

/*
 * Intel ACPI Component Architecture
 * AML/ASL+ Disassembler version 20200528 (64-bit version)
 * Copyright (c) 2000 - 2020 Intel Corporation
 * 
 * Disassembling to symbolic ASL+ operators
 *
 * Disassembly of iASLqMXzg6.aml, Tue Nov 17 10:17:04 2020
 *
 * Original Table Header:
 *     Signature        "SSDT"
 *     Length           0x0000008E (142)
 *     Revision         0x02
 *     Checksum         0x9D
 *     OEM ID           "ACDT"
 *     OEM Table ID     "RTC0"
 *     OEM Revision     0x00000000 (0)
 *     Compiler ID      "INTL"
 *     Compiler Version 0x20200528 (538969384)
 */
DefinitionBlock ("", "SSDT", 2, "ACDT", "RTC0", 0x00000000)
{
    External (_SB_.PCI0.LPCB, DeviceObj)

    Scope (_SB.PCI0.LPCB)
    {
        Device (RTC0)
        {
            Name (_HID, EisaId ("PNP0B00") /* AT Real-Time Clock */)  // _HID: Hardware ID
            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
            {
                IO (Decode16,
                    0x0070,             // Range Minimum
                    0x0070,             // Range Maximum
                    0x01,               // Alignment
                    0x02,               // Length
                    )
                IRQNoFlags ()
                    {8}
            })
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (_OSI ("Darwin"))
                {
                    Return (0x0F)
                }
                Else
                {
                    Return (Zero)
                }
            }
        }
    }
}

Thanks for the tips on many other points though. I'm using a similar 800 G2 and it has help me enormously.

  • Like 1
Link to comment
Share on other sites

3 hours ago, anthonyuk said:

Hi.

The RTC error is because the default length is 8 and on this device it should be 2.

In MaciASL there is an RTC fix for this.

I have a specific SSDT though.

 

Thanks for the tips on many other points though. I'm using a similar 800 G2 and it has help me enormously.

 

You're welcome.  Thank you for your tip.  I have used your RTC patch numerous times on older hardware with CLOVER (all of my old hacks are running with your suggested RTC mod).  I'd like to experiment with the RTCMemoryFixup.kext, but I haven't taken the time to isolate the rtc-exclude offset/range.  I suspect that excluding an offset or offset range will fix this problem.  The challenge (or good thing) is that I never observe this RTC issue during "normal" operation.  I have only seen this during macOS install and when using OC tools that require reboot.

 

As long as normal operation is flawless, this RTC remains a low priority for me, but when I do fix it, I'd prefer to start with RTCMemoryFixup.kext to see if that cures it.

 

*** NOTE *** I don't see any RTC issues with CLOVER r5122 / Catalina 10.15.7.  I have only observed this with OC 0.6.3 / Big Sur.

Edited by tonyx86
Link to comment
Share on other sites

EDIT: A newer version of my OC 0.6.3 EFI is here.

 

I found mistakes in the USBPorts.kext that I generated with Hackintool:

HS14 was configured as an external USB3 port (UsbConnector 3) when it should have been Internal (UsbConnector 255)

and kUSBSleep and Wake Power properties were not set for MacMini8,1 (they were Hackintool defaults, I think)

My other mistake was that I had both SSDT-USBX.aml and USBPorts.kext in my EFI. SSDT-USBX.aml is no longer necessary with USBPorts.kext.  Also, thanks to @rafale77 for adding port comments and fixing the USB Type C Port Types (changing them to UsbConnector 10).

The attached OC 0.6.3 EFI has is modified as follows:

Removed SSDT-USBX.aml from ACPI (and remove from OC config.plist)

Replaced USBPorts.kext to address the issues above.

 

*** NOTE ***
If you run USBMap.command after removing SSDT-USBX.aml (leaving USBPorts.kext), USBMap will report that you're missing USBX:

Spoiler

1146068234_ScreenShot2020-11-18at12_47_38PM.png.9830a4b946eb0f3b9faf3bad41f18528.png

 

This is a false alarm, because IORegistryExplorer shows that USB Power Properties are loaded:

Spoiler

1592558866_ScreenShot2020-11-18at12_49_11PM.png.f926121ca621ee0b1ea283bae414439c.png

 

 

OC0.6.3-EFI-r004.zip USBPorts.kext.zip

Edited by tonyx86
Fixed broken links
Link to comment
Share on other sites

I have attached an updated "EliteDesk 800 G4 Mini - CLOVER Rev 1.4.zip" archive to Post #1. This updated archive includes a revised CLOVER EFI (CLOVER r5122 for Catalina - not Big Sur) with the following changes: Removed NVMeFix.kext (you may need to add NVMeFix depending on your choice of NVMe SSDs), updated USBPorts.kext, updated Lilu.kext, AppleALC.kext and WhateverGreen.kext. Removed ACPI/SSDT-USBX.aml (not needed with USBPorts.kext). USBPorts.kext now includes USB power properties from a real MacMini8,1 and correct port types for internal and Type C ports. Note that the LE folder (/Library/Extensions) in the updated archive also includes the updated kexts.

Edited by tonyx86
Fixed broken link
Link to comment
Share on other sites

I finally got around to updating the Acidanthera kexts in my OC EFI. A new OC 0.6.3 EFI (r005) is attached with the following kext updates:

  • Lilu.kext (from 1.4.8 to 1.4.9)
  • AppleALC.kext (from 1.5.3 to 1.5.4)
  • WhateverGreen.kext (from 1.4.3 to 1.4.4)

I am not sure that these updates affected much if anything in the EliteDesk 800 G4/G5 Minis and AppleALC 1.5.4 does not fix the microphone in the headset connector port (my microphone tests failed for both a stand-alone microphone and the microphone in a CTIA style (4-connector) headset).

 

 

OC0.6.3-EFI-r005.zip

Edited by tonyx86
Fixed broken download link
Link to comment
Share on other sites

@phucnguyen.2411 I noticed that you submitted the 'CX20632 layout-id 20 for HP Elitedesk 800 G5 Mini.'  Does the microphone / CTIA-style 4-connector headset work for you with layout-id 20?  I'm currently using your layout-id 20 with AppleALC.kext 1.5.4, but microphone does not work.  Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

I discovered that a real MacMini8,1 ACPI disables Device (HPET) on condition _OSI("Darwin") (when running macOS).  I have always thought that Device (HPET) is required (in fact, you'll see HPET patches in newer hack guides).  Just for fun, I disabled HPET as described here and my HackMini8,1 appears to be running fine without it.  Will continue to test this to be sure.  Would welcome feedback from others.

 

Attached is my SSDT for setting HPTE (to disable HPET).  If you use this patch, be sure to disable other HPET patches (e.g. disable CLOVER's Fix HPET).

 

 

SSDT-AWAC-HPET.zip

Edited by tonyx86
Attached SSDT
Link to comment
Share on other sites

I have reviewed real Mac ACPI / IORegistry dumps back to Skylake platforms and have confirmed that Apple has been setting HPET._STA=0 for a while now. I'm surprised that I have never seen this mentioned in any guides and that newer guides still explain how to patch HPET for new hack platforms. I guess old habits / paradigms die hard. These HP EliteDesk 800 G Minis (starting with my experience in May 2020) are my first "new" hacks since my Socket 1156 system, so I have never had a reason to review the ACPI of new Macs.

Based on my own review, an ACPI patch with HPET._STA=0 (as explained here) should be the standard on new hacks with Skylake and newer architectures (maybe earlier). I haven't yet tested, but it would seem to me that with HPET deleted, it is no longer necessary to patch IRQs (e.g. with SSDT-TIME) (since the intent of IRQ patching is to eliminate the conflict with HPET).

Edited by tonyx86
Link to comment
Share on other sites

EDIT: A note about CLOVER's FixRTC ACPI patch mentioned below: in addition to excluding the RTC IRQ (to prevent the IRQ conflict with HPET), CLOVER's FixRTC ACPI patch also patches ACPI to change the RTC memory length to 0x02. I believe that this prevents macOS from writing to and corrupting RTC. I suspect that setting RTC memory to 0x02 may not be the best way to address RTC corruption issues in our newer-generation hacks (may adversely affect sleep). If there are any RTC corruption issues after disabling CLOVER's FixRTC ACPI patch, I believe that Acidanthera's RTCMemoryFixup.kext should be used with an rtcfx-exclude range. Start with an rtcfx-exclude range of 00-FF as explained here and then narrow the range to find the specific range that causes the RTC corruption.

 

=================================

 

After patching HPET._STA=0, I am now testing the following CLOVER r5122 config.plist changes (for the reasons stated). Similarly, the SSDT-TIME IRQ patches (HPET, TMR, RTC) should no longer be necessary with OC.

The following CLOVER ACPI fixes do not appear to be necessary for the HP EliteDesk 800 G4/G5 Mini:

  • FixTMR - not needed after setting HPET._STA=0 (no longer a risk of IRQ conflict)
  • FixHPET - not needed after setting HPET._STA=0 (no longer a risk of IRQ conflict and we don't want to "force" _STA as available)
  • FixIPIC - there never was an IRQ conflict and this was always unnecessary
  • FixRTC - not needed after setting HPET._STA=0 (no longer a risk of IRQ conflict)
  • FixMutex - was never necessary, since original DSDT has propertly formed Mutexes
  • FixS3D - was never necessary, since there are no S3D issues in original DSDT
Edited by tonyx86
Added a not about CLOVER's FixRTC ACPI patch
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 11/22/2020 at 11:31 PM, tonyx86 said:

@phucnguyen.2411 I noticed that you submitted the 'CX20632 layout-id 20 for HP Elitedesk 800 G5 Mini.'  Does the microphone / CTIA-style 4-connector headset work for you with layout-id 20?  I'm currently using your layout-id 20 with AppleALC.kext 1.5.4, but microphone does not work.  Thanks!

 

Hello

 

Try this custom made AppleALC with fixed microphone configuration and outputs mute controls. I have HP Elitedesk 800G5 mini and tired without mic input, so I have spent a lot of time and found some solution. Use it with Layout-20. Let me know if it works for you. 

AppleALC-1.5.5-RELEASE.zip

Edited by v.osypets
  • Like 2
Link to comment
Share on other sites

Thank you, @v.osypets ! I will definitely try your new AppleALC.kext and let you know.

 

EDIT: @v.osypetsI did a quick test of your new kext and see that the audio input is now registering in Sound Preferences > Input Level.  Looks like you fixed it!  I hope you've submitted your fix to Acidanthera.  Also, with AppleALC.kext v1.5.4, I was seeing "relocation failed" errors when attempting to install AppleALC.kext in /Library/Extensions.  I no longer see these errors, so it looks like your v1.5.5 includes Vit9696's fixes as well.  Thank you!

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

On 12/6/2020 at 4:27 PM, tonyx86 said:

Thank you, @v.osypets ! I will definitely try your new AppleALC.kext and let you know.

 

EDIT: @v.osypetsI did a quick test of your new kext and see that the audio input is now registering in Sound Preferences > Input Level.  Looks like you fixed it!  I hope you've submitted your fix to Acidanthera.  Also, with AppleALC.kext v1.5.4, I was seeing "relocation failed" errors when attempting to install AppleALC.kext in /Library/Extensions.  I no longer see these errors, so it looks like your v1.5.5 includes Vit9696's fixes as well.  Thank you!

 

Yeah, I have submitted fix and they already included it to the latest release. Hope it will work, because I did that when I was very tired. :) 

21 hours ago, tonyx86 said:

@v.osypets I saw your BIOS modding request to disable CFG Lock on your G5 Mini.  Did you ever figure it out?  It appears that I've tried the same things that you had prior to your post.

 

We have locked BIOS by HP, so it's not easy to do there some changes. I have modified with CFG Lock disabled, but I can't flash it, because of BIOS integrated protection. 

Link to comment
Share on other sites

17 minutes ago, v.osypets said:

We have locked BIOS by HP, so it's not easy to do there some changes. I have modified with CFG Lock disabled, but I can't flash it, because of BIOS integrated protection. 

Would you be able to share how you found CFGLock in your G5 Mini BIOS?

Link to comment
Share on other sites

11 minutes ago, v.osypets said:

 

I had some help from guy who have great experience in this regard...

 

Ok - we're getting closer. :)  What did you (he) do to unlock CFGLock?

Link to comment
Share on other sites

11 minutes ago, tonyx86 said:

 

Ok - we're getting closer. :)  What did you (he) do to unlock CFGLock?

 

He didn't tell me, because we faced with BIOS protection and it's difficult to unlock it, so we decided to close that topic. I have attached patched BIOS, maybe you will have some time to find some solution. I have no issues with my system at all without CFGLock disabled.    

 

478674_2020-10-13_21_40_24.thumb.jpg.eccb8ee3cac54c6b4c1e53eeedbfd389.jpg

Edited by v.osypets
  • Like 1
Link to comment
Share on other sites

@v.osypets  I was hoping to learn how you (he) found the CFGLock offset to be able to disable it (even though you weren't able to flash the modded BIOS).  I'll see if I can read what you posted to figure it out.  If you have any more clues that specifically indicate how you (he) found the actual CFGLock offset (location in BIOS), that would be helpful.  Thanks for your patience wiith my remedial questions.

  • Like 1
Link to comment
Share on other sites

On 11/14/2020 at 6:12 PM, tonyx86 said:

EDIT: A newer version of my OC 0.6.3 EFI is here.

 

I finally got around to testing MSR 0xE2 register (using OC VerifyMsrE2.efi tool described here). The MSR 0xE2 register is locked in the HP EliteDesk 800 G4 Mini BIOS (see attached screenshot). I have attached a revised OC 0.6.3 EFI to this post. This revised EFI enables Kernel Quirks AppleCpuPmCfgLock and AppleXcpmCfgLock (which others had already done. I did not since my system seemed to work fine with these Quirks disabled). I'm not sure if locked MSR 0xE2 explains the real time clock error that I observed during the Big Sur install and I'm not sure if both AppleCpuPmCfgLock and AppleXcpmCfgLock need to be enabled. I'd prefer to make the suggested BIOS mod, but that's not a high priority for me. If someone else wants to try the BIOS mod (described here), that would be great!

Note that I have not tested my posted EFI with any other OS (e.g. Windows). I dual boot my system, but I don't use OC to boot Windows. In rare instances when I want to boot Windows, I manually select Windows by pressing F9 at startup.

 

VerifyMsrE2.efi Screenshot

  Reveal hidden contents

IMG_1383.thumb.JPG.aeeb5167ef89a5ef5d640feb46e69d38.JPG

 

 

OC0.6.3-EFI-r003.zip

 

Only AppleXcpmCfgLock quirk must be enabled, when CFG-Lock enabled in BIOS on this system.

Link to comment
Share on other sites

Thank you.  I've read that and have also seen conflicting recommendations on this.  My current OC config enables both  AppleCpuPmCfgLock and AppleXcpmCfgLock, but I've also been able to run without either quirk enabled and I don't notice any difference in behavior.  Based on my testing, it doesn't seem that the settings of these two quirks matters on the HP EliteDesk 800 G4 Mini.

Link to comment
Share on other sites

I have upgraded my Catalina 10.15.7.03 configuration with the latest Acidanthera kexts listed below. All working fine and Line-in/Mic works with layout-id 20 (0x14).

  • Lilu.kext: upgrade from 1.4.9 to 1.5.0
  • AppleALC.kext: upgrade from 1.5.4 to 1.5.5
  • WhateverGreen.kext: upgrade from 1.4.4 to 1.4.5

I will test for a while before updating the baseline attached to Post #1 in this thread. When I post the new baseline, it will include the following changes:

  • Setting HPET._STA=0 (delete HPET from macOS IORegistry)
  • Remove unnecessary CLOVER ACPI patches
  • Upgrade Acidanthera kexts
Link to comment
Share on other sites

I read this thread by @5T33Z0 which suggests a reduced driver set with CLOVER (especially after r5122). Based on the recommendations, I am currently running without FSInject.efi and without SMCHelper.efi. My reduced CLOVER r5122 driver set is as follows:

  • ApfsDriverLoader.efi
  • DataHubDxe.efi
  • NvmExpressDxe.efi
  • OcQuirks.efi (since I'm still booting with r5122)
  • OpenRuntime.efi
  • VBoxHfs.efi

According to the thread, after r5123, OcQuirks.efi is no longer necessary.

Edited by tonyx86
Fixed broken link
Link to comment
Share on other sites

I just participated in a Zoom call with my HackMini8,1. I used a CTIA-style (4-connector) headset with built-in microphone and inserted the connector into the front-right audio jack. The audio (both in and out) worked perfectly with AppleALC.kext 1.5.5 and layout-id 20 (0x14). To ensure optimal microphone audio, I needed to set the SoundPreferences > InputVolume to maximum. I didn't experiment with other input volume settings.

Edited by tonyx86
Link to comment
Share on other sites

I have attached an updated "EliteDesk 800 G4 Mini - CLOVER r5122-v5.zip" archive to Post #1. This new archive

Use this new EFI with CLOVER r5122 & Catalina ONLY. If you use this new CLOVER config.plist, you must replace the XX-MASKED-XX values with your own values.  Continue to use my Draft OC EFI if you need to run Big Sur.

Edited by tonyx86
Fixed broken links
Link to comment
Share on other sites

×
×
  • Create New...