Contribute
Register

HP ZBOOK G5 17

Joined
Jun 13, 2016
Messages
119
Motherboard
HP Elitebook 840 G1
CPU
i5-4310U
Graphics
HD 4400, 1600x900
Mobile Phone
  1. Android
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.

UDMA 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.

GPU mode
Internal and external ports connected to DGPU, but it looks like the IGPU is ignored for computation only. Maybe there's a empty framebuffer/tweak/combination I'm missing that will enable this.
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.
What I did was use shikigva=80 in open core config
Follow this: https://forums.macrumors.com/threads/activate-amd-hardware-acceleration.2180095/page-9#post-27442938

Changing the hex values from the post to match my SMBIOS platform Mac-827FB448E656EC26 - (38 32 37 46 42 34 34 38 45 36 35 36 45 43 32 36)
And merged some items on the Resources info.plist

View attachment 498217

and 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.
Guess shikigva could have been the one causing these 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:
View attachment 498303
Much better as you can see from previous result.

GPU only:
View attachment 498219

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.

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. This could be an easy fix.

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.

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?


Hello i am following this very interesting thread, sadly i have a 15 inch zbook with nvidia gpu on the motherboard, but i wanted to give some hints; on some bioses it is possible to use the efi shell to modify hidden parameters and force the igpu on in dedicated mode, like on dell m4700 , as found on the github https://github.com/1Revenger1/Dell-M4700-MacOS-Resources

"

Enabling iGPU​


If Optimus is set to "Disabled" or you are otherwise forced to use the dGPU - it is possible to enable the iGPU to use headless for airPlay and h.264 encoding using the below instructions:


// TODO: General idea below, flesh out below and add screenshots possibly?


  1. Download the exe to update the BIOS from Dell's website
  2. Extract bios with binwalker binwalk -e whatever.exe
  3. Use pfsextractor on the uncompressed output
  4. Use UEFITools to find the Setup section and extract the body of that Image.
  5. Use IFRExtractor on the extracted image. You should get a text file output.
  6. Look for settings to enable the iGPU.
  7. Use setup_var to change

    "
 
Joined
Jul 21, 2011
Messages
41
Motherboard
Zbook G5 17"
CPU
i7
Graphics
AMD WX-4170
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
Hello i am following this very interesting thread, sadly i have a 15 inch zbook with nvidia gpu on the motherboard, but i wanted to give some hints; on some bioses it is possible to use the efi shell to modify hidden parameters and force the igpu on in dedicated mode, like on dell m4700 , as found on the github https://github.com/1Revenger1/Dell-M4700-MacOS-Resources

"

Enabling iGPU​


If Optimus is set to "Disabled" or you are otherwise forced to use the dGPU - it is possible to enable the iGPU to use headless for airPlay and h.264 encoding using the below instructions:


// TODO: General idea below, flesh out below and add screenshots possibly?


  1. Download the exe to update the BIOS from Dell's website
  2. Extract bios with binwalker binwalk -e whatever.exe
  3. Use pfsextractor on the uncompressed output
  4. Use UEFITools to find the Setup section and extract the body of that Image.
  5. Use IFRExtractor on the extracted image. You should get a text file output.
  6. Look for settings to enable the iGPU.
  7. Use setup_var to change

    "

Thanks for the tips, the problem I'm having on DGPU mode is that qhen the screen sleeps or turns off briefly, it doesn't come back, it is just digital snow. I can VNC into the laptop and still control everything, but the unresponsive screen is a big dealbreaker for me. I tried a lot of options but none worked and it was driving me nuts, plus It felt like I could damage the screen.
That's the reason I abandoned DGPU mode.

Benchmarks are slightly better but not by a lot, and yes DRM works and the Polaris card can do all the h264 encoding and decoding, but all is moot if the screen becomes snow every time it turns off.

I'll try to use that method to extract the VBIOS, maybe we get lucky.

The link also has an interesting setting for brightness range fix, I'll give it a try.

