Contribute
Register

[Guide] HP Elite 8300 & 6300 Pro (all form factors) using Clover UEFI hotpatch

Status
Not open for further replies.

Sniki

Moderator
Joined
Jan 5, 2016
Messages
2,313
Motherboard
HP Elite 8300 SFF
CPU
i7-3770
Graphics
Intel HD 3000 | GTX 1650 LP
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
271652

Introduction

Welcome to my HP 8300 & 6300 (all form factors) macOS Mojave guide.
The inspiration to get one of these Desktops came from @trs96 and his great guides that he created for macOS High Sierra & macOS Sierra.
These Desktops are excellent machines that are both affordable and powerful for a general introduction to macOS.
There is excellent support as of now and they are very flexible for upgrades in both hardware and software.


Overview
This guide uses official Clover Bootloader builds as that's what i am more familiar with. I'm also using the Clover UEFI hotpatching method as opposed to DSDT edits for working audio, graphics, USB, etc.
I will add the Unibeast & Multibeast installation steps later for those who prefer it or as a complete replacement later.
All the files such as: config.plist, SSDTs, kexts, customizations, scripts and tools will be maintained on my github repo for better and faster updates.
Everything in there will be documented so that everyone can read commits and see what has changed and updated from last time checked.


Graphics Options
If you buy an HP with HD4000 graphics you can then use any form factor, even the smallest USDT. You'll need to connect your monitor via the onboard DisplayPort output for working graphics. If what you have already has only HD2500 you can upgrade to one of the following Intel Core i CPUs or use a Dedicated Graphics Card.

There are six Ivy Bridge CPUs you can use in your Dell Optiplex desktop that have the HD4000 graphics built in to the CPU. i3-3225 - i3-3245 - i5-3335S - i5-3475S - i7-3770S - i7-3770. The best performer is the i7-3770. The best value is the quad core i5-3475S. If you want to game, code and/or edit video get the i7-3770. It has four cores and eight threads and the highest clock speeds.

And a couple of pics for emphasis.

i7-3770 2.png
i5-3475S.png


What works
- Intel HD4000 Graphics QE/CI
- Audio (All inputs and outputs)
- USB 3.0 and 2.0 Ports
- Intel Gigabit Ethernet
- Sleep and Wake
- Display Port & Display Port Audio
- CPU & GPU Power Management
- Serial Port
- Wireless and Bluetooth (with compatible card)
- iMessage and Facetime

What doesn't work
- VGA Port (No current known solution)
- Intel HD2500 Graphics (Users with CPU(s) that have such graphics card need a Dedicated GPU)

