Contribute
Register

<< Solved >> AMD WX4170 dGPU on ZBook G5 17 Laptop

Status
Not open for further replies.
I've wondered myself if I could inject some properties from different SSDT configs (discrete/hybrid/udma) to try to get Catalina to load.

Is your thunderbolt tree working now? do you get hotplug?
I believe there's 2 modes of thunderbolt operation, as a PCI "extension" or as a Thunderbolt device.

In my G2 the Thunderbolt 2 devices had to be plugged in at startup and were recognized as PCI cards (ejectable with a crash) but that was a different controller.

Another option for you would be to flash your TB3 controller chip with apple's FW and then your eGPU would bypass all the DSDT stuff and just be controlled by apple's TB3 drivers?
Thunderbolt dsdt, every version that you send, was creating kernel Panic, if any thunderbolt device is connected.



So after whole day of successful working with 3 gpu and stable config, clover folder, I decided to select amd as discrete to test. And after even switching back to igpu-hybrid, I get all those problems, which I have at the beginning. I just don’t understand why it’s happening...


When everything was fine:
30CEEE86-779D-4756-B0E2-D534E1FD429F.png36AD142E-82C8-4F79-A54A-38E9B904C1A6.png225A73D3-891F-48F3-ADA6-596504839FD7.png


And now I have this:
FF1A885B-9A27-49A2-ABA7-57077B3F778C.jpeg33F5C9C3-D5F5-40C2-8758-4A97E4A0F575.jpeg
 
Reset your EC controller or disconnect battery.
I've seen something similar on my 4170, I think it's bad PowerPlay tables/clocks and it corrupts something in the card, but cutting power completely resets it and all is good.

My guess is whatever framebuffer you're injecting is causing that. It happened to me when I injected Palena
 
Reset your EC controller or disconnect battery.
I've seen something similar on my 4170, I think it's bad PowerPlay tables/clocks and it corrupts something in the card, but cutting power completely resets it and all is good.

My guess is whatever framebuffer you're injecting is causing that. It happened to me when I injected Palena
Screen Shot 2021-04-28 at 23.42.23.png



how do you think is GFX names is ok?

I boot windows with epgu and after restart it is working again!
What can be a reason? Maybe some NVRAM, SOME SYSTEM Cache, or possibly cmos, smc, pram... or clover nvram.plist?
 
how do you think is GFX names is ok?
Seems fine
I boot windows with epgu and after restart it is working again!
What can be a reason? Maybe some NVRAM, SOME SYSTEM Cache, or possibly cmos, smc, pram... or clover nvram.plist?
I think windows is probably initializing the Thunderbolt Chip and if you warm-reboot, it stays in that state and then MacOS doesn't have to do anything and it works.

That's just a guess though
 
Seems fine

I think windows is probably initializing the Thunderbolt Chip and if you warm-reboot, it stays in that state and then MacOS doesn't have to do anything and it works.

That's just a guess though
Can you describe your eGPU setup and all connections related to graphics?


I made two IOREGs with artifacts and without then. Added to attachments.




stable01.png
Artifacts01.png
stable02.png
Artifacts02.png



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

UPD1:

opengl-amd radeon.png
opengl-NVIDIA.png
opengl-IGPU.png
AND AFTER A SECOND>
opengl-after IGPU HD530.png







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


UPD2: bootarg "-wegnoigpu" fully disabling igpu and now egpu is fully functional. So it is clear, that the problem of artifacts is apearing when IGPU trying render UI elements, than send it to egpu, and egpu send it back to display. As laptop will always work with screen, even if disconnect it from display. The important moment: zbook power off IGPU when egpu connected, as the any screen connected to laptop wont work before any os is loaded.

My sugestions. So Mac is loading os, powering on IGPU. After first stage of boot and on the stage when drivers are loaded (verbose listing) the first device order maybe is wrong. Thats why displays (Internal HDMI, EGPU HDMI) is dancing cross different graphics unit.

Screen Shot 2021-04-29 at 11.42.47.png
=======================================================================================
=======================================================================================

UPD 3. What if the reason of this problem is OpenGL? Different versions or priority to default OpenGL device? Is it possible to test metal 3D engine? If this is working so somehow os or some kext or device policy disabling metal for os GUI???

I use rehabman igpu inject via device property config plist.

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

UPD 4. Its framebuffer issue. Possible related to whatevergreen. I compare your efi kext folder, and find huge difference to hotpatch kexts. SO I FOUND IN WHATEVERGREEN MANUAL TO DISABLE THIS KEXTS:

