Contribute
Register

[Guide] HP Pavilion 15-AB216TX Mojave

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,075
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
The purpose of this guide is to provide a step-by-step guide to installing macOS Mojave on the HP Pavilion 15-AB216TX laptop.


Note: This guide will also work with High Sierra, Sierra or El Capitan


1. Computer Specification

HP Pavilion 15-AB216TX

Intel® Core™ i5-5200U @2.2Ghz

4GB RAM PC12800 DDR3L

Intel® HD Graphics 5500 (Broadwell)

Nvidia Geforce GT 940M (Disabled in DSDT)

256GB SanDisk SD8SN8U-256G-1006 M.2 SATA + M.2 (SATA) to standard SATA adapter

1TB 5400 RPM SATA + HDD Caddy (Replaced with DVD-ROM)

Realtek ALC290

RTL8101E Ethernet

RTL8723BE (1x1) and BT 4.0 Combo (Replaced with Broadcom BCM943602BAED + BT 4.1 (DW1830))


2. What you need


- HP Pavilion 15-AB216TX or Similar Hardware

- Latest Clover EFI bootloader

- macOS High Sierra/Sierra/El Capitan downloaded from the Mac App Store

- 8GB+ USB stick

- Access to Mac or Hackintosh.

- (Optional) Broadcom BCM94352Z/BCM943602BAED for native WiFi.

- DVMT Pre-Allocation memory with Shell Command Won't Work on this Machine, there is error notification about "can't change value with EFI”, Apply Binary PATCH Stolen Memory assertion to avoid Kernel Panic and Enable Full Graphics Acceleration with Clover. WhateverGreen is the preferred method (as of Mojave) for Graphics injection and Binary Patching.


3. BIOS settings

- UEFI boot is enabled

- secure boot is disabled

- enable Legacy Boot (but UEFI first) and you may experience less boot time glitches


4. Pre-Installation

Prior to installing macOS, it is a good idea to create an OEM recovery USB from Windows. If anything goes wrong and you want/need to get back to Windows, you can restore it via the USB. Use the utility provided by HP to accomplish this.

Always backup data you don’t want to lose. I take no responsibility for damaging your computer or data loss. This guide will lead you to do a “clean installation” which means formatting your main drive.


5. Preparing USB and initial Installation

Prepare a USB with 8GB or more, format by Disk Utility:

- Click Erase

- Format: Mac OS Extended (Journaled)

- Scheme: GUID Partition Map



- Download Install macOS Mojave app from AppStore (or version of macOS that you want to install)

- Download Latest Clover EFI

- Open terminal app and paste this piece of code

Code:
 sudo "/Applications/Install macOS Mojave.app/Contents/Resources/createinstallmedia" --volume  /Volumes/macOS --nointeraction
- Rename the install media (optional)...

Code:
 sudo diskutil rename "Install macOS High Sierra" install_osx
- Install Clover to formatted USB with following selected

Code:
Install for UEFI Booting only
Install clover in ESP
Drivers64UEFI->AppleImageCodec-64
Drivers64UEFI->AppleKeyAggregator-64
Drivers64UEFI->AppleKeyFeeder-64
Drivers64UEFI->AppleUITheme-64
Drivers64UEFI->FirmwareVolume-64
Drivers64UEFI->FSInject-64
Drivers64UEFI->SMCHelper-64
Drivers64UEFI->ApfsDriverLoader-64 -> This is the APFS file system driver
Drivers64UEFI->AppleImageLoader-64 -> This is required for APFS security (was embedded into early releases of ApfsDriverLoader)
Drivers64UEFI->AptioMemoryFix-64
Drivers64UEFI->CsmVideoDxe-64
Drivers64UEFI->PartitionDxe-64
- If you have a dual GPU (Intel + AMD or Intel + Nvidia), then you have to place SSDT-DiscreteSpoof.aml to
EFI -> Clover -> ACPI -> Patched
more info for this Bug at [FIX] "Window Server Service only ran for 0 seconds" with dual-GPU