<key>applbkl</key>
<data>AQAAAA==</data>
<key>applbkl-name</key>
<data>RjE0VHh4eHgA</data>
<key>applbkl-data</key>
<data>ABEAAAAEAAsAEAAUABoAIwArADQAPwBOAGIAeQCUALUA2gD/</data>

Works like a charm!!!
Brightness range is perfect now.

Cheers
 
Last edited:
Joined
Jul 21, 2011
Messages
41
Motherboard
Zbook G5 17"
CPU
i7
Graphics
AMD WX-4170
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
Finally gave up on the WX4170 card, it is nice, but too slow for my windows needs, so I went back to the Quadro P5200 I had.

CINEBENCH_Windows_64_Bit_TYcsvgbL7C.png
Big Difference!

polaris opencl.png


firefox_8irFHwyHrJ.png


The P5200 should work with nvidia webdrivers on High Sierra, but I need a way to inject / load the vbios from a file / SSDT, as the MXM card doesn't have a EEPROM chip. Just faking all the NVCAP and IOREG info doesn't work.

I tried using the same SSDT I use for Radeon VBios inject, changing the variable name to vbios, but no luck, the SSDT injects the variable and it shows up in IOREG, but the webdriver doesn't get it. So no accel yet.
I also tried turning Off the GPU on OSX using a SSDT, but found that if I disable the PEG0 device, then the external video outs from the IGPU don't work, Soooo easier to just switch to UMA mode for OSX, and back to Auto for Win/Linux on the Bios.

In my Polaris tests I also tried playing around with adding GMUX and GPUC devices in SSDT's but I couldn't make the Mux switch switch from one GPU to the other without a KP. and piping through IGPU we know doesn't work.
Also tried adding a ALS0 device since the Zbook has the LHIH and LLOW variables for the ambient light sensor, but I guess I still need to make a link from the actual ii2c light sensor and the variables for it to work.
 
Last edited:
Joined
Jun 13, 2016
Messages
119
Motherboard
HP Elitebook 840 G1
CPU
i5-4310U
Graphics
HD 4400, 1600x900
Mobile Phone
  1. Android
Finally gave up on the WX4170 card, it is nice, but too slow for my windows needs, so I went back to the Quadro P5200 I had.

View attachment 499594 Big Difference!

View attachment 499595

View attachment 499596

The P5200 should work with nvidia webdrivers on High Sierra, but I need a way to inject / load the vbios from a file / SSDT, as the MXM card doesn't have a EEPROM chip. Just faking all the NVCAP and IOREG info doesn't work.

I tried using the same SSDT I use for Radeon VBios inject, changing the variable name to vbios, but no luck, the SSDT injects the variable and it shows up in IOREG, but the webdriver doesn't get it. So no accel yet.
I also tried turning Off the GPU on OSX using a SSDT, but found that if I disable the PEG0 device, then the external video outs from the IGPU don't work, Soooo easier to just switch to UMA mode for OSX, and back to Auto for Win/Linux on the Bios.

In my Polaris tests I also tried playing around with adding GMUX and GPUC devices in SSDT's but I couldn't make the Mux switch switch from one GPU to the other without a KP. and piping through IGPU we know doesn't work.
Also tried adding a ALS0 device since the Zbook has the LHIH and LLOW variables for the ambient light sensor, but I guess I still need to make a link from the actual ii2c light sensor and the variables for it to work.

Yes, many people think that the issue with using dGpus on laptops is only Optimus, but really it's mostly a vbios loading issue. I have a very nice ROG lap with 670mx (kepler) and thudnerbolt working but no video acceleration and i tried many ways to load the vbios with clover without success.
Could you share your current efi folder ? Writing from my Zbook g5 :D
 
