Contribute
Register

AMD WX4170 dGPU on ZBook G5 17 Laptop

Joined
Mar 29, 2019
Messages
107
Motherboard
H87M-PRO
CPU
i5-4690K
Graphics
HD4600 + GTX 660 TI
Mac
  1. iMac
  2. MacBook Pro
Wow!!!! That the reason why I have mouse lag!!!!

How I can find this byte?
I will patch it to zero and the only problem will be brightness control to solve!!!
 
Joined
Mar 29, 2019
Messages
107
Motherboard
H87M-PRO
CPU
i5-4690K
Graphics
HD4600 + GTX 660 TI
Mac
  1. iMac
  2. MacBook Pro
Try using Whatevergreen debug version and use flag -wegdbg to find out how the OS is recognizing your connectors, then you can insert a framebuffer if whatevergreen's version doesn't work, and use that info to patch.

For example this is what I did for Palena FB.
View attachment 516081

The con @ DBG info is the debug info from Whatevergreen, and the last line is the patch I inserted on my config.
It worked but as I explained in another thread, the problem with Palena is stability, after wake from sleep, I could get a screen freeze, and using the default, but only injecting the Palena parameters, I get 100% stability.

Edit: I kept the Palena connector 1 flags as they seem to be related to HDCP on the internal screen.

Also you may need Whatevergreen for other DRM and AGDP patches, so in my experience there's no real need to manually inject a FB.

You can also force Connector Info on Whatevergeen's FB using an SSDT




This is what i recieve

DEBUG




