Contribute
Register

HP ZBOOK G5 17

@levanlong,

I have the same ZBook model, 17 g5, like you.

Do you can share on forum your last clover EFI folder ?

Many many thanks !!!
 
Everything in the list working on Mojave, Catalina, Big Sur and Monterey, dual GPU!!
** Updated to OC 6.9

# Specs
- CPU: Mobile HexaCore Intel Core i7-8750H, 2200 MHz
- Motherboard Hewlett-Packard HP ZBook 17 G5
- Motherboard Chipset: Intel Cannon Lake
- iGPU: Intel(R) UHD Graphics 630
- dGPU: AMD WX-4170
- Audio Adapter: Connexant CX-8400
- Thunderbolt 3 Titan Ridge 4C 2018
- WiFi: Intel(R) Dual Band Wireless-AC 9560 Jefferson Peak
- Ethernet: Intel(R) Ethernet Connection I219-LM
- RTS525A Realtek Express SDCard Reader

# Working
- AMD WX-4170 DGPU 4GB VRAM
- UHD630 with 1536MB VRAM - (2048MB in UMA mode)
- CPU, GPU and WX-4170 Power Managment
- Brightness controls (mapped to f3 and f4)
- Thunderbolt3 / USB type C data and video @4K + AppleVTD
- HDMI and Mini-DVI video @4K
- USB type A ports (2.0 & 3.0)
- Native NVRAM
- Audio - internal mic, speakers, headphone jack (+sense) and HDMI on all video outputs
- Intel Bluetooth, able to toggle on/off
- I2C ALPS trackpad w/2 button support and 5 finger gestures
- PS2 keyboard w/SSDT Brightness/Volume keys re-mapping
- Battery management
- intel WiFi up to 300mb/s
- Fan Sensors (left and right)
- Webcam
- SD Card Reader
- Gigabit Ethernet
- Sleep
- Full DRM in discrete mode (and in external displays in hybrid mode)
- File Vault

You need to download and add the Resources folder from https://dortania.github.io/OpenCore-Post-Install/cosmetic/gui.html

Then select a config.plist based on your setup and then you need to add your info for:
PlatformInfo/Generic/MLB
PlatformInfo/Generic/SystemSerialNumber
PlatformInfo/Generic/SystemUUID

-When you're done, rename it: config.plist