- Mount EFI Partition, replace config.plist.

- Restart and press F9 to choose Boot devices > Boot from EFI file > choose your EFI partition > EFI > Boot > BOOTX64.efi

- Clover bootloader screen shows up, select "Boot OS X Install from install_osx".

- Use Disk Utility to format your drive as GPT, create a APFS partition (Mojave on HDD is also APFS, so no more HFS+) and install macOS Mojave to your formatted partition

- System will restart after copying files from USB drive

- After Restart press F9 to choose Boot devices > Boot from EFI file > choose your EFI partition > EFI > Boot > BOOTX64.efi

- Clover bootloader screen shows up, select "Boot OS X from (Install macOS Mojave)"

- When its done after reboot, select "Boot OS X from (your install target partition)"

- If everything goes well, you can boot straight to desktop.

Clover: run the Clover Installer package:

- select the target of the install to "YourPartition" using "Change Install Location"

- select "Customize" (the default is a legacy install -- we need to change it)

- check "Install for UEFI booting only", "Install Clover in the ESP" will automatically select

- check following from Drivers64UEFI
Code:
Drivers64UEFI->AppleImageCodec-64
Drivers64UEFI->AppleKeyAggregator-64
Drivers64UEFI->AppleKeyFeeder-64
Drivers64UEFI->AppleUITheme-64
Drivers64UEFI->FirmwareVolume-64
Drivers64UEFI->FSInject-64
Drivers64UEFI->SMCHelper-64
Drivers64UEFI->ApfsDriverLoader-64 -> This is the APFS file system driver
Drivers64UEFI->AppleImageLoader-64 -> This is required for APFS security (was embedded into early releases of ApfsDriverLoader)
Drivers64UEFI->AptioMemoryFix-64
Drivers64UEFI->CsmVideoDxe-64
Drivers64UEFI->PartitionDxe-64
- select "Install RC scripts on target volume" and/or "Install all RC scripts on all other boot volumes”.


6. Kexts

Place these Kexts in /Library/Extensions

- AppleALC.kext (layout id 28 injected via Clover or DSDT) https://github.com/acidanthera/AppleALC/releases
- set config.plist -> Devices -> Audio -> Inject = 28 or layout id according to your codec.
(older AppleHDA_ALC290.kext (layout id: 3) doesn't work anymore due to removal of many Layout id's form AppleHDA.Kext in Mojave, it worked fine till 10.13.6)

- ACPIBatteryManager.kext https://bitbucket.org/RehabMan/os-x-acpi-battery-driver

- BrcmFirmwareRepo.kext (only if you replaced Wi-Fi module with a supported Broadcom one) https://bitbucket.org/RehabMan/os-x-brcmpatchram

- BrcmPatchRAM2.kext (only if you replaced Wi-Fi module with a supported Broadcom one) https://bitbucket.org/RehabMan/os-x-brcmpatchram

- FakeSMC.kext https://bitbucket.org/RehabMan/os-x-fakesmc-kozlek

- FakePCIID.kext + FakePCIID_Broadcom_WiFi.kext (only if you replaced Wi-Fi module with a supported Broadcom one) https://bitbucket.org/RehabMan/os-x-fake-pci-id/downloads/

- Lilu.kext https://github.com/acidanthera/Lilu/releases

- RealtekRTL8100.kext https://github.com/Mieze/RealtekRTL8100 (source)

- USBInjectAll.kext https://bitbucket.org/RehabMan/os-x-usb-inject-all/downloads/

- VoodooPS2Controller.kext https://bitbucket.org/RehabMan/os-x-voodoo-ps2-controller/

- WhateverGreen.kext https://github.com/acidanthera/WhateverGreen/releases

Note: these Kexts can also be placed in EFI -> Clover -> Kexts -> 10.14 but /Library/Extensions/ is the preferred location


7. Patching DSDT/SSDTs