Manual: https://github.com/acidanthera/WhateverGreen/blob/master/Manual/FAQ.IntelHD.en.md
Remove (if used previously) these kexts:
— IntelGraphicsFixup.kext
— NvidiaGraphicsFixup.kext
— CoreDisplayFixup.kext
— Shiki.kext
— IntelGraphicsDVMTFixup.kext
— AzulPatcher4600.kext
— AppleBacklightFixup.kext,
— FakePCIID_Intel_HD_Graphics.kext
— FakePCIID_Intel_HDMI_Audio.kext
— and FakePCIID.kext (if there are no other FakePCIID plugins)




But ihave
FakePCIID_XHCIMux

So back to IOREG tree, my two displays become 3 displays, because when no display connected to laptop, the internal display is enabling (like on real mac, its a huge problem when using eGPU).

Also I note, that have no DRM support.
iTunes/Apple Store Content Access Problem. Content playback may be disabled on this computer. You can continue to use the machine, but you should contact an Apple support representative. ErrorCode: 8877652

So planing to follow whatevergreen manual and disable or enable required options
=======================================================================================
=======================================================================================

UPD 5.
theroadw said:
I think windows is probably initializing the Thunderbolt Chip and if you warm-reboot, it stays in that state and then MacOS doesn't have to do anything and it works.
Thunderbolt chip is simple HOST PCI lanes + UART data to network-type cable and then to DEVICE PCI+UART. All pci states, like Wake, CLK request and two different mossfets pnp and npn, all of them are connected to cortex arm cpu. Arm CPU connected to UART (LowSpeed Interface, directly to TB cable), to PCI Control lanes, and to thunderbolt chip via SPInterface. So this chip is simple operation. I done some different hardware hacks with tb1 devices, and they are really simple to modify. And for those who know how to reverse engineering firmware, even is possible to make any thunderbolt device work as they want.

\\\\ Thunderbolt ethernet dongle

1619707181808.png
What windows is doing, is simple power on IGPU and after that it working well. maybe its really a conflict with wrong properties, or drivers. Will test and check
 
Last edited:
Try the bootflag igfxgl=1 to disable Metal support on Intel.

I remember on my G2 the thunderbolt device woked as a pci bridge if device was plugged at boot, but wouldn't work as hotplug. So my theory is that if apple's drivers take hold of the TB chip, they look for apple's special sauce and if it's there, then they initialize it properly and send the command to enable the bridge or disable (hotplug)
If the apple firmware isn't in the TB chip, then you don't get that control, but when system boots and queries the hardware it finds the bridge and activates the device. Or if windows activated the bridge and you hot-reboot, then you get the same state for the next OS.

This was using an Eagle Ridge controller.

Now on my G5 (Titan Ridge Controller) using the Thunderbolt SSDT, it almost behaves like a Mac TB3. I would need to flash the firmware to get Target display mode, but other than that, I get all the functionality and hotplug.

more TB3 info here: https://www.tonymacx86.com/threads/in-progress-ssdt-for-thunderbolt-3-hotplug.248784/

-----

There's a chance your OS is a bit dated for all the eGPU stuff, so that would probably hurt your chances of success.
I find High Sierra was a bit glitchy with my 4170 and compute sharing tests, and yet Mojave behaves perfectly, so it's possible this is not a hardware problem but a software one, and in Mojave your Nvidia card won't work.
 
Last edited:
Try the bootflag igfxgl=1 to disable Metal support on Intel.

I remember on my G2 the thunderbolt device woked as a pci bridge if device was plugged at boot, but wouldn't work as hotplug. So my theory is that if apple's drivers take hold of the TB chip, they look for apple's special sauce and if it's there, then they initialize it properly and send the command to enable the bridge or disable (hotplug)
If the apple firmware isn't in the TB chip, then you don't get that control, but when system boots and queries the hardware it finds the bridge and activates the device. Or if windows activated the bridge and you hot-reboot, then you get the same state for the next OS.

This was using an Eagle Ridge controller.

Now on my G5 (Titan Ridge Controller) using the Thunderbolt SSDT, it almost behaves like a Mac TB3. I would need to flash the firmware to get Target display mode, but other than that, I get all the functionality and hotplug.

more TB3 info here: https://www.tonymacx86.com/threads/in-progress-ssdt-for-thunderbolt-3-hotplug.248784/

-----

There's a chance your OS is a bit dated for all the eGPU stuff, so that would probably hurt your chances of success.
I find High Sierra was a bit glitchy with my 4170 and compute sharing tests, and yet Mojave behaves perfectly, so it's possible this is not a hardware problem but a software one, and in Mojave your Nvidia card won't work.
Thanks. I see different tb patches. I know that this won’t help to get egpu work without artifacts.

But after I follow Whatevergreen manual and delete all those kexts and some property’s the system became fully stable except artifacts in some apps.