** WX-4170 GPU now works in Catalina/Big Sur and Monterey thanks to @EdwardGeo!! For these OS versions we need to use Hybrid config or Hybrid+Mux which is the new mode that has everything that Discrete mode plus IGPU for Intel quicksync.. (Discrete mode will stall in Catalina+ because our Bios injects it's enbedded rom which is not compatible) Will also work in UMA config.
** - Will need to flash the attached rom to your card.

* To control wifi you need to download HeliPort or you can switch to AirportItlwm (https://github.com/OpenIntelWireless)
* For DRM fixes follow this post: https://www.tonymacx86.com/threads/hp-zbook-g5-17.266012/post-2200447 or use shikigva

* I included SSDT-xNVME.aml which I use to completely disable my windows NVME drive that is not compatible with OSX and causes kernel panics if mounted read/write and also randomly at boot. I find it's more reliable than just not mounting the volume editing fstab. It needs to be enabled in the ACPI section in config.plist and adjusted to your non-compatible NVME drive path.

* Trackpad needs "Force Click" OFF in System Settings to work properly.

ACPI DMAC and DMAR tables have been updated in OC-VTD version to allow AppleVTD to load and have better Thunderbolt 3 support for devices like Apple's thunderbolt to ethernet adapter and (not tested yet) some audio interfaces.
** Bios VT-d option needs to be enabled for this feature.

Added a new low power UMA config that disables and powers OFF the (unsupported) DGPU on boot, so no more need to switch Bios mode, only IGPU will be enabled and the output mux is switched to IGPU.

Also for Thunderbolt 3 with most current HP firmware flashed, there's a Bios glitch that doesn't allow us to select "No Security" as an option. To fix it, you need to switch Thunderbolt to "Legacy Mode" in Bios/Advanced/Ports. then reboot, then go back to Bios/Advanced/Ports and under Thunderbolt security the option -No Security- appears, select it and reboot.
Now go back to Bios Setup again, and in Bios/Advanced/Ports/Thunderbolt, switch the "Legacy" option back to "Native+Low power"
You now have working TB3 ports with hot plug across all OS's

Notes:

HDMI audio should now work on external displays if using UMA mode. (Only one external video outputs will work in UMA mode if MXM card slot is populated when laptop is started with lid closed)
WX-4170 GPU needs to be flashed with the attached rom to work on Catalina / Big Sur / Monterey.

**For audio in Big Sur / Monterey you need to disable SIP and install VoodooHDA in S/L/E and rebuild kext cache.
**Bluetooth doesn't work in Monterey, need to deactivate the kext in config in order to boot.

Modified Kexts:
-CPUFriendDataProvider is specific to my CPU, will need to be modified if you have a different CPU.
-VoodooHDA info.plist is modified to only attach to the Connexant CX8400 Codec and leave the iGPU and dGPU codecs to AppleALC for HDMI hotplug function. It is also modified to automatically switch from speaker to headphone on plug insertion.
-PolarisZBook_WX4170 is custom plist kext to inject power play tables and device properties to the AMD Video driver for better power management.
-SMCSuperIO is custom built to include generic EC controller for fan support (now included in release)
-VoodooI2CHID is custom built to add 2 button support

Also attached is the VBios Rom I'm using for Mojave/Catalina since my WX-4170 MXM card came with an empty EEPROM.

--------------
*Config Discrete (IGPU=OFF, only compatible with supported MXM card and only High Sierra or Mojave)
*Config Hybrid (Both GPU's on, IGPU=LCD, DGPU external screens) Support up to Monterey w/compatible DGPU
*Config Hybrid Mux (Both GPU's on, IGPU=empty framebuffer, DGPU all screens) Same as Discrete mode but with IGPU Quicksync. Support up to Monterey w/compatible DGPU
*Config UMA (DGPU OFF, IGPU=LCD) (no need to switch Bios config, patches turn off DGPU)
--------------


Updated RealtekPCIe Card Reader now full speed native kext
Updated WX-4170 rom now working all MacOS versions since High Sierra!
Updated wifi kext to a more recent build
Updated DMAR and DMAC for TB3 VTD support.
Updated configs with Mux and DGPU power control, added Bluetoolfixup for Monterey.
 

Attachments

  • Custom4170Aomorhid-Catalina+.rom.zip
    120.1 KB · Views: 132
  • ZBOOK15_G3+G4_WX4150_NEBULA_VBIOS.rom.zip
    120.3 KB · Views: 167
  • OC.zip
    28.7 MB · Views: 419
Last edited:
-AppleIntelWifi tested and works with custom kext built for mojave but speed is not great, so going to wait a bit for a better release and in the meantime keep using my wifi dongle

Oh, hey, that's neat! I must have overlooked this before. Pity the project doesn't support WiFi 6 (802.11ax) cards like the 'Intel Dual Band Wi-Fi 6 AX200 (2x2) and Bluetooth 5 combo, vPro' I've got on my G6; otherwise, I might use this. I'll probably stick to the Broadcom card I bought second-hand and see if I can't get AirDrop, Continuity, and/or Handoff working anyway, though.
 
The Broadcom card should work nicely, I used one on my Zbook G2 (getting the antennas and adapter crammed in there was the trick) but functionally it's 100% perfect, actually the G2 hackintoshes so perfectly that it got me into trying my G5, which has proven a lot more work, but slowly getting there.
 
For anybody with the same machine, here's my update:

I purchased a WX4170 card on eBay and I got lucky and it included the EEprom chip (apparently there's at least 2 different versions of the card and one does not include the eeprom or the resistor network to make it work.)
Having said that, mine came with an empty ROM and getting a clean unmodified WX 4170 image has been tricky.

(also needed to dremel the heatsink a bit as the layout of some components were a bit off and also added thin copper plates to both CPU and GPU to make them both make good contact with the Heatsink)

I did however get my hand on a modified 4130/4150 that I flashed using atiflash for windows and the card came to life on OSX. The performance was not there, and also the outputs were wrong and not being detected, so I searched and found a WX 4170 Rom that had been modified with Mac UEFI data and it was overclocked. I edited the ROM back to stock speed, and flashed it to my card, and Success!

All outputs are detected, no problems in Windows/Linux, and it mostly works on OSX with some problems.

Here's the details of my tests.

If Bios is set to Hybrid:
I can get almost everything working perfectly, performance is ok, but not 100% of what the card can do. I tested it with geekbench5 and Davinci Resolve without any external monitors, and it is using the GPU acceleration.
If I connect an external display and run Unigine Valley, it runs off the WX card and performance is about 85% of the card's performance in Windows/Linux.
Sleep and screen off work nicely, and the IGPU is working great as well.
Zero screen glitches or problems.
HDMI Audio works with a workaround, more on that later.
I tried different SMBIOS but the results didn't change, I also tried faking the device-id but again same results.
What's the problem then?
No DRM on internal screen. None! I've tried so many combinations of SMbios, device-id's, shiki flags, etc... and nothing. Can't get DRM to work on internal display. Just refuses to work. (external sceen plugged to GPU has hardware DRM working)
Other big problem is... THIS BIOS SETTING ONLY WORKS ON HS/MOJAVE!!!!
(I haven't been able to make it work on Catalina, I can only get Catalina to boot and it works perfectly in IGPU only mode, but neither Hybrid nor Dedicated graphics mode works)
Boot stalls after IGPU starts accel, screen brightness adjusts, and then progress bar stalls. alternatively it changes to a black screen but the OS is not finished loading. My guess is that the ATI drivers are not starting and I figure the problem could be the incorrect UEFI data in the video ROM.
Catalina boots if I use flag -radvesa, so it's definitely the ATI drivers.
I tried the bios in legacy mode (CSM=OFF) to avoid using UEFI drivers, and still no go. Catalina doesn't like my WX 4170 ROM or any device id I spoof it to.

Bios in Dedicated Graphics mode:
Catalina = no go. Black Screen.
Mojave = Almost the same as with Hybrid, but now DRM works on internal display, and the GPU performance is on par with Windows and Linux, but there's some problems.
If an external monitor is connected or the internal screen goes to sleep, when internal screen comes back, it is digital noise. just colorful snow, and changing resolution/refresh rate, edid, etc... changes nothing. My guess is it may have to do with the mac ATI driver and how it detects the internal screen and/or the mux chip specific to this laptop may be interfering with this communication/retraining.
External screens have no problems and everything works ok.
If computer goes to sleep, the internal display comes back blinking, and turning it off and on 3 times fixes it, and the 4th time it goes to snow again. (which can be fixed by going to sleep, then repeating the on-off cycle with a short press of the power button) Very annoying and a deal breaker for me.

Bios in UMA (IGPU Only)
As stated in my previous post, almost everything works, but no DRM, no HDMI audio with VoodoHDA, or alternatively you can have HDMI audio, but glitchy speaker out with my custom AppleALC.

Now for HDMI Audio on Hybrid mode,
Since the Conexant Audio codec (at least in my machine) seems to have a problem working with Apple ALC and the speaker output is intermittent, and HDMI audio out didn't work with VoodooHDA, I did a workaround using AppleALC for HDMI injection to the GPU ports, and VoodooHDA for the Conexant internal codec by changing the info.plist on voodoo so it would only connect to the internal codec, and using the alcid flag pointing to a codec that doesn't work, so it would only connect to the HDMI codec on the ATI card.
And it works!
I get VoodooHDA audio for speaker/headphone/mic, and AppleALC for video outs through the WX 4170 card.

It is still a work in progress to try to get 100% out of the card in hybrid mode and DRM to work on the internal screen, as well as Catalina support.

Attached My OC folder with 3 options for config.plist
My WX-4170 Rom is included in a custom Radeon De-init.aml SSDT file (have to enable in config.plist ACPI section to use it if your card is unflashed)
Need to add your own serial#'s


Current EFI - https://www.tonymacx86.com/threads/hp-zbook-g5-17.266012/post-2158182
 

Attachments

  • Cinebench GPU.png
    Cinebench GPU.png
    81.7 KB · Views: 125
Last edited:
hugodlc: You — are — AWESOME!!! This should help me a lot! I have downloaded a copy of the OpenCore configuration you attached and will take a look at it later. (Quick question, though: how can I tell if my WX 4170 is good and has its EEPROM and accompanying resistors?)
 
Lots of scattered info in this thread: https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-27485731

But since I managed to fake my GPU and load my 4170 ROM from my modified Radeon-Deinit SSDT, it may work for you regardless of whether your card has the EEPROM or not. OSX loads it directly from the SSDT, ignoring the card's ROM.

On another note though, can you boot windows and get GPUZ from Techpowerup and see if your card has a ROM and if you can extract it. As having a clean unmodified 4170 MXM rom would be priceless.

The ROM I managed to find doesn't have all the memory speeds and it has some iMac UEFI stuff on it that may be messing with the Catalina boot.
My card came with a blank EEPROM, so I had to source it from other forums, and I can't extract my VROM from my bios as it appears to be encrypted.

There's another way to extract the VROM from the windows registry, but that only works if you haven't flashed your card and the ROM is downloaded straight from the BIOS to Windows, so in my case I can't do that anymore.


Maybe you can try that and get us both a working vanilla 4170 mxm VROM.
 
I did more tests with the WX4170, and my conclusions are:

Apple's Baffin Polaris drivers, especially Open GL are not the best, and give about 95% of the performance of windows or linux OpenGL drivers (which is not terrible)

When used in Hybrid mode alongside the IGPU, performance drops another 15% approximately (vs GPU only mode), but since the GPU helps with other tasks and the tandem seems to be rock solid, it more than makes up for it.

My Thunderbolt3 (USB-C) to HDMI connector sometimes works, and sometimes doesn't, so it may be a bad cable or the connector/driver may be glitchy for that port. but mini DVI and HDMI outs are solid. (haven't tested in 4k display yet)

For Catalina we absolutely need a signed unaltered WX-4170 VBIOS, as it looks like Catalina also uses the uefi data from the ROM and if it is unsigned, it ignores it, but the driver will not start and the OS will stall.
I have a clean WX-4150 VBIOS with unaltered UEFI that is signed, but unfortunately has the wrong connector/ram clock/TDP information for our 4170's, and it boots Catalina, but performance is poor, you can't switch the laptop to GPU only or you have to take the card out and reset bios (as you get no display out). I tried injecting just the old ROM portion of that VBIOS using the SSDT method, but no luck. Catalina must be using the UEFI part as well, and if it is unsigned, it's a no go.
Catalina works in IGPU only perfectly.

I tried to modify that 4150 ROM by changing the wrong settings, and I also tried adding the 4150 UEFI GOP to the 4170 ROM, and tried to get them re-signed using GOPUpd, but failed and I believe it's best to just get a clean ROM anyways. (https://www.win-raid.com/t892f16-AMD-and-Nvidia-GOP-update-No-requests-DIY.html)

In the meantime I think I'm 95% there with this laptop.
Only missing items I need some help with are:
-Fix DRM for internal display. (External screens work)
-Get Clean WX4170 VBIOS ROM (I believe this will solve many issues)
-Add trackpad buttons to VoodooInput
-IntelWifi (works and is stable but need more speed)
-Bluetooth (works but is still a bit buggy reconecting to devices)
-Create a SSDT using the ii0 ambient light sensor to add a ALSD device for automatic brightness.

They are really small cosmetic things now.

Attached is the ROM I'm using in case anyone needs to flash a WX-4170 Card with an empty ROM.
As I've stated before it's not perfect, but it works on a Zbook G5 17 as the UEFI portion gets injected for windows and inux, and OSX uses only the old ROM if using Mojave or earlier OS.

(Note, to install High Sierra, I had to run the installer and security update in a different computer, and then moved the HDD to the Zbook. I just couldn't find a working SMbios/CoffeeLake combo. but once installed everything works)
 

Attachments

  • WX4170-Okish.rom.zip
    107.6 KB · Views: 97
Last edited:
hugodlc:

Might the card's video BIOS possibly be included in the 'Radeon™ Pro Software for Enterprise on HP Mobile' package whose installer is available for download from AMD here (after clicking to expand the disclosure group relevant to the OS you have installed,) by any chance? (The package's name leaves me doubtful of that being the case, but the through crossed my mind…)
 
Last edited:
hugodlc:

Might the card's video BIOS possibly be included in the 'Radeon™ Pro Software for Enterprise on HP Mobile' package whose installer is available for download from AMD here (after clicking to expand the disclosure group relevant to the OS you have installed,) by any chance? (The package's name leaves me doubtful of that being the case, but the through crossed my mind…)

I couldn't find any VBIOS in either one of those installers.

Also just an update on my tests. I think there's a problem with the dual GPU config.
I'm not sure what configuration is used on Macbooks with dual GPU regarding which GPU drives which display, but in my Zbook, when in Hybrid mode, the GPU can't run the internal display (unless through the IGPU using switchable graphics which won't work on Mac) and the IGPU is connected directly, so I can't use an empty framebuffer to force the WX4170 to drive the internal while keeping the IGPU for h264 and other hardware acceleration things.

But in GPU only mode, the IGPU is completely disabled so can't use it in tandem.

I think it is a catch with these machines. It appears they have multiplexing capabilities which is awesome, so you can use different modes, but they have default settings that have no easy solution.

UMA mode
Internal and external ports connected to IGPU and DGPU is turned off entirely (doesn't even generate heat)

Hybrid mode
Internal display connected to IGPU
External displays connected to DGPU
DGPU connected to internal display using switchable graphics to IGPU, so direct draw works on Windows/Linux, but not on Mac.

Dedicated GPU mode
Internal and external ports connected to DGPU, but it looks like the IGPU is not present, can't see it, so even if there was a headless framebuffer/tweak/combination, I don't think it will be enabled.
My screen still becomes noise when it turns off.

That said, I'm using Hybrid mode and I've managed to force use of the DGPU for h264 encoding and decoding, and other tasks, but unfortunately not all the openGL as I would like. (edit see following posts for possible workaround)
What I did was use shikigva=80 in open core config

For h264 encoding and decoding , follow this guide: https://forums.macrumors.com/threads/activate-amd-hardware-acceleration.2180095/page-9#post-27442938

I changed the hex values from the guide to match my SMBIOS platform Mac-827FB448E656EC26 - (38 32 37 46 42 34 34 38 45 36 35 36 45 43 32 36 - using ascii to hex calculator)
And also merged some items on the Resources info.plist

Screen Shot 2020-11-24 at 10.05.47 PM.png


I also added the following commands:

defaults write com.apple.AppleGVA gvaForceAMDHEVCDecode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDKE -bool YES
defaults write com.apple.AppleGVA forceATI -bool YES

And now hardware encoding and decoding work really smooth, way faster than with shikigva. Removed that opencore boot flag and it seems to be better overall. (still no DRM or openGL though)

What this does is create the file com.apple.AppleGVA.plist in user/library/preferences
and together with the shikigva flag in opencore, forces some things on the 4170 GPU.
To test you can open Quicktime and do a screen recording and monitor using activity monitor and you should see the Radeon Polaris being used for recording and also if you export resizing, the polaris GPU is used.
This didn't work for Handbrake though. I can now use polaris DGPU for harware encoding using apps that use the VideoToolbox. Also have zero glitches on playback or export with Davinci Resolve and a big improvement in performance. Finalcut Pro works like a dream, it uses the Polaris GPU for a lot of stuff and I see it also uses the IGPU for other stuff, and overall it is silky smooth.
Guess shikigva could have been the one causing some performance glitches.

Also tested using external monitor and swaping the main display to the external to run some benchmarks and openGL apps and they work, but not at 100% the speed/performance I saw when using DGPU only.
So it looks like the combo actually slows down the 4170...

Hybrid without shiki:
polaris - cinebench - hybrid.png

Much better (85.77 fps) as you can see from previous result (61.65fps) and the UHD can only do (29.86fps), so a big improvement!

GPU only:
Cinebench GPU.png

This benchmark was with a different VBIOS that was not very stable, but I show it as an example that Dedicated mode is faster, and it is the closest to windows performance and I guess the max the WX-4170 can do.

---

DRM works on external displays but not on internal.
And I doubt DRM will ever work on internal display, since the one doing the drawing is the IGPU, even if the decoding is being done by the polaris card, and because the IGPU doesn't have the Apple special sauce, it's most likely never going to happen.

It looks like to force all metal or opengl on the polaris card, I need to somehow convince gfxCardStatus app that this is a dual GPU Macbook Pro. (possible solution found on following posts)

Brightness adjustment steps seem less responsive if the WX4170 is used. If I use the quadro card or IGPU only, brightness steps are better matched to the display. Fixed in following posts

USB-C/Thunderbolt display out doesn't work with my USBC-HDMI adaptor (also on windows) so it could just be an incompatibility with the WX4170 and my USBC-HDMI adaptor.
It works with the Quadro card and in UDMA mode, so it's not the output or the adapter, but rather the combo using the WX card. <- Update... It is the VBIOS, I flashed a knowingly wrong bios to test, and the Zbook EFI took over and it was as if the MXM card had a blank EEPROM, and Windows settings kicked in and everything was recognized as WX-4170, all outputs/TDP/Voltages,etc... correct. So to get 100% functionality with this card we need the correct VBIOS. (couldn't extract it from the registry though, so went back to our "mostly working" version, as the automatic EFI one would not get injected on OSX and therefore will not work)

After today's success with hardware encode/decode, I'll try to fix the brightness steps and keep the polaris in the laptop a bit longer
I'm starting to think that dual GPU on these laptops using OSX may not be the best option. UDMA works really well for most things, and for me, using Windows/Linux, I prefer the Quadro card I have that is 300% faster than the 4170, but this is promising. Hopefully we can get a 100% dual GPU laptop.

My next tests will be to try to find a way to inject the VBIOS from the Quadro card and see if I can use webdrivers on High Sierra. But this is also not simple since the Nvidia card doesn't have a EEPROM chip, so I would need to flash one and solder it on, or try to software load the VBIOS using an SSDT, or some other method.
And then I'm not sure the webdrivers will work with the card.


Also almost forgot, if the laptop wakes from sleep and then you plug a display, it may reboot (sporadic). This never happens if the computer hasn't sleept, or if the display was there before sleep.
It looks like the hotplug reboot problem with IGPU's but don't know where to go to fix on the WX.

@RandomDSdevel
Any luck with your system?
 
Last edited:
Back
Top