Follow Rehabman’s Guide [Guide] Patching LAPTOP DSDT/SSDTs

Summary DSDT/SSDTs Patching

Use Patchmatic method to Extract DSDT/SSDT or press F4 at Clover Bootloader to Extract ACPI Tables to EFI/Clover/ACPI/origin/

- Build the latest iasl from github or get pre-build binary form https://bitbucket.org/RehabMan/acpica/downloads/

- Disassemble with refs.txt

- with Bios F.84 I had 1 error in DSDT.aml fixed by commenting (// sign) External MDBG line



- 3 more errors (same solution for all three) in SSDT with Dedicated GPU fixed by changing PCAP to Package {PCAP}


ACPI patches
Code:
"Rename GFX0 to IGPU"

"Rename B0D3 to HDAU"

"Rename _DSM to XDSM"

"Rename _OSI to XOSI" -> SSDT-XOSI.aml required for this patch to work, check the attached .zip
both combined are equivalent to "OS Check Fix" DSDT patch

"Rename EHC1 to EH01"

"Rename EHC2 to EH02"
ACPI Fixes
Code:
-AddDTGP
-FixIPIC
-FixHDA
-FixSMBUS
-FixHPET
-FakeLPC
-FixRTC
-FixTMR
-AddIMEI
-FixWAK
-FixMutex
-DeleteUnused
- apply "Battery HP G6 2221ss" Patch to DSDT.dsl save it because it needs two more patches then you can compile the .aml

Note: n012tx battery patch also works for me, but G6 2221ss is preferred, for some Sky Lake pavilion (tested myself on AU003TX)
Code:
 into method label INIT parent_label ACEL replace_content begin // code removed\n end;
- uncomment this code, else battery would show but remain stuck unless the EC memory resets and it remains stuck in other OS (windows/Linux) very frustrating.


8. Brightness Fix

[Guide] Laptop backlight control using AppleBacklightInjector.kext
- IntelBacklight.kext and ACPIBacklight.kext were broken by the 10.12.4 update.

To use this technique requires three components:
- SSDT-PNLF.aml in ACPI/patched
- AppleBacklight patch in config.plist/KernelAndKextPatches/KextsToPatch
- AppleBacklightInjector.kext installed to /L/E

- Copy the SSDT-PNLF.aml from Clover.zip (EFI/Clover/ACPI/Patched/SSDT-PNLF.aml). If you're using SortedOrder in your config.plist, make sure you add SSDT-PNLF.aml to it. Also, it must be loaded *after* the OEM SSDTs. check my attached config.plist for reference

- Add the patch marked with comment "change F%uT%04x to F%uTxxxx in AppleBacklightInjector.kext (credit RehabMan)" from config.plist(Clover.zip (EFI/Clover/config.plist) to your own config.plist at EFI/Clover/config.plist. Use a plist editor such as Xcode or PlistEdit Pro to copy/paste. DO NOT use Clover Configurator.

- Install AppleBacklightInjector.kext to /L/E:
Code:
sudo cp -R ~/Projects/probook.git/kexts/AppleBacklightInjector.kext /Library/Extensions
- And since after doing all these tasks it will be the first time you are loading AppleBacklight.kext, and this fix involves a Clover hotpatch, you will likely not have it working on first reboot. So right after booting with all components in place, rebuild cache:

Code:
sudo kextcache -I /
- Then reboot.


9. Brightness Keys


Apply this patch to DSDT.aml [Guide] Patching DSDT/SSDT for LAPTOP backlight control

Code:
into method label _Q10 replace_content
begin
// Brightness Down\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0405)\n
end;
into method label _Q11 replace_content
begin
// Brightness Up\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0406)\n
end;

10. Disable Nvidia GT 940M

[Guide] Disabling discrete graphics in dual-GPU laptops

Remember the goal? Call _OFF from _INI...

Apply this patch to SSDT with Discrete Graphics

Code:
into method label _INI parent_label \_SB.PCI0.RP05.PXSX insert
begin
//added to turn nvidia\n
External(\_SB.PCI0.RP05.PXSX._OFF, MethodObj)\n
_OFF()\n
end;
Apply this patch to DSDT

Code:
into method label _REG parent_hid PNP0C09 insert
begin
//added to turn nvidia\n
If (LAnd(LEqual(Arg0,3),LEqual(Arg1,1)))\n
{\n
    External(\_SB.PCI0.RP05.PXSX._OFF, MethodObj)\n
    \_SB.PCI0.RP05.PXSX._OFF()\n
}\n
end;
compile .aml's for DSDT & SSDT and place in EFI -> Clover -> ACPI -> Patched along with SSDT-PNLF.aml and SSDT-XOSI.aml


11. SSDT.aml Creation


This is the last file we need to create to ensure proper CPU power management and turbo mode. This part refers to
[Guide] Native Power Management for Laptops.

- set config.plist/ACPI/SSDT/Generate/GenerateCStates=No

- set config.plist/ACPI/SSDT/Generate/GeneratePStates=No

- set config.plist/ACPI/SSDT/DropOEM=No

- set config.plist/ACPI/SSDT/Generate/PluginType=true

- set config.plist/ACPI/AutoMerge=true


12. Clover Bios setup

before I used the rename trick of bootmgfw.efi to bootmgfw-orig.efi and then place CLOVERX64.efi renamed to bootmgfw.efi
but after each windows update I had to again rename it. and recently windows started replacing it at each boot. so I came up with this thick:
I copied the BOOTX64.efi form EFI->Boot, created folder named ubuntu inside EFI folder and placed BOOTX64.efi in EFI->ubuntu then renamed BOOTX64.efi to grubx64.efi.
for those who already have ubuntu installed name that folder to something else (naming it to Android worked for me too).
and in Bios move ubuntu to top of boot order

you can extract ubuntu.zip inside EFI folder instead of messing with files.


13. Credits

RehabMan
Mirone
Mieze
Note that AutoMerge=true is broken in sourceforge Clover, such that your patched SSDT-10 will not be handled correctly (regarding ACPI/DSDT/Patches).

You should use the RehabMan Clover...
https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/


Eventually, my fix (I already submitted it) for it will be folded into main Clover, but that hasn't happened yet, so...
 
Joined
May 10, 2012
Messages
55
Motherboard
HP Pavilion 15-AB216TX
CPU
i5-5200U
Graphics
HD 5500
Mobile Phone
Android
I am using your Clover, LoL

edit: can you check my extra Framebuffer port disable patch, its working fine (don't see any lag at login screen)
but before I used the Kext and Kernel patching, but now I tried it with WhateverGreen. should I just use my old patches again with WhateverGreen's find/replace methods?

do you need problem reporting files for that?
 
Last edited:
Joined
May 10, 2012
Messages
55
Motherboard
HP Pavilion 15-AB216TX
CPU
i5-5200U
Graphics
HD 5500
Mobile Phone
Android
truth is i copy -> pasted most of the content form my other post and didn't knew that sourceforge clover doesn't work with AutoMerge. so thanks for the info and take your time and let me know if i messed up somewhere else too.
 
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,075
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
truth is i copy -> pasted most of the content form my other post and didn't knew that sourceforge clover doesn't work with AutoMerge. so thanks for the info and take your time and let me know if i messed up somewhere else too.
I didn't review everything... when I skimmed your post that one just kind of jumped out at me.
 
Joined
Oct 10, 2018
Messages
5
Motherboard
HP 80A9
CPU
i7-6700HQ
Graphics
GTX 950M
Mobile Phone
Other
Hey i just need clarification on this step

"- Mount EFI Partition, replace config.plist."

btw, great work!
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,075
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
yeah... i already mounted... my problem is the "replace the config.plist". it didn't say which config.plist to put in place of the existing config.plist
My guess would be the config.plist inside the CLOVER.zip attached to post #1.
 
Top