What you need
- One of the HP 6300 or 8300 form factors
- macOS Mojave downloaded from the Mac App Store
- 8GB+ USB Flash drive (Note: some have around 7GB of usable storage and won't work, in this case use 16GB+)
- Downloaded HP6300-HP8300 Repository from my Github (Click on HP6300-HP8300) and download as zip like in the picture shown below:

Github.png



BIOS

Step 1: Update Bios
Determine which BIOS revision is installed on your HP PC. Tap on F10 repeatedly after powering on to enter the BIOS. Then go to File → System Information → System BIOS. Many of these will come with v02.05 installed. If it is older than v02.83, you’ll want to flash it to the v02.99 Rev. A version. This step is mandatory for the install of Sierra, High Sierra, Mojave or Catalina to work properly.

Here's the link to the post where @trs96 describe the BIOS flash method using the .BIN file for 2.99 or 3.04.
https://www.tonymacx86.com/threads/...fordable-customac.224812/page-47#post-1570668

Step 2: Configuration
Tap on F10 repeatedly after powering on to enter the BIOS

Go to Storage tab > Storage Options:
SATA emulation: AHCI
Removable Media Boot: Enabled

Go to Security tab:
Network Boot: Disabled
Secure Boot Configuration:
Legacy Support: Disabled
Secure Boot: Disabled
Fast Boot - Enabled

Special Note (Must read)
Before proceeding with this guide, i would highly suggest that you begin with a clean install rather than upgrading from your previous setup as the method and kexts are different than what you might be currently using on your HP Desktop PC.


Creating USB Installer

I would suggest everyone to go read the @RehabMan guide on how to boot USB Installer as it covers everything that you will need or face during setup.
Link: https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/

Step 1:
Download Clover Bootloader:
https://github.com/CloverHackyColor/CloverBootloader/releases

Step 2:
Format USB Drive as "HFS+J" with "GPT Partition Table" and make sure to name it: install_osx

Step 3:
Download macOS Mojave from the Mac App Store, after the download process has been finished, create the USB Installer by opening Terminal and writing the following command:
Code:
sudo "/Applications/Install macOS Mojave.app/Contents/Resources/createinstallmedia" --volume  /Volumes/install_osx --nointeraction
Press "Enter" and it will ask for your "User" password, type your Password, wait for the process, wait for the process to end, it should take around 10-30 minutes.

Step 4:
Download all the needed kexts. I listed all the needed kexts down below which are in form of links and as soon as you click on them, they should send you straight to the download page:

Lilu.kext
VirtualSMC.kext
SMCProcessor.kext

WhateverGreen.kext
AppleALC.kext
IntelMausi.kext
USBPorts.kext (included on the HP8300-HP6300 Github Project Zip with the rest of the other files)

Note: about kext installation From now on, all kexts should be kept into the EFI/Clover/kexts/Other and it's not necessary to install them into /Library/Extensions/ anymore and in fact it's not even possible anymore on macOS Catalina and above without some additional work.
Instead keeping all kexts into EFI leaves the system clean/untouched and if any kext does cause you trouble, you can simply drop it from clover boot menu, boot without it, replace/fix it and reboot again without additional headache.

Step 5:
Install Clover Bootloader by carefully following the steps explained down below:
Warning! - if you accidentally install Clover Bootloader into the partition of the real MacBook, Mac Mini, iMac or Mac Pro that you are using, you might brick it !, so be careful and choose the USB drive for installation !
Open Clover bootloader installer, click on continue, agree, continue and when you reach this screen:

Install Location.png
Make sure to click Change Install Location... and then select the USB Drive as shown in the screenshot down below:

install_osx.png

Now click "Continue", after this step, click on "Customize" as seen in the screenshot down below:

Customize.png
This brings us into the customization section of Clover Bootloader where we select the appropriate configuration for our hardware like shown in the screenshot down below:

Custom.png
Select/Checkmark the settings as listed on the screenshot above or written down below:

- Clover for UEFI booting only
- Install Clover in the ESP


Make sure to check the picture down below to see and select all the needed drivers and selected accordingly like this:

Recommended Drivers.png
Note: As seen on this guide, VirtualSMC is recommended but for whatever reason you decide to use FakeSMC instead,
make sure to checkmark SMCHelper and skip adding VirtualSmc.efi into EFI/Clover/Drivers/UEFI

FileSystem Drivers.png


MemoryFix Drivers.png
Now click "Install", it will open a prompt for your "User" password, write password and press Enter: installation starts.


Pre Installation

As soon as bootloader installation ends, your EFI partition of the USB Drive will be mounted (will show up on desktop).
Open the EFI partition of your USB Drive and go to:
EFI/Clover/ and delete config.plist, copy the config.plist that you downloaded from my repo and paste it there.

Note: on choosing the config.plist according to your setup:
1.If you have a HP with HD4000 Graphics, copy the config_HD4000.plist there and rename it to config.plist
2.If you have a HP with HD2500 Graphics, copy the config_HD2500.plist there and rename it to config.plist
The HD2500 Graphics is not supported but works on headless mode to enable QuickSync and the other hardware acceleration features in combination with the Dedicated GPU that you are using.

Into EFI/Clover/ACPI/Patched, add the SSDT-EC.aml from my repo
Into EFI/Clover/Drivers/UEFI, make sure to add HFSPlus.efi (click on it to download it)
Into EFI/Clover/Drivers/UEFI, make sure to add VirtualSMC.efi (included on the downloaded zip of VirtualSMC)
Into EFI/Clover/kexts/Other, make sure to add the following kexts listed down below:

Lilu.kext
VirtualSMC.kext
SMCProcessor.kext

WhateverGreen.kext
AppleALC.kext
IntelMausi.kext
USBPorts.kext (included on the HP8300-HP6300 Github Project zip with the rest of the other files)

Backup all your important data because we will continue with the installation process on the next step/chapter.
Backup Clover Bootloader installer into the USB Drive for installation (not on the USB EFI folder !)
Backup my HP6300-HP8300 folder downloaded from the Github repository
You can simply create a Hackintosh folder into desktop, backup/copy the two above and paste them on that hackintosh folder.
Copy that Hackintosh folder and paste it on the USB Drive "Install macOS Mojave" or whatever name it has.


Installation

Step 1:
Reboot your Desktop PC, after the screen turns on, press F9 repeatedly to enter into the Boot Menu.
On the Boot Menu, choose the USB Drive and press "Enter"
Now it should bring you into the Clover Bootloader menu, select Install macOS Mojave (USB Drive) and press enter.
The Installer now should boot and reach installation menu.

Step 2:
From the installation menu, open Disk Utility, select the partition that you plan to install macOS, format it as APFS and for the purpose of this guide we will name it "Mac". Exit Disk Utility after the format process has finished, this will bring you back to the Installer Main Menu.
Now select install macOS Mojave, agree to the "terms and conditions", select your HDD/SSD that you formatted and the installation process will begin. this will be the part 1 install. Part 1 should take around 5 minutes.

Step 3:
Desktop-PC will automatically reboot when Part 1 installation ends. now as soon as Clover Bootloader menu shows up, this time you select the "Mac" partition to boot from, the installer will continue with Part 2 now and show the progress bar with time remaining under the Apple boot logo.
Note: Sometimes as soon as the time remaining shows up under the Apple boot logo, the Desktop-PC will reboot once more, if this happens, choose again to boot from the "Mac" partition and part 2 installation will continue and complete.
After the installation has been completed, Desktop-PC will reboot and bring you to the part 3 - first boot user setup.

Step 4:
Select Language, Continue, Connecting to Internet is optional or you can skip it for now.
When you reach the menu to sign with your Apple ID, make sure to skip this step, it will be important if you want to setup iMessage & FaceTime.


Post Installation

Step 1:
Run Apps from anywhere is now missing from SysPrefs > Security & Privacy > General.
Open terminal and enter the following command:
Code:
sudo spctl --master-disable
This allows you to install Applications downloaded from Internet / Outside of the Mac App Store.

Step 2:
Open Clover Bootloader installer and continue with bootloader installation into the HDD/SSD that we installed macOS.
The procedures are exactly the same as on the Creating USB Installer - Step 5 & Pre-Installation section of the guide, except that this time, instead of the USB Drive, we select the "Mac" HDD/SSD that we installed macOS.
Note: This includes copying the config.plist, kexts and UEFI drivers into the same locations but on the HDD/SSD EFI.


Step 3: Disable Hibernation
Be aware that hibernation (suspend to disk or S4 sleep) is not supported on hackintosh.

You should disable it:
Code:
sudo pmset -a hibernatemode 0
sudo rm /var/vm/sleepimage
sudo mkdir /var/vm/sleepimage
Always check your hibernatemode after updates and disable it. System updates tend to re-enable it, although the trick above (making sleepimage a directory) tends to help.

And it may be a good idea to disable the other hibernation related options:
Code:
sudo pmset -a standby 0
sudo pmset -a autopoweroff 0

Step 4: Installing troubleshooting tools.
Create a new folder on desktop and name it: tools
copy patchmatic and iasl and paste them on the "tools" folder that you created on desktop

Get "patchmatic" by clicking on this: Link
Get "iasl" by click on this: Link

Open terminal and write the following commands to install these tools:
Code:
cd desktop/tools
sudo cp iasl /usr/local/bin
sudo cp patchmatic /usr/local/bin


Power Management
Power Management contrary to what many desktop guides use to say, for me it's not something only necessary for laptops, but it is really important to be properly implemented for Desktops as well.

Without proper Power Management your Desktop:
- Won't be able to reach it's maximum performance (no idle frequency, not reaching max turbo boost, overclock speed, etc)
- Won't be stable, crashes, freezes, hangs, etc.
- Excessive Power Consumption, fans spinning all time, Noise, Heat, etc.

Custom SSDT.aml using ssdtPRGen.sh

To prepare, you only need to do the first two commands:
Code:
cd ~
curl -o ./ssdtPRGen.sh https://raw.githubusercontent.com/Piker-Alpha/ssdtPRGen.sh/master/ssdtPRGen.sh
chmod +x ./ssdtPRGen.sh
With newer CPUs, you might want to use the beta branch:
Code:
cd ~
curl -o ./ssdtPRGen.sh https://raw.githubusercontent.com/Piker-Alpha/ssdtPRGen.sh/Beta/ssdtPRGen.sh
chmod +x ./ssdtPRGen.sh

Then you can run the script:
Code:
./ssdtPRGen.sh
For some Ivy Bridge CPUs, you may need to use the "-w 2" or "-w 3" (non-beta branch, "-c 2" or "-c 3" for the beta branch).

When it asks if you want to copy to /Extra just respond 'n'. Same for opening ssdt.dsl... respond 'n'.

The results are at ~/Library/ssdtPRGen/SSDT.aml.

Assuming your EFI partition is mounted at /Volumes/EFI, copy that file to EFI partition, /EFI/Clover/ACPI/patched/SSDT.aml
Code:
cd ~
cp ~/Library/ssdtPRGen/ssdt.aml /Volumes/EFI/EFI/Clover/ACPI/patched/SSDT.aml
For full informations and details follow the Rehabman guide (same applies for desktops as well):
https://www.tonymacx86.com/threads/guide-native-power-management-for-laptops.175801/


USB Ports
USB Ports are implemented with USBPorts.kext and in use with macmini6,1 SMBIOS, if for any reason you decided, need to use another SMBIOS, make sure to rename all instances of macmini 6,1 to your smbios in use into:
USBPorts.kext/Contents/Info.plist > IOKitPersonalities and the sub-dictionaries, use search to not miss any location.


iMessage and FaceTime

In order to setup your hackintosh machine to use Apple Services, iMessage & FaceTime, follow @P1LGRIM guide:
https://www.tonymacx86.com/threads/an-idiots-guide-to-imessage.196827/
It has step by step screenshot and written instructions for you to easily fix/setup.


Problem Reporting

It is impossible to diagnose a problem without data that shows how your system is configured.

Also, impossible to analyze any data that you might provide without a clear understanding of your hardware. So make sure your profile is filled as per the first question in this FAQ, "Q. Where do I start?".

If you can't boot, a bare minimum is:
- Boot verbose, attach photo
- Attach EFI/Clover folder as ZIP (press F2 then F4 at main Clover screen just before collecting). Please eliminate 'themes' directory. Provide only EFI/Clover, not the entire EFI folder.

Note: Some Keyboards swap Fn+Fx for Fx. For those Keyboards, press Fn+F2 then Fn+F4. If you're not sure, press F2, then F4, then Fn+F2, then Fn+F4. You can also verify by pressing F1 (or Fn+F1) to see which one brings the menu.

If you can boot, but are having some other problem, describe the problem clearly and provide data...

Download patchmatic: https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/RehabMan-patchmatic-2015-0107.zip
Extract the 'patchmatic' binary from the ZIP. Copy it to /usr/bin, such that you have the binary at /usr/bin/patchmatic.

In terminal,
Code:
if [ -d ~/Downloads/RehabMan ]; then rm -R ~/Downloads/RehabMan; fi
mkdir ~/Downloads/RehabMan
cd ~/Downloads/RehabMan
patchmatic -extract
Note: It is easier if you use copy/paste instead of typing the commands manually.

Attach contents of Downloads/RehabMan directory as ZIP.

Attach ioreg as ZIP: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.

Provide output (in Terminal):
Code:
kextstat|grep -y acpiplat
kextstat|grep -y appleintelcpu
kextstat|grep -y applelpc
kextstat|grep -y applehda
ls -l /System/Library/Extensions/AppleHDA.kext/Contents/Resources/*.zml*
pmset -g assertions
pmset -g
system_profiler SPSerialATADataType|grep TRIM
Attach EFI/Clover folder as ZIP (press F2 then F4 at main Clover screen just before collecting). Please eliminate 'themes' directory. Provide only EFI/Clover, not the entire EFI folder.

Note: Some Keyboards swap Fn+Fx for Fx. For those Keyboards, press Fn+F2 then Fn+F4. If you're not sure, press F2, then F4, then Fn+F2, then Fn+F4. You can also verify by pressing F1 (or Fn+F1) to see which one brings the menu.

For 10.11 and later, attach output of (in Terminal):
Code:
sudo kextcache -i /
Older versions:
Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /
Compress all files as ZIP. Do not use external links. Attach all files using site attachments only.


Q. Is there a script that will collect all Problem Reporting data automatically?

Yes! (almost)

User @black.dragon74 has created a script (gen_debug.sh) that automates most of the "Problem Reporting" tasks (as described in the previous question).

The part it cannot do is pressing F2 and F4 for you at the main Clover screen.
And of course, it only works for the case you can boot into your system. If you have a problem booting, you must obtain and collect the verbose boot photo manually (and EFI/Clover).

Full details are here:
https://www.tonymacx86.com/threads/tool-generate-proper-problem-reporting-files.235953/


Credits
trs96 - Helping maintaining the guide and supporting the community.
LisaAlterEgo - Troubleshooting issues and providing feedback and problem fixes.
 
Last edited:
Reserved for "Future Post" #2
 
Reserved for "Future Post" #3
 
Sniki, thanks for posting this Mojave guide for the HP 6300/8300. I've got a question about slow boot times. When I install the latest AppleALC and Lilu kexts to /L/E it slows down the boot time on my HP 6300 Pro. I mean, really slow as in over 3 minutes.
When I remove those two kexts it boots in a normal amount of time.

Here's the verbose screenshot. It doesn't KP, as I said the total boot time is over 4 minutes total. I'm not certain why the 3, 60s stalls happen with the IOHDACodecFunction message. There is always a third one after the first two shown in the screenshot.

1125180623.jpg
 
Sniki, thanks for posting this Mojave guide for the HP 6300/8300. I've got a question about slow boot times. When I install the latest AppleALC and Lilu kexts to /L/E it slows down the boot time on my HP 6300 Pro. I mean, really slow as in over 3 minutes.
When I remove those two kexts it boots in a normal amount of time.

Here's the verbose screenshot. It doesn't KP, as I said the total boot time is over 4 minutes total. I'm not certain why the 3, 60s stalls happen with the IOHDACodecFunction message. There is always a third one after the first two shown in the screenshot.

View attachment 368234
Weird. did you try booting without caches and trying to rebuild caches ?

Can you provide "Problem Reporting" files after you boot with these kexts installed ?
Im curious to see what is causing this... as for me, the boot time is 10 sec from the moment i press enter on Clover bootloader menu to boot the macOS. (on 2.5" Kingston SSD now V300 120GB).
I also want to have a look if there is a possible difference on ACPI between HP Elite 8300 vs HP 6300 models.
 
Here's the PR files. Seems that the slow boot times are fixed but now it broke the audio. Any ideas why ?

Not sure exactly what the kextstat log means:

APPLE HDA LOG:-
84 1 0xffffff7f82c4a000 0x1d000 0x1d000 com.apple.driver.AppleHDAController (281.52) 0CEE0F18-1D22-3D90-9FD5-ECCD63F81428 <83 82 81 12 7 6 5 4 3 1>
129 0 0xffffff7f82dca000 0xb7000 0xb7000 com.apple.driver.AppleHDA (281.52) 119A5EAE-5FD8-3CF3-A0CA-73EDDDC23DBE <128 95 84 83 82 81 6 5 4 3 1>
END APPLE HDA LOG.

LS FOR APPLEHDA :-
ls: /System/Library/Extensions/AppleHDA.kext/Contents/Resources/*.zml*: No such file or directory
 

Attachments

  • debug_21609.zip
    1.2 MB · Views: 314
Last edited:
Here's the PR files. Seems that the slow boot times are fixed but now it broke the audio. Any ideas why ?
According to Kext cache Output, AppleALC.kext is missing, make you sure you installed it.
FakeSMC.kext is missing on EFI/Clover/kexts/Other (it should be there too) even if you have it installed on Library/Extensions/
Same applies for Lilu.kext, WhateverGreen.kext, IntelMausiEthernet.kext (they are also important for Update scenarios).

Just as i thought, HP 6300 Pro does have an unsupported LPC device id 0x1e48 which is missing on the SSDT-LPC.dsl, i added the device-id on the SSDT-LPC.dsl and i rebuilt SSDT-HP.aml with added support for it.
Simply download the repository from my Github and use the updated SSDT-HP.aml, i just pushed the new changes.
 
According to Kext cache Output, AppleALC.kext is missing, make you sure you installed it.
Was testing to see if leaving just AppleALC out would make any difference in boot time and it did.

Re-installed AppleALC rebuilt caches then rebooted. Went back to 4 min. + boot times but audio now works.
Also added the new updated for HP 6300 SSDT.aml. Thanks.

So, I've narrowed it down to the AppleALC kext installed to /L/E as the only thing it takes to make the boot time so long.

Attached updated PR files. Wonder what ALC related issue is causing this ??
 

Attachments

  • debug_27008.zip
    1.6 MB · Views: 327
Last edited:
Re-installed AppleALC rebuilt caches then rebooted. Went back to 4 min. + boot times but audio now works.
Also added the new updated for HP 6300 SSDT.aml. Thanks.
So, I've narrowed it down to the AppleALC kext installed to /L/E as the only thing it takes to make the boot time so long.

Attached updated PR files. Wonder what is causing this ??
Really weird issue, what makes me wonder is why isn't it happening to me.

What i think might be the problem is that you have dedicated nvidia card, in the other hand you have IGPU not properly configured (not supported yet), it might be trying to find the HDA HDMI Controller.

I noticed that they did a lot of adjustments and auto detection for controller and inject only if needed options.
I did build latest AppleALC.kext from source, give it a try.

Some suggestions (make sure to test them one by one so we know where exactly is the issue:

1. into config.plist /Devices/Properties/PciRoot(0)/Pci(0x02,0)/
- removed AAPL,ig-platform-id & device-id & hda-gfx
reboot and test

2. if option 1. doesn't work, install the attached AppleALC.kext and see if the issue is fixed.

3. if option 2. doesnt't work either, try to boot with -ccoff kernel flag to check if it is something codeccommander.kext related.

4. if even 3. doesn't work, i will build a Audio Injector.kext instead of AppleALC.kext and check if the issue get's solved, i think i have seen some rare similar issues on forums like yours, i believe it was solved by doing this step, however make sure you test all of these that i mentioned in order. im positive that nr1 or nr2 will solve the problem.
 

Attachments

  • AppleALC.kext.zip
    759.2 KB · Views: 371
Tested 1,2,3 and they made no difference in boot times.

Guess this tells us it's not optimal to use an HD2500 Ivy bridge CPU and Nvidia graphics if you want to hackintosh one of these HPs. One of the HD4000 CPUs is the better choice. HD4000/5000 support in macOS is the best of any of the integrated Intel gfx options.

There is always USB audio but I'm not really interested in using that long term.
 
Status
Not open for further replies.
Back
Top