: WhateverGreen init: @ (DBG) WhateverGreen bootstrap DBG-149-2021-04-05
: WhateverGreen rad: @ (DBG) not enabling CAIL_DisableDrmdmaPowerGating
: WhateverGreen rad: @ (DBG) not enabling CAIL_DisableGfxCGPowerGating
: WhateverGreen rad: @ (DBG) not enabling CAIL_DisableUVDPowerGating
: WhateverGreen rad: @ (DBG) not enabling CAIL_DisableVCEPowerGating
: WhateverGreen rad: @ (DBG) not enabling CAIL_DisableDynamicGfxMGPowerGating
: WhateverGreen rad: @ (DBG) not enabling CAIL_DisableGmcPowerGating
: WhateverGreen rad: @ (DBG) not enabling CAIL_DisableAcpPowerGating
: WhateverGreen rad: @ (DBG) not enabling CAIL_DisableSAMUPowerGating
: WhateverGreen weg: @ (DBG) non-apple-fw proceeding with devprops 1
: WhateverGreen iokit: @ (DBG) getOSData device-id has 67E8 value
: WhateverGreen iokit: @ (DBG) getOSData revision-id has 0 value
: WhateverGreen iokit: @ (DBG) getOSData subsystem-vendor-id has 103C value
: WhateverGreen iokit: @ (DBG) getOSData subsystem-id has 810A value
: WhateverGreen weg: @ (DBG) found existing built-in
: WhateverGreen iokit: @ (DBG) getOSData applbkl was not found
: WhateverGreen weg: @ (DBG) detecting policy
: WhateverGreen weg: @ (DBG) board is Mac-A5C67F76ED83108C
: WhateverGreen shiki: @ (DBG) will autodetect autodetect GPU 0 whitelist 0
: WhateverGreen shiki: @ (DBG) pre-config: online 0, bgra 0, compat 0, whitelist 0, id 0, stream 0, hwdrm 0 swdrm 0
: WhateverGreen weg: @ (DBG) vinfo 1: 1080:1920 32:7680:1
: WhateverGreen weg: @ (DBG) vinfo 2: 67:240 7680:1:0
: WhateverGreen rad: @ (DBG) starting controller 0xFFFFFF80412AE2C8
: WhateverGreen rad: @ (DBG) GetProperty discovered property merge request for aty_properties
: WhateverGreen rad: @ (DBG) GetProperty discovered property merge request for aty_config
: WhateverGreen con: @ (DBG) 0 is type 00000002 (LVDS) flags 00000100 feat 0109 pri 0000 txmit 11 enc 02 hotplug 04 sense 04
: WhateverGreen rad: @ (DBG) translateAtomConnectorInfoV1 got sense id 04
: WhateverGreen rad: @ (DBG) translateAtomConnectorInfoV1 checking 2120 object id
: WhateverGreen rad: @ (DBG) autocorrectConnector use -raddvi to enable dvi autocorrection
: WhateverGreen con: @ (DBG) 0 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 21 enc 03 hotplug 03 sense 03
: WhateverGreen rad: @ (DBG) translateAtomConnectorInfoV1 got sense id 03
: WhateverGreen rad: @ (DBG) translateAtomConnectorInfoV1 checking 2220 object id
: WhateverGreen rad: @ (DBG) autocorrectConnector use -raddvi to enable dvi autocorrection
: WhateverGreen con: @ (DBG) 0 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 20 enc 01 hotplug 01 sense 01
: WhateverGreen rad: @ (DBG) translateAtomConnectorInfoV1 got sense id 01
: WhateverGreen rad: @ (DBG) translateAtomConnectorInfoV1 checking 221E object id
: WhateverGreen rad: @ (DBG) autocorrectConnector use -raddvi to enable dvi autocorrection
: WhateverGreen con: @ (DBG) 0 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 10 enc 00 hotplug 02 sense 02
: WhateverGreen rad: @ (DBG) translateAtomConnectorInfoV1 got sense id 02
: WhateverGreen rad: @ (DBG) translateAtomConnectorInfoV1 checking 211E object id
: WhateverGreen rad: @ (DBG) autocorrectConnector use -raddvi to enable dvi autocorrection
: WhateverGreen rad: @ (DBG) setting fb limit to 4
: WhateverGreen rad: @ (DBG) getConnectorInfo leaving unchaged priority
: WhateverGreen rad: @ (DBG) getConnectorsInfo resulting 4 connectors follow
: WhateverGreen con: @ (DBG) 0 is type 00000002 (LVDS) flags 00000100 feat 0109 pri 0000 txmit 11 enc 02 hotplug 04 sense 04
: WhateverGreen con: @ (DBG) 1 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 21 enc 03 hotplug 03 sense 03
: WhateverGreen con: @ (DBG) 2 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 20 enc 01 hotplug 01 sense 01
: WhateverGreen con: @ (DBG) 3 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 10 enc 00 hotplug 02 sense 02
: WhateverGreen rad: @ (DBG) SetProperty caught model 15 (Radeon Polaris)
: WhateverGreen rad: @ (DBG) SetProperty missing model, fallback to Radeon Polaris
: WhateverGreen rad: @ (DBG) starting controller done 1 0xFFFFFF80412AE2C8
: WhateverGreen rad: @ (DBG) GetProperty discovered property merge request for cail_properties
: WhateverGreen weg: @ (DBG) fb info 1: -5:1 8192:0:32
: WhateverGreen weg: @ (DBG) fb info 2: 3:8 --------RRRRRRRRGGGGGGGGBBBBBBBB 8803819:1920:1080
: WhateverGreen weg: @ (DBG) this display has different mode
: WhateverGreen weg: @ (DBG) fb info 1: 12288:1 0:0:32
: WhateverGreen weg: @ (DBG) fb info 2: 3:8 --------RRRRRRRRGGGGGGGGBBBBBBBB 8803819:0:0
: WhateverGreen weg: @ (DBG) this display has different mode
: WhateverGreen weg: @ (DBG) fb info 1: 12288:1 0:0:32
: WhateverGreen weg: @ (DBG) fb info 2: 3:8 --------RRRRRRRRGGGGGGGGBBBBBBBB 8803819:0:0
: WhateverGreen weg: @ (DBG) this display has different mode
: WhateverGreen weg: @ (DBG) fb info 1: 12288:1 0:0:32
: WhateverGreen weg: @ (DBG) fb info 2: 3:8 --------RRRRRRRRGGGGGGGGBBBBBBBB 8803819:0:0
: WhateverGreen weg: @ (DBG) this display has different mode
: WhateverGreen weg: @ (DBG) fb info 1: -2147479552:1 8192:0:32
: WhateverGreen weg: @ (DBG) fb info 2: 3:8 --------RRRRRRRRGGGGGGGGBBBBBBBB 1057102592:1920:1080
: WhateverGreen weg: @ (DBG) this display has different mode
: WhateverGreen weg: @ (DBG) fb info 1: -2147479552:1 8192:0:32
: WhateverGreen weg: @ (DBG) fb info 2: 3:8 --------RRRRRRRRGGGGGGGGBBBBBBBB 0:1920:1200
: WhateverGreen weg: @ (DBG) this display has different mode
: WhateverGreen weg: @ (DBG) fb info 1: -2147479552:1 8192:0:32
: WhateverGreen weg: @ (DBG) fb info 2: 3:8 --------RRRRRRRRGGGGGGGGBBBBBBBB 3471507456:1920:1200
: WhateverGreen weg: @ (DBG) this display has different mode
: WhateverGreen weg: @ (DBG) fb info 1: -2147479552:1 7680:0:32
: WhateverGreen weg: @ (DBG) fb info 2: 3:8 --------RRRRRRRRGGGGGGGGBBBBBBBB 0:1920:1200
: WhateverGreen weg: @ (DBG) this display has different mode
: WhateverGreen weg: @ (DBG) fb info 1: -2147479552:2 7680:0:32
: WhateverGreen weg: @ (DBG) fb info 2: 3:10 --RRRRRRRRRRGGGGGGGGGGBBBBBBBBBB 0:1920:1200
: WhateverGreen weg: @ (DBG) this display has different mode
 