Joined
Jul 21, 2011
Messages
41
Motherboard
Zbook G5 17"
CPU
i7
Graphics
AMD WX-4170
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
Yes, many people think that the issue with using dGpus on laptops is only Optimus, but really it's mostly a vbios loading issue. I have a very nice ROG lap with 670mx (kepler) and thudnerbolt working but no video acceleration and i tried many ways to load the vbios with clover without success.
Could you share your current efi folder ? Writing from my Zbook g5 :D
Sure, here it is, you need to download the Open Canopy Resources https://github.com/acidanthera/OcBinaryData

Guide:

The default config is UMA mode. You'll also need GenSMBIOS to generate a unique serial number.
 

Attachments

  • EFI.zip
    12.9 MB · Views: 39
Joined
Jul 21, 2011
Messages
41
Motherboard
Zbook G5 17"
CPU
i7
Graphics
AMD WX-4170
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
I just had an idea that may work for enabling full OpenGL/Metal HW accel on the polaris card while in Hybrid mode.

The problem is like this.
As I understand it, on dual GPU Macbook Pro's The DGPU is the primary display adaptor that is connected to the main display, so all metal/opengl accel goes through it, and some HEVC, etc goes through IGPU.

On our Zbook Hybrid mode, it is backwards, IGPU is primary and DGPU only performs HW accel on displays connected to external outputs, which is a bummer... because all this dGPU power and we can't use it on the internal screen.
Usually this makes sense since you don't want to loose performance by having a GPU perform the math and a separate one the drawing, as it would be the case here, but the performance hit is minor compared to the gain.

So enters EGPU... if you plug an external GPU through Thunderbolt, apple offers to do this very same thing, and while the best performance is achieved by using external displays connected directly to the EGPU, they give you the option to run the software on this EGPU and use the IGPU to draw it on the internal screen (with a performance penalty)

Screen Shot 2020-12-05 at 9.55.28 PM.png

This option doesn't show/work when the GPU is internal or in the PCIE bus.

I looked around trying to find a way to trick the Zbook OSX into thinking the DGPU was a EGPU, or to swap primary and secondary like in linux, or even switch the mux chip like on windows, but no dice...

