• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

AMD Radeon Pro WX 4150/4170 Mobile - custom VBIOS FOR HP ZBook

Joined
May 22, 2020
Messages
77 (0.15/day)
ACPI RESEARCH:​

GTFV | _SB.PCI0.LPCB.EC0.FT2C
Code:
        Method (GTFV, 1, Serialized)
        {
            Store (Zero, Local0)
            If (\_SB.PCI0.LPCB.EC0.ECRG)
            {
                Acquire (\_SB.PCI0.LPCB.EC0.ECMX, 0xFFFF)
                If (LEqual (Arg0, One))
                {
                    Store (\_SB.PCI0.LPCB.EC0.FTGC, Local0)
                }
                ElseIf (LEqual (Arg0, 0x02))
                {
                    Store (\_SB.PCI0.LPCB.EC0.FT2C, Local0)
                }

                Release (\_SB.PCI0.LPCB.EC0.ECMX)
            }

            Return (Local0)
        }

_SB.PCI0.LPCB.EC0.FT2C, Local0 - That one is reading TARGET FAN SPEED. When i change speed in NBFC, this value changes in exact same time. So reading Only!


STMM | ^^PCI0.LPCB.EC0.FT2C
Code:
            If (LEqual (IDTA, 0x30))
            {
                Store (DerefOf (Index (Arg0, One)), Local1)
                Store (DerefOf (Index (Arg0, 0x02)), Local2)
                If (LGreater (Local1, One))
                {
                    Store (DerefOf (Index (Arg0, 0x04)), Local3)
                }

                If (^^PCI0.LPCB.EC0.ECRG)
                {
                    Acquire (^^PCI0.LPCB.EC0.ECMX, 0xFFFF)
                    Store (Local2, ^^PCI0.LPCB.EC0.FTGC)
                    If (LGreater (Local1, One))
                    {
                        Store (Local1, ^^PCI0.LPCB.EC0.FT2C)
                    }

                    Release (^^PCI0.LPCB.EC0.ECMX)
                }

                Return (Package (0x01)
                {
                    Zero
                })
            }

Local1, ^^PCI0.LPCB.EC0.FT2C - That one is setting TARGET FAN SPEED