Joined
Mar 29, 2019
Messages
107
Motherboard
H87M-PRO
CPU
i5-4690K
Graphics
HD4600 + GTX 660 TI
Mac
  1. iMac
  2. MacBook Pro
So OS (without inject and amd flags) trying to set Berbice or Longavi or Palena framebuffer. I tried to patch those long time ago, but it fall all screens black. But will try again

Original FB
Berbice (5) @ 0x66cc0
LVDS, DP, DP, DP, DP
020000000001000039050108000000002001010100000000
000400000001000000010243300000001000020200000000
000400000001000000010313200000002103030300000000
000400000001000000010453500000001102040400000000
000400000001000000010533400000001204050500000000

Longavi (5) @ 0x66d40
LVDS, DP, DP, DP, DP
020000000001000039050108000000002001010100000000
000400000001000000010243300000001000020200000000
000400000001000000010313200000002103030300000000
000400000001000000010453500000001102040400000000
000400000001000000010533400000001204050500000000

Palena (5) @ 0x66e80
LVDS, DP, DP, DP, DP
020000000001000039050108000000002001010100000000
000400000001000000010243300000001000020200000000
000400000001000000010313200000002103030300000000
000400000001000000010453500000001102040400000000
000400000001000000010533400000001204050500000000
 
Joined
Jul 21, 2011
Messages
218
Motherboard
Zbook G5 17"
CPU
i7
Graphics
AMD WX-4170
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
There's your connector info as "sensed"

WhateverGreen con: @ (DBG) 0 is type 00000002 (LVDS) flags 00000100 feat 0109 pri 0000 txmit 11 enc 02 hotplug 04 sense 04
WhateverGreen con: @ (DBG) 1 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 21 enc 03 hotplug 03 sense 03
WhateverGreen con: @ (DBG) 2 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 20 enc 01 hotplug 01 sense 01
WhateverGreen con: @ (DBG) 3 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 10 enc 00 hotplug 02 sense 02


As for the HDCP flag, it may be hardcoded into the Palena FB, but the flag is this (green):

Screen Shot 2021-04-23 at 7.33.06 PM.png


As you can see I'm not changing the flag to 0901 (0109 reversed) as Whatevergreen detects, because I loose HDCP, but if I keep the original 3905, I also keep the 08 (green) while I zeroed all others after the (priority I think?) byte as it is suggested by the AMD FB patching guide. then it's good.

Remove all injection flags from your config, don't inject any framebuffers, let Whatevergreen do it and see if you then need to adjust that.
 
Last edited:
Joined
Mar 29, 2019
Messages
107
Motherboard
H87M-PRO
CPU
i5-4690K
Graphics
HD4600 + GTX 660 TI
Mac
  1. iMac
  2. MacBook Pro
There's your connector info as "sensed"