This got me thinking maybe the solution is not to try to trick OSX, but rather to play nice. What If we use a dummy HDMI head (https://www.headlessghost.com/ or many clones on ebay or amazon) and use display mirroring, while swapping the primary to this dummy head?

When you have multiple sceens, there is an option to select which is primary.

Screen Shot 2020-12-05 at 9.52.56 PM.png

Now the Primary is the External HDMI headless plug thing, so all HW accel goes through the Polaris card even if the software is being displayed in the main screen plugged to the IGPU.

This way you should be able to use your laptop with accelerated graphics, we already have accelerated encodings based on my previous post, so this pretty much solves the last big hurdle of dual GPU performance on this beautiful laptop.

This is all untested of course, but I know if I plug a monitor and do the primary swap, everything works as I describe here, so a $9 dongle should do exactly the same.

The Zbook battery performance may not be ideal, but then again you don't need to have the dongle in all the time, just when you want to play a game or do something that involves 3d graphics. It may not be the same as running in Dedicated mode (Polaris performance drops about 7.5% on Hybrid config, and another 7% for screen mirror), but without the screen glitch problem and really 14% drop is not terrible.
And if the dongle is off, battery in hybrid is not bad. (would need to test to see if there is actually a penalty in battery usage by having this "ghost" screen)
If you need an external display you unplug the dongle and plug the external screen and everything is pretty much the same, so overall not a bad solution.

Here's the performance drops from running benchmarks on Hybrid mode: DGPU compute but internal display through IGPU.
Screen Shot 2020-12-05 at 10.24.47 PM.png


Display directly on WX4170 - 85.77 fps (92.78 fps in Dedicated mode with this same VBIOS)
Internal display on UHD630 - 79.92 fps

Screen Shot 2020-12-05 at 10.57.23 PM.png

External Screen DGPU

Screen Shot 2020-12-05 at 10.57.00 PM.png


Internal Screen IGPU

So we see there is a slight (~ 7% slower) drop by running OPENGL on the DGPU but using the IGPU for rendering the screen, but nothing to be sad about, and still sooo much better than using the IGPU for the heavy lifting.
 
Last edited:
Joined
Jun 13, 2016
Messages
119
Motherboard
HP Elitebook 840 G1
CPU
i5-4310U
Graphics
HD 4400, 1600x900
Mobile Phone
  1. Android
Sure, here it is, you need to download the Open Canopy Resources https://github.com/acidanthera/OcBinaryData

Guide:

The default config is UMA mode. You'll also need GenSMBIOS to generate a unique serial number.

I get panic just after the kernel loading, is it because i have 8850h as cpu? i do not see SSDT-PLUG , i'm new to opencore so i don't understand exactly how it works, but panic super early is usually cpu related, i set dvmt to 128 but gpu crash are coming later in the boot process anyway.
I tried to disable cpufriend and load ssdt plug but no luck, different kind of crash at boot just after loading.
 
Last edited:
Joined
Jul 21, 2011
Messages
41
Motherboard
Zbook G5 17"
CPU
i7
Graphics
AMD WX-4170
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
What version of MacOS are you trying to run?
I doubt you panic is 8850h related, and the contents of SSDT-PLUG are loaded in SSDT-zXTRA, along with other devices PMCR, _OSI and XOSI, kill MCHC device, DMAC, DVL0, GPRW, UPRW, PNLF, P2SK, USBX and DTGP Method.
If you like you can stop loading this SSDT and just load SSDT-PLUG for troubleshooting. But by loading it as well as zXTRA, you are creating an ACPI error. Also Disable CPU friend until you create your own power profile.

Is this on a ZBook G5?
What are your Bios settings?
Can you post the panic?

I suspect it could be your NVME drive, or your Bios settings. The NVME that came with my ZBook is not compatible at all with OSX and I have to make sure OSX ignores it completely (can't mount any drive on it, and the boot/OC EFI partition can't be on it) or I get a KP. My other drives are ok though, so I switched boot order and just keep Windows on that NVME and call it a day.
 
Joined
Dec 18, 2020
Messages
1
Motherboard
na
CPU
na
Graphics
na
Joined
Jun 13, 2016
Messages
119
Motherboard
HP Elitebook 840 G1
CPU
i5-4310U
Graphics
HD 4400, 1600x900
Mobile Phone
  1. Android
What version of MacOS are you trying to run?
I doubt you panic is 8850h related, and the contents of SSDT-PLUG are loaded in SSDT-zXTRA, along with other devices PMCR, _OSI and XOSI, kill MCHC device, DMAC, DVL0, GPRW, UPRW, PNLF, P2SK, USBX and DTGP Method.
If you like you can stop loading this SSDT and just load SSDT-PLUG for troubleshooting. But by loading it as well as zXTRA, you are creating an ACPI error. Also Disable CPU friend until you create your own power profile.

Is this on a ZBook G5?
What are your Bios settings?
Can you post the panic?

I suspect it could be your NVME drive, or your Bios settings. The NVME that came with my ZBook is not compatible at all with OSX and I have to make sure OSX ignores it completely (can't mount any drive on it, and the boot/OC EFI partition can't be on it) or I get a KP. My other drives are ok though, so I switched boot order and just keep Windows on that NVME and call it a day.

Sorry for the late reply: turns out it was mojave, booting Catalina worked fine.

Now into finetuning, the first issue is that i cannot unlock the TDP of the CPU, i am limited to 28w short 15w long as by HP defaults. In windows, i have XTU set up at boot with a script to increase it to 45 long - 55 short and it wokrs perfectly, sadly voltageshift cannot do the same on macOs . Stock cinebench R15 on macOs is 445, with a -170 undervolt i get 750, on windows with undervolt i get 800 at stock and 1100 when i unlock the TDP :(

Regarding the trackpad, i'm using 3 fingers drag
 
Last edited:
Top