Long-long time ago I installed GTS450 into akitio thunder2 and test on MacBookpro9.1 (real) and I got also same artifacts, but after I replaced with gtx660ti all with WebDriver, artifacts gone. Mine AORUS is still working great on those MacBookpro. So I clover inject mbp9.1 profile for fun, and everything is working fine and even without any lags. But no hardware h264,hevc support. So maybe OS X have different instructions to framebuffer of Intel. And now any gl, metal tests are working stable if not rendering image on screen


What is target display mode?
 
Last edited:
Thanks. I see different tb patches. I know that this won’t help to get egpu work without artifacts.

But after I follow Whatevergreen manual and delete all those kexts and some property’s the system became fully stable except artifacts in some apps.

That's good, try in app info, there probably is an option to use egpu.
Screen Shot 2020-12-05 at 9.55.28 PM.png


Long-long time ago I installed GTS450 into akitio thunder2 and test on MacBookpro9.1 (real) and I got also same artifacts, but after I replaced with gtx660ti all with WebDriver, artifacts gone. Mine AORUS is still working great on those MacBookpro. So I clover inject mbp9.1 profile for fun, and everything is working fine and even without any lags. But no hardware h264,hevc support. So maybe OS X have different instructions to framebuffer of Intel. And now any gl, metal tests are working stable if not rendering image on screen
Different SMBIOS have different rules.
If you use an SMBIOS that has DGPU, then those options will be enabled. You can also try the shikigva thing.
You can also modify AppleGVA.framework to add your platform and add/remove hardware encoding/decoding options.
Another option is using the flags from https://github.com/acidanthera/WhateverGreen/blob/master/Manual/FAQ.Shiki.en.md

defaults write com.apple.AppleGVA forceNV -boolean yes — forces NVIDIA decoder
defaults write com.apple.AppleGVA forceATI -boolean yes — forces ATI decoder
defaults write com.apple.AppleGVA forceIntel -boolean yes — forces Intel decoder
defaults write com.apple.AppleGVA forceSWDecoder -boolean yes — forces software decoder
defaults write com.apple.coremedia hardwareVideoDecoder disable — disables hardware decoder
defaults write com.apple.coremedia hardwareVideoDecoder force — forces hardware decoder
Please note that this preference is not needed in most cases, and its improper usage will break CL and VDA decoding.

What is target display mode?

You can plug a real mac through thunderbolt and use the ZBooks internal LCD as an extra Monitor.
(Nothing I would ever need)
 
For example I edited my AppleGVA Framework to add my platform Mac-937A206F2EE63C01 (instructions in the other thread)
And then settled on these options:

Screen Shot 2021-04-29 at 4.12.37 PM.png


I don't know why but I can't force HVEC encoding on the WX-4170, but it does it on the IGPU, so still hardware encoding. I also kept HVEC decoding on intel, as it uses less power and is more efficient.

Only change for discrete mode is adding: jpeg -> YES so quicklook also uses the DGPU. As it is right now in Hybrid, jpeg quicklook uses the IGPU.
 
For example I edited my AppleGVA Framework to add my platform Mac-937A206F2EE63C01 (instructions in the other thread)
And then settled on these options:

View attachment 516910

I don't know why but I can't force HVEC encoding on the WX-4170, but it does it on the IGPU, so still hardware encoding. I also kept HVEC decoding on intel, as it uses less power and is more efficient.

Only change for discrete mode is adding: jpeg -> YES so quicklook also uses the DGPU. As it is right now in Hybrid, jpeg quicklook uses the IGPU.
I think that we have wrong connectors in our vbioses and hotplugs keys. I compare all aty GPUs presented in laptop bios, and they are different from mine. So even g4 and d3 connectors are different. The next step of vbios is to compare igpu, NVIDIA and amd vbios connectors, as I think, they should be the same in one laptop but different in other. I was pretty surprised, when discovered that with Windows, igpu is working only on edp and vga (suppose dvi to vga). But hdmi and dp is from aty. But with mine m2000m quadro, all ports was working fine on igpu!!! So proposing you to switch to this thread https://www.techpowerup.com/forums/...mobile-moded-vbios-for-hp-zbook-15-g3.279373/
for modding vbios to get it working like native

And I think that bios won’t recognize acpi instructions of our GPUs as they are not presented in bios. I will insert back mine old gpu to check if mine setup will work fine. Then will compare chipset selected acpi tables to those which are selected with amd.


UPD1.
Sorry for my inattention, your WX4170 is native Zbook gpu. So you no need to hex patch of our vbios, as it is supported by your original bios. Even is injected by your bios. Omg now I am feeling really sorry for my advices to patch vbios rom.
 
Last edited:
Status
Not open for further replies.
Back
Top