WhateverGreen con: @ (DBG) 0 is type 00000002 (LVDS) flags 00000100 feat 0109 pri 0000 txmit 11 enc 02 hotplug 04 sense 04
WhateverGreen con: @ (DBG) 1 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 21 enc 03 hotplug 03 sense 03
WhateverGreen con: @ (DBG) 2 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 20 enc 01 hotplug 01 sense 01
WhateverGreen con: @ (DBG) 3 is type 00000400 (DP ) flags 00000304 feat 0100 pri 0000 txmit 10 enc 00 hotplug 02 sense 02


As for the HDCP flag, it may be hardcoded into the Palena FB, but the flag is this:

View attachment 516096

As you can see if I change the flag to 0901 (0109 reversed) as Whatevergreen detects, I loose HDCP, but if I keep the original 3905, then it's good.

Remove all injection flags from your config, don't inject any framebuffers, let Whatevergreen do it and see if you then need to adjust that.
Smells like we close to the final step of success :)
But your gpu are DisplayPort based
 
Joined
Jul 21, 2011
Messages
218
Motherboard
Zbook G5 17"
CPU
i7
Graphics
AMD WX-4170
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
Smells like we close to the final step of success :)
But your gpu are DisplayPort based

I believe TB3 video out is fed by DP internally, same as miniDP port. but both signals can be plugged/passively converted to HDMI.
The connector type may not be as important as the signal type.
 
Last edited:
Joined
Mar 29, 2019
Messages
107
Motherboard
H87M-PRO
CPU
i5-4690K
Graphics
HD4600 + GTX 660 TI
Mac
  1. iMac
  2. MacBook Pro
believe TB3 video out

What do you mean?

Zbook g3,4,5 are DisplayPort based with converters to VGA, HDMI. One of DP is connected to thunderbolt controller and working in daisy chain mode.

Igpu and mxm vga lanes are simply connected to mux chips. So the ports switch is simply made by gpu power off or idle.
 
Joined
Jul 21, 2011
Messages
218
Motherboard
Zbook G5 17"
CPU
i7
Graphics
AMD WX-4170
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
One of DP is connected to thunderbolt controller and working in daisy chain mode.
That's what I meant, and that signal-wise you can plug into hdmi or DVI monitor through passive converter and it will work.

Igpu and mxm vga lanes are simply connected to mux chips. So the ports switch is simply made by gpu power off or idle.
I assume the EC takes care of switching the outputs somehow, but not exactly sure as they keep making the SSDT's more convoluted and harder to trace functions.

During one of my attempts to use Catalina, I tried to turn off the DGPU in many different ways (SSDT's) and found there's no way to do it, other than switching to IGPU mode in the bios directly.
All other tries resulted in hard reboots.

After all my tests. I had this bug that after waking from sleep, the DGPU outputs stayed off (even in Windows), and a EC reset fixed it.

Internally the signal goes DGPU->MUX->Output/LCD Display, so I'm guessing that in some part of this chain something could be causing my problem with Catalina. The SSDT that defines possible displays from IGPU or DGPU is very unique and again convoluted and this could be causing some missing bit that makes Catalina boot stall.
Even from Linux I'm getting:
[Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS

But Linux finds a way around it, (I guess ignores it) and so does Mojave, but maybe Catalina doesn't?

My next attempt will be to patch Catalina as if it were an unsupported older Mac to see if I can get closer to figuring this problem.
(My #1 suspect is skylight framework)
 
Last edited:
Joined
Mar 29, 2019
Messages
107
Motherboard
H87M-PRO
CPU
i5-4690K
Graphics
HD4600 + GTX 660 TI
Mac
  1. iMac
  2. MacBook Pro
No success... display edp is just blinking with signal loss and image for second and then goes black.

If I use native os framebuffer without any patch or amd inject, the display lid working. But if I close lid, using the hdmi or vga or dp, the mouse lag appears. If I use magnet to act with holl sensor of lid which is located under power button, the display edp is hotplug comes to disconnect the lag appears. So I done next thing: patch berbice, Palena, baladi and other framebuffer with same connector info to zeros except vga port . So in practice, if os is using one of this, all other ports will be off. Patch with hex code find and replace. But nothing is happening. But patch will happen only if I inject framebuffer name with clover.

I don’t understand where os or how is selecting framebuffer? Even if I delete Whatevergreen kext, it will load same framebuffer with lags of close lid :(
 
Last edited:
Top