\\\\\\\\\ \\\\\\\\\ \\\\\\\\\ \\\\\\\\\
Clean AMDSGTBL
DefinitionBlock ("", "SSDT", 1, "HP", "AMDSGTBL", 0x00001000









\\\\\\\\\ \\\\\\\\\ \\\\\\\\\ \\\\\\\\\
Interesting:





\\\\\\\\\ \\\\\\\\\ \\\\\\\\\ \\\\\\\\\
Thermal controller DUFC for WX4150
1631698571358.png



\\\\\\\\\ \\\\\\\\\ \\\\\\\\\ \\\\\\\\\



Adding TROPPO \ CAPE VERDE MOBILE GPUz for research of smbus compatibility
 

Attachments

  • AMDSGTBL_G3+G4.zip
    11.2 KB · Views: 9
  • Boardview - Troppo.zip
    197.7 KB · Views: 5
  • _1002 ID 682X_VBIOSES.zip
    491.3 KB · Views: 5
  • Schematic - Troppo 01.zip
    5.9 MB · Views: 5
  • Schematic - Troppo 02.zip
    5.5 MB · Views: 4
Last edited:
Joined
May 22, 2020
Messages
77 (0.15/day)
Resuming:

The W5170M Have T19D Temp sensor
= LM89-1DIMM/NOPB / LM89-1DIMMX/NOPB **** address = 1001101 = 4D = 10011010 and 10011011 = read 9A / write 9B


The WX4150 Have DUFC Temp Sensor = TMP431DD Slave address **** address = 1001100 = 4C = 10011000 and 10011001 = read 98 / write 99
dufc_RM.pngNot full, but easy to understand




The gpu have internal temperature controller, also chipset can have it, or isa bridge can have it or even embedded controller. But the vendors doesn’t invent their own controllers, but implement the already existing ones. And yes, all temperature controllers start from address 1001 and has 3 bits variations, the eight bit is read or write. But all of them have different features and commands.


I do have some experience with NTCs, but that controllers are diode based. Anyway we can simply build pcb with supported temperature controller and wired diode, locate it close to gpu crystal and that will bring back the pwm to EC/SMC



G3 Laptop include
ASpeed SuperIO Port = 00h
------[ LM78 ISA Sensor Device at 0228 ]------





ATIF TEMP Is shared folder for Coop research // no success yet
 

Attachments

  • ATIF TEMP.zip
    22.4 KB · Views: 9
Last edited:
Joined
May 22, 2020
Messages
77 (0.15/day)
SSDT-7-AMDSGTBL_G3_v2_BootNoErrors

_PECI_NotifySBIOSGPUTemperature:
push rbp ; CODE XREF=_PEM_Task_NotifySBIOSGPUTemperature+51
mov rbp, rsp
sub rsp, 0x40
mov ax, si
mov esi, 0xd
xor ecx, ecx
mov r8d, 0x5
mov r9d, r8d
lea r10, qword [rbp+var_20]
mov qword [rbp+var_10], rdi
mov word [rbp+var_12], ax
mov dword [rbp+var_18], edx
mov rdi, r10 ; argument "b" for method _memset
mov dword [rbp+var_24], esi
mov esi, ecx ; argument "c" for method _memset
mov rdx, r9 ; argument "len" for method _memset
call _memset
mov rdi, qword [rbp+var_10] ; argument #1 for method _PECI_IsATIFFunctionsSupported
mov esi, dword [rbp+var_24] ; argument #2 for method _PECI_IsATIFFunctionsSupported
call _PECI_IsATIFFunctionsSupported
test al, 0x1
jne loc_1235ea



C++:
#define ATIF_FUNCTION_GET_SYSTEM_BIOS_REQUESTS                     0x2
/* ARG0: ATIF_FUNCTION_GET_SYSTEM_BIOS_REQUESTS
* ARG1: none
* OUTPUT:
* WORD  - structure size in bytes (includes size field)
* DWORD - pending sbios requests
* BYTE  - panel expansion mode
* BYTE  - thermal state: target gfx controller
* BYTE  - thermal state: state id (0: exit state, non-0: state)
* BYTE  - forced power state: target gfx controller
* BYTE  - forced power state: state id
* BYTE  - system power source
* BYTE  - panel backlight level (0-255)
*/
/* pending sbios requests */
#       define ATIF_DISPLAY_SWITCH_REQUEST                         (1 << 0)
#       define ATIF_EXPANSION_MODE_CHANGE_REQUEST                  (1 << 1)
#       define ATIF_THERMAL_STATE_CHANGE_REQUEST                   (1 << 2)
#       define ATIF_FORCED_POWER_STATE_CHANGE_REQUEST              (1 << 3)
#       define ATIF_SYSTEM_POWER_SOURCE_CHANGE_REQUEST             (1 << 4)
#       define ATIF_DISPLAY_CONF_CHANGE_REQUEST                    (1 << 5)
#       define ATIF_PX_GFX_SWITCH_REQUEST                          (1 << 6)
#       define ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST                (1 << 7)
#       define ATIF_DGPU_DISPLAY_EVENT                             (1 << 8)
/* panel expansion mode */
#       define ATIF_PANEL_EXPANSION_DISABLE                        0
#       define ATIF_PANEL_EXPANSION_FULL                           1
#       define ATIF_PANEL_EXPANSION_ASPECT                         2
/* target gfx controller */
#       define ATIF_TARGET_GFX_SINGLE                              0
#       define ATIF_TARGET_GFX_PX_IGPU                             1
#       define ATIF_TARGET_GFX_PX_DGPU                             2
/* system power source */
#       define ATIF_POWER_SOURCE_AC                                1
#       define ATIF_POWER_SOURCE_DC                                2
#       define ATIF_POWER_SOURCE_RESTRICTED_AC_1                   3
#       define ATIF_POWER_SOURCE_RESTRICTED_AC_2                   4




DSDT:



Method (GTTP, 5, Serialized) // GET THERMAL PATTERN?

/*
GFXZ Store (GTTP (Zero, One, 0x10, Zero, 0x7F), Local0)
*/

{
Store (Arg2, Local1)
If (LAnd (LLessEqual (Arg0, 0x04), \_SB.PCI0.LPCB.EC0.ECRG))
{
Acquire (\_SB.PCI0.LPCB.EC0.ECMX, 0xFFFF)
Store (Arg1, \_SB.PCI0.LPCB.EC0.CRZN)
Store (\_SB.PCI0.LPCB.EC0.TEMP, Local1)
Release (\_SB.PCI0.LPCB.EC0.ECMX)
}

Store (Local1, Local2)
If (LLess (Local1, Arg3))
{
If (LLess (DerefOf (Index (LARE, Arg0)), Arg3))
{
Store (Arg3, Index (LARP, Arg0))
}

Store (DerefOf (Index (LARP, Arg0)), Local1)
}
ElseIf (LGreater (Local1, Arg4))
{
If (LGreater (DerefOf (Index (LARE, Arg0)), Arg4))
{
Store (Arg4, Index (LARP, Arg0))
}

Store (DerefOf (Index (LARP, Arg0)), Local1)
}

Store (Local2, Index (LARE, Arg0))
Store (Local1, Index (LARP, Arg0))
Return (Local1)
}

////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// ////// //////

Intel C236 PCH Datasheet
 

Attachments

  • SSDT-7-AMDSGTBL_G3_v2_BootNoErrors.zip
    12.1 KB · Views: 4
  • AMDRadeonX4000HWLibs.zip
    5 MB · Views: 5
  • AMDSGTBL_+AF14 Custom_testedboot.zip
    12.8 KB · Views: 7
  • _DSDT_PostedG3_ClV2.aml.zip
    47.7 KB · Views: 5
Last edited:
Joined
May 22, 2020
Messages
77 (0.15/day)
in research
where temperature comes from?




///////////////
interesting project:




///////////////
The other interesting discussion:
About acpi thermal zones
 

Attachments

  • dsdt-dsl_research.zip
    220.3 KB · Views: 4
Last edited:
Joined
May 22, 2020
Messages
77 (0.15/day)
-RADVESA.png



edit1. maybe wrong. after playing with ATIF methods and dsdt, at mac os fans wont work/ only low speed. cant restore original state. all patches are on external usb. So now system is working from stable clover efi....







edit2. HP Thermal Config \ Profile efi drivers
attachments
 

Attachments

  • HP Thermal Config & Profile - efi drivers.zip
    368.1 KB · Views: 7
Last edited:
Joined
May 22, 2020
Messages
77 (0.15/day)
Finally found working fan solution, check (after):
851CBC8D-4ADE-40E7-9A0B-988253CB2F15.jpeg

Before:
95099251-71D1-4374-9CED-1E05FF99B26F.jpeg

GFXZ thermal zone!


@gpot thank you for long research with happy ending!



Edit1. Failed to work after reboot. Something wrong

Edit2. Mapping

Screen Shot 2021-09-24 at 21.41.15.pngScreen Shot 2021-09-24 at 21.41.24.png
 
Last edited:
Joined
May 22, 2020
Messages
77 (0.15/day)
GFX Thermal zone thermal values

32 Celsius = Dec - 3052 = 305.15 Kelvin
33 Celsius = Dec - 3062 = 306.15 Kelvin
34 Celsius = Dec - 3072 = 307.15 Kelvin
35 Celsius = Dec - 3082 = 308.15 Kelvin
36 Celsius = Dec - 3092 = 309.15 Kelvin
37 Celsius = Dec - 3102 = 310.15 Kelvin
38 Celsius = Dec - 3112 = 311.15 Kelvin
39 Celsius = Dec - 3122 = 312.15 Kelvin
40 Celsius = Dec - 3132 = 313.15 Kelvin
41 Celsius = Dec - 3142 = 314.15 Kelvin
42 Celsius = Dec - 3152 = 315.15 Kelvin
43 Celsius = Dec - 3162 = 316.15 Kelvin
44 Celsius = Dec - 3172 = 317.15 Kelvin
45 Celsius = Dec - 3182 = 318.15 Kelvin
46 Celsius = Dec - 3192 = 319.15 Kelvin
47 Celsius = Dec - 3202 = 320.15 Kelvin
48 Celsius = Dec - 3212 = 321.15 Kelvin
49 Celsius = Dec - 3222 = 322.15 Kelvin
50 Celsius = Dec - 3232 = 323.15 Kelvin
51 Celsius = Dec - 3242 = 324.15 Kelvin
52 Celsius = Dec - 3252 = 325.15 Kelvin
53 Celsius = Dec - 3262 = 326.15 Kelvin
54 Celsius = Dec - 3272 = 327.15 Kelvin
55 Celsius = Dec - 3282 = 328.15 Kelvin
56 Celsius = Dec - 3292 = 329.15 Kelvin
57 Celsius = Dec - 3302 = 330.15 Kelvin
58 Celsius = Dec - 3312 = 331.15 Kelvin
59 Celsius = Dec - 3322 = 332.15 Kelvin
60 Celsius = Dec - 3332 = 333.15 Kelvin



edit1. some DXE drivers
 

Attachments

  • G3+G4_DXE_Drivers.zip
    216.7 KB · Views: 6
Last edited:
Joined
May 22, 2020
Messages
77 (0.15/day)
Working (Partially but have glitches with telemetry probably requires vbios patching) on wx4150:
- EMC1412 (correct thermal reading)
- T1J (ADM1032) (high thermal reading)
- T15C (LM89CIMM)

All of them are 1001_100 (4C)
 

victoramm

New Member
Joined
Oct 14, 2021
Messages
3 (1.00/day)
Hello, this topic simply blows my mind with informations and directions.

First let me introduce my case, i have one ZBook 15 G1 workstation and bought for very cheap an WX4150 MXM module (blue pcb HP OEM), works perfect. except by one thing.

I cannot disable GPU and use my internal monitor with my graphics card, I'm now in the process of trying to find the MUX chips on the motherboard, got some schematics, and work on it.

I can disable igpu and use display port normally (lid closed and everything) but cannot use MXM gpu only on internal panel.

1634178448468.png

Will now investigate I2C Buses and try to work some magic, and start a long read.

edit: device works fully when using W5170M graphics. So I will try to copy some atombios tables values :D

edit: I admit I'm a little eager to try our biosmod, but for now I will wait.
 

Attachments

  • compal_la-9241p_r0.5_schematics.pdf
    3.5 MB · Views: 5
Last edited:
Joined
May 22, 2020
Messages
77 (0.15/day)
Hello, this topic simply blows my mind with informations and directions.

First let me introduce my case, i have one ZBook 15 G1 workstation and bought for very cheap an WX4150 MXM module (blue pcb HP OEM), works perfect. except by one thing.

I cannot disable GPU and use my internal monitor with my graphics card, I'm now in the process of trying to find the MUX chips on the motherboard, got some schematics, and work on it.

I can disable igpu and use display port normally (lid closed and everything) but cannot use MXM gpu only on internal panel.

View attachment 220785
Will now investigate I2C Buses and try to work some magic, and start a long read.

edit: device works fully when using W5170M graphics. So I will try to copy some atombios tables values :D

edit: I admit I'm a little eager to try our biosmod, but for now I will wait.
Hello! Did you tried to disable igpu at device manager and reboot?
Bios menu otions: Hybrid/ Auto / UMA / Discrete?
Does Zbook G1 support AMD graphics? If not, you need to inject AMD radeon acpi methods (AMDSWTCHBL or something like that) currently i working on port of G4 amd acpi to G3.
What is difference between G1 and G2, if we compare PCH and Embedded Controller? - If they are same, use AMD acpi ssdt
Zbooks are protected by HP Sure Start \ No bios modding available

Which you are using? Note, that OEM vbios on MXM could be desktop bios \ it can fail battery or mossfets if work on non windows environment (even preboot). Be sure that GPU is switching to low power mod.

@theroadw now working on MUX patch for non windows OS. If you have windows, you can use AIDA64 Engineer edition with ACPI browser availability and Query the ACPI method SGOV (find) with two arguments. AGR0 = 0x03050000 ARG1 = 0x1 or 0x0. That possibly will switch MUX, but not sure that your address is same as G3-G5. Anyway if IntScreen will goes black with one of ARG1, then i will send you short ACPI method you could use to default int screen to MXM
 

victoramm

New Member
Joined
Oct 14, 2021
Messages
3 (1.00/day)
Hello! Did you tried to disable igpu at device manager and reboot?
Bios menu otions: Hybrid/ Auto / UMA / Discrete?
Does Zbook G1 support AMD graphics? If not, you need to inject AMD radeon acpi methods (AMDSWTCHBL or something like that) currently i working on port of G4 amd acpi to G3.
What is difference between G1 and G2, if we compare PCH and Embedded Controller? - If they are same, use AMD acpi ssdt
Zbooks are protected by HP Sure Start \ No bios modding available

Which you are using? Note, that OEM vbios on MXM could be desktop bios \ it can fail battery or mossfets if work on non windows environment (even preboot). Be sure that GPU is switching to low power mod.

@theroadw now working on MUX patch for non windows OS. If you have windows, you can use AIDA64 Engineer edition with ACPI browser availability and Query the ACPI method SGOV (find) with two arguments. AGR0 = 0x03050000 ARG1 = 0x1 or 0x0. That possibly will switch MUX, but not sure that your address is same as G3-G5. Anyway if IntScreen will goes black with one of ARG1, then i will send you short ACPI method you could use to default int screen to MXM

Trying to disable igpu at device manager and reboot yields absolute no screen.
Bios options - Discrete only, only works on external displayport monitor and I need to setup as uefi native, uefi hybrid seems to not work.

Differentes between G1 and G2 are minimal, BUT G2 has AMD graphics cards options natively.

My card is L17822-001 / WX4150 , blue PCM I think it is oem for zbook 15 G4, I am using it for months already, no battery issues and no power consumption, I also modded my bios for better thermal performance reducing core clock and undervolting core while upping some samsung GDDR5 speed, I used some cryptominer-s bios editing software cant quite remember. I attached my current bios so you can take a look (if you want of course).

Thanks a LOT for the info, I will look into injecting AMD radecon ACPI methods, and report back!

Also when using wx4150 card my fan is stuck at 100%, but I can use software on linux and windows to control it manually https://github.com/hirschmann/nbfc
 

Attachments

  • wx4150Eco.rom
    512 KB · Views: 1
Joined
May 22, 2020
Messages
77 (0.15/day)
Also when using wx4150 card my fan is stuck at 100%, but I can use software on linux and windows to control it manually
You will need a hardware mod, thermal controller replacement. But you cannot check for compatible one. But m6100 for g2 comes with T1J (4Ch address) thermal controller (one of adm, I wrote somewhere up)


Acpi you can grab from Zbook g2 bios. The AMDSGTBL is hybrid mode, ATIGFX is discrete mode. Injection of them should solve sleep issues and smooth acceleration events.


No screen? Try my nebula vbios. It seems like you’re no backlight or wrong connector detection.

thermal performance reducing
Did you modify or replace heatsink for amd gpu? Nvidia heatsink wont give you proper cooling, even can fail your gpu
 

hugodlc

New Member
Joined
Oct 19, 2020
Messages
3 (0.01/day)
Did you modify or replace heatsink for amd gpu? Nvidia heatsink wont give you proper cooling, even can fail your gpu
Copper shim and shaving/modifying may be needed. It was for my G5

If you have windows, you can use AIDA64 Engineer edition with ACPI browser availability and Query the ACPI method SGOV (find) with two arguments. AGR0 = 0x03050000 ARG1 = 0x1 or 0x0. That possibly will switch MUX, but not sure that your address is same as G3-G5. Anyway if IntScreen will goes black with one of ARG1, then i will send you short ACPI method you could use to default int screen to MXM
Method SGOV does not exist in G2 Acpi tables. Neither does MXDS or MXMD Methods which are the Asus ones. No idea how switching takes place.
But I seem to remember that pressing Win+one of the Funktion keys that has a monitor did trigger a switch. Maybe that is the way to go, or a clue to search for GPIO keyboard event in DSDT/SSDT
 
Last edited:

victoramm

New Member
Joined
Oct 14, 2021
Messages
3 (1.00/day)
You will need a hardware mod, thermal controller replacement. But you cannot check for compatible one. But m6100 for g2 comes with T1J (4Ch address) thermal controller (one of adm, I wrote somewhere up)


Acpi you can grab from Zbook g2 bios. The AMDSGTBL is hybrid mode, ATIGFX is discrete mode. Injection of them should solve sleep issues and smooth acceleration events.


No screen? Try my nebula vbios. It seems like you’re no backlight or wrong connector detection.


Did you modify or replace heatsink for amd gpu? Nvidia heatsink wont give you proper cooling, even can fail your gpu

Will try nebula vbios and yes I added some copper shims for perfect contact and good temperature, normal usage both cpu and gpu at confortable 65 ~ 75 degrees celsius! zbook 15 G1 and G2 have only one fan and two heatpipes for both gpu and cpu cooling a weak cooler for strong workloads, now is very under control and working happily
 
Joined
May 22, 2020
Messages
77 (0.15/day)
65 ~ 75 degrees celsius
WX4150 for me is cooler than M2000M and is 55-60 while hard gaming and 60-67 at GPU+CPU hard rendering. Is your crystal is good connected to heatsink? When you disassemble it, the thermal paste should be in very small amount on crystal. but critical is higher than 80, which in your case is very close and at sunny hot day it could fail.



Method SGOV does not exist in G2 Acpi tables. Neither does MXDS or MXMD Methods which are the Asus ones. No idea how switching takes place.
You already decided to hack G2? :)
 
Top