Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4000 series compatibility? #9

Open
Freekers opened this issue May 14, 2020 · 30 comments
Open

4000 series compatibility? #9

Freekers opened this issue May 14, 2020 · 30 comments

Comments

@Freekers
Copy link

Hi!
Are there any plans for Ryzen 4000 series compatibility in the near future?
Thank you!

@alexantone
Copy link

alexantone commented May 15, 2020

I made a pull request. Unfortunately I don't have a windows build environment but I do have a 4800H to test.
#10

I don't think just patching in the CPUID will work. The latest SMUDebugTool doesn't even run on my 4800H system.

@Freekers
Copy link
Author

I also have a 4800H. If I can help, please let me know.

@irusanov
Copy link
Owner

irusanov commented May 29, 2020

@Freekers @alexantone

Hi, could you try this version? I'm not going to support the old one anymore.
Version 2 is not finished and I've only implemented few things for now, but it should be better when done.

Leave the manual overclock function untouched for now (it won't do anything anyway) and test if it gets detected correctly and if the P-States work. Normally you would want to set DID lower than default to enable overclock mode. FID is recalculated automatically so you have the same target frequency (or as close as possible).

ZenStates_2.0.0_debug_20200529.zip

@alexantone
Copy link

alexantone commented May 29, 2020 via email

@irusanov
Copy link
Owner

It looks like this:

image

Only changed things are applied, e.g. if you don't change anything in the manual overclock section it gets ignored when Apply is clicked. Not very intuitive, I believe.
Wondering how I could make it more user-friendly.

@Freekers
Copy link
Author

I'm unsure what safe voltages would be for my 4800H. What would be your recommendation?

Additionally, I can only select All Cores or Core0,1,2,3 whereas the 4800H is an 8 core CPU.

@irusanov
Copy link
Owner

The manual overclock won't work for the 4000 series, because I don't know the commands for it, also don't know if it is possible at all. You can only play with P-States for now, if they get respected by the CPU.

@Freekers
Copy link
Author

Freekers commented Jun 1, 2020

I don't notice any difference. It seems the CPU boosts past the P0 state. Perhaps I'm doing something wrong. Let's wait for the feedback of @alexantone

@irusanov
Copy link
Owner

irusanov commented Jun 1, 2020

Usually on these APUs you need to change the DID to something lower than the default, then the CPU goes into OC mode, but this means it would stay at that fixed frequency. I haven't found any other method to control the frequency.
Not sure if this trick works on the 4000 anymore, don't have one to test.

Changing power limits might have some effect, but they are not available in the new app yet.

@alexantone
Copy link

alexantone commented Jun 1, 2020 via email

@irusanov
Copy link
Owner

irusanov commented Jun 1, 2020

Yes, that MSR is used for controlling the PB bit, but last time I tried it didn't work either. It just gets ignored.

@alexantone
Copy link

alexantone commented Jun 2, 2020 via email

@irusanov
Copy link
Owner

irusanov commented Jun 3, 2020

That's a good news. It was working on the 1000 series before, then stopped after one of the AGESA updates. Currently, you can't do much on the 1800X with new bios/AGESA. Most of the old commands don't work anymore.

I'm afraid the mobile chips are also almost completely locked and not much can be changed, unfortunately :( Even though you can successfully change some parameters, they are not respected by the CPU. It's almost completely autonomous.

@yutouyes
Copy link

yutouyes commented Jul 23, 2020

It looks like this:

image

Only changed things are applied, e.g. if you don't change anything in the manual overclock section it gets ignored when Apply is clicked. Not very intuitive, I believe.
Wondering how I could make it more user-friendly.

HI. My device is equipped with R5 4600H. Both Zenstates and aida64 say default voltage is 1.219v, but CPU-Z shows the core vid is up to 1.325v.
defult
defult_vid
Then I try to undervolt and aida64 shows the same voltage as what Zenstates sets. But CPU-Z still shows a 1.325v Core VID.
down
down_vid
Anything I can do?

@irusanov
Copy link
Owner

irusanov commented Aug 3, 2020

Probably manual OC does not work or it depends on some other option.
Have you tried to use the P-States instead? Also trying the old trick of decreasing DID e.g. from 4 to 2 and then setting P0?

Attached is the latest beta build, but I don't think it will make any difference. I might get a Renoir myself to try.
Can you tell me if the Manual OC mode checkbox is checked or if unchecked - does it stay checked when you enabled it and click Apply button?
ZenStates_2.0.0_debug_20200801.zip

@Xibit1990
Copy link

Xibit1990 commented Aug 3, 2020

Probably manual OC does not work or it depends on some other option.
Have you tried to use the P-States instead? Also trying the old trick of decreasing DID e.g. from 4 to 2 and then setting P0?

Attached is the latest beta build, but I don't think it will make any difference. I might get a Renoir myself to try.
Can you tell me if the Manual OC mode checkbox is checked or if unchecked - does it stay checked when you enabled it and click Apply button?
ZenStates_2.0.0_debug_20200801.zip

I ve got a Ryzen 4800H mobile on an ASUS A15 (506IV with 309 BIOS).
With your latest release I can uncheck "En" - Box to disable the manual overclock. However I tried different P-States settings with different VID and DIDs it didnt changend anything. I tried different workloud to test it, but sadly it didnt accept the settings.

I hope it helps you. I am also interested in this topic.

@irusanov
Copy link
Owner

irusanov commented Aug 3, 2020

Have anyone tried if Ryzen Master work on these mobile CPUs?
PS: Apparently not, but you can try this tool: https://github.com/sbski/Renoir-Mobile-Tuning
It's basically a GUI wrapper for ryzenadj.

I don't think ZenStates will work on mobile, unless I get a Renoir-based laptop which I don't need. The command IDs seem to be completely different and are probably the same as on previous mobile chips. It's not advisable to run these tools on mobiles. I will have to probably add mobile CPUs to the unsupported ones, unless I get a chance to actually test anything on a real system. Otherwise it might be even dangerous for these APUs.

I have found one reasonably specced Lenovo laptop, but have to pay 700+ euro for something I don't need.

I can't find any evidence it's possible to set higher frequencies on the mobile chips, only power limits.

@yutouyes
Copy link

yutouyes commented Aug 4, 2020

Have anyone tried if Ryzen Master work on these mobile CPUs?
PS: Apparently not, but you can try this tool: https://github.com/sbski/Renoir-Mobile-Tuning
It's basically a GUI wrapper for ryzenadj.

I don't think ZenStates will work on mobile, unless I get a Renoir-based laptop which I don't need. The command IDs seem to be completely different and are probably the same as on previous mobile chips. It's not advisable to run these tools on mobiles. I will have to probably add mobile CPUs to the unsupported ones, unless I get a chance to actually test anything on a real system. Otherwise it might be even dangerous for these APUs.

I have found one reasonably specced Lenovo laptop, but have to pay 700+ euro for something I don't need.

I can't find any evidence it's possible to set higher frequencies on the mobile chips, only power limits.

Ryzen Master is unsupported in mobile ryzen.
And the RMT as well as https://www.ryzencontroller.com/ can work in 4600H very well, but both of them lack the
ability of undervolting.

@yutouyes
Copy link

yutouyes commented Aug 4, 2020

Probably manual OC does not work or it depends on some other option.
Have you tried to use the P-States instead? Also trying the old trick of decreasing DID e.g. from 4 to 2 and then setting P0?

Yep I changed the P0 from 1.219 to lower, and nope, doesn't work. 4 to 2 doesn't play a role, either.

Can you tell me if the Manual OC mode checkbox is checked or if unchecked - does it stay checked when you enabled it and click Apply button?

By default it is unchecked. When I tried to enable OC and apply, it gave me an error. Then it returned unchecked.
OC_failed

@irusanov
Copy link
Owner

irusanov commented Aug 4, 2020

@yutouyes Yes, the command for forcing manual oc mode fails. It's either unsupported or has a different ID.
There also might be no support for voltage change on mobile chips which would be pity.
It seems you can lower the voltage by lowering the limits, but that also kills max boost frequency and I guess people want to keep that boost, but reduce the maximum voltage.

If I get a chance to test on an actual laptop, I will try to find something useful. Until then there's nothing I can do.
I'm tempted to buy a cheaper ryzen 4000 laptop, but the price (700 euro) is more than the average salary in the country and more than 2 times higher than the minimum wage. So it's not that cheap of an experiment.

The mobile variant of the app should probably have a completely different CPU tab though.

If someone feels like experimenting, then you can try the ids from this table: https://github.com/flygoat/ryzen_nb_smu and use either that tool to send the desired command and arguments or my SMUDebugTool, but I will have to release the new version with Renoir support first.

@irusanov
Copy link
Owner

irusanov commented Aug 4, 2020

Pushed a new release of the debug tool with Renoir support (desktop). It should start on mobile as well, but OC frequency and voltage won't work. I will have to split the detection by socket as well and add another logic if mobile is detected.
You can now test SMU commands from this table: https://github.com/flygoat/ryzen_nb_smu, but keep in mind this is dangerous and you can potentially kill your CPU if something doesn't match and you execute an unknown command which e.g. sets some voltage. First 4 commands should be safe to execute though.

https://github.com/irusanov/SMUDebugTool/releases/

PS: Could someone get me a report from SMUDebugTool (v1.2.7)?
Go to Info tab and click Export, then attach the generated json file found in the same directory where the app is.
Thanks!

Should look like this:

{
  "AppVersion": "1.2.7.0",
  "OSVersion": "Microsoft Windows 10 Pro",
  "CpuId": "870F10",
  "CpuCodeName": "Matisse",
  "CpuName": "AMD Ryzen 9 3900X 12-Core Processor",
  "ExtendedModel": "00000071",
  "PackageType": 2,
  "CCDCount": "2",
  "CCXCount": "4",
  "NumCoresInCCX": 3,
  "FusedCoreCount": 12,
  "PhysicalCoreCount": 16,
  "Threads": 24,
  "MbVendor": "ASUSTeK COMPUTER INC.",
  "MbName": "CROSSHAIR VI HERO",
  "BiosVersion": "7803",
  "Microcode": "08701021",
  "SmuVersion": "46.62.00",
  "Mailboxes": [
    {
      "MsgAddress": "0x03B10524",
      "RspAddress": "0x03B10570",
      "ArgAddress": "0x03B10A40"
    },
    {
      "MsgAddress": "0x03B10528",
      "RspAddress": "0x03B10574",
      "ArgAddress": "0x03B10A60"
    },
    {
      "MsgAddress": "0x03B10530",
      "RspAddress": "0x03B1057C",
      "ArgAddress": "0x03B109C4"
    }
  ]
}

@yutouyes
Copy link

yutouyes commented Aug 5, 2020

@irusanov

{
"AppVersion": "1.2.7.0",
"OSVersion": "Microsoft Windows 10 Pro",
"CpuId": "860F01",
"CpuCodeName": "Renoir",
"CpuName": "AMD Ryzen 5 4600H with Radeon Graphics",
"ExtendedModel": "00000060",
"PackageType": 0,
"CCDCount": "1",
"CCXCount": "2",
"NumCoresInCCX": 3,
"FusedCoreCount": 6,
"PhysicalCoreCount": 12,
"Threads": 12,
"MbVendor": "Standard",
"MbName": "GK5NR0O",
"BiosVersion": "N.1.10.T03STD00",
"Microcode": "08600103",
"SmuVersion": "55.64.00",
"Mailboxes": [
{
"MsgAddress": "0x03B10A20",
"RspAddress": "0x03B10A80",
"ArgAddress": "0x03B10A88"
},
{
"MsgAddress": "0x03B10A24",
"RspAddress": "0x03B10A84",
"ArgAddress": "0x03B10A8C"
}
]
}

@Falcosc
Copy link

Falcosc commented Feb 22, 2021

Would be nice to know if the Desktop Renoir have a different SMU Version behause our Mobile variants already have different SMU versions.

{
  "AppVersion": "1.2.9.0",
  "OSVersion": "Microsoft Windows 10 Enterprise",
  "CpuId": "860F01",
  "CpuCodeName": "Renoir",
  "CpuName": "AMD Ryzen 7 PRO 4750U with Radeon Graphics",
  "ExtendedModel": "00000060",
  "PackageType": 0,
  "CCDCount": 1,
  "CCXCount": 1,
  "NumCoresInCCX": 8,
  "FusedCoreCount": 8,
  "PhysicalCoreCount": 4,
  "Threads": 16,
  "MbVendor": "LENOVO",
  "MbName": "20UJS0D300",
  "BiosVersion": "R1CET40W(1.09 )",
  "Microcode": "08600104",
  "SmuVersion": "55.65.00",
  "Mailboxes": [
    {
      "MsgAddress": "0x03B10A20",
      "RspAddress": "0x03B10A80",
      "ArgAddress": "0x03B10A88"
    },
    {
      "MsgAddress": "0x03B10A24",
      "RspAddress": "0x03B10A84",
      "ArgAddress": "0x03B10A8C"
    }
  ]
}

@irusanov
Copy link
Owner

irusanov commented Feb 23, 2021

I have some Renoir reports from users

Desktop 4650G, SMU 55.68.00
Mobile  4700U, SMU 55.69.00
Mobile  4500U, SMU 55.71.0
Desktop 4650G, SMU 55.77.0

The detected versions might be inaccurate though, because some of the reports are from older versions of ZenTimings prior to adding support for both SMU version formats.
I also need to rewrite the Mailbox detection algorithm, since it's kind of lame at the moment.

To me, mobile and desktop Renoir seem to be on the same SMU node. Generally things with Zen2 and Zen3 seem to be more consistent than with previous generations.

@Falcosc
Copy link

Falcosc commented Feb 23, 2021

Spicy!

According to the ryzen master reverse engineering result Desktop Renoir does still use other message Ids then Mobile Renoir. Or is my conclusion wrong?

@irusanov
Copy link
Owner

If you're only interested in Mobile Renoir, then you can check the Renoir Mobile Tuning: https://github.com/sbski/Renoir-Mobile-Tuning/blob/Update-1.0/renoir_tuning_utility/renoir_tuning_utility/PowerSettings.cs
He's only using the MP1 commands to set limits, except for the power table (which is the only thing from SMU I use in ZenTimings).
Ryzen Master is using the RSMU/PSMU, but I don't know if the commands are the same for Mobile.

@Falcosc
Copy link

Falcosc commented Feb 23, 2021

Thank you, but Renoir Mobile Tuning values are already the result of the joint effort between sbski and FlyGoat. So nothing new there :)

Edit:

I'm not sure if I'm too late, but I can confirm the message Ids from your spreadsheet to be working

msg result
0x32 sets PPT LIMIT FAST mW
0x33 sets PPT LIMIT SLOW mW
0x3A sets EDC LIMIT VDD mA
0x3B sets EDC LIMIT SOC mA
0x38 sets TDC LIMIT VDD mA
0x39 sets TDC LIMIT SOC mA
0x17 reject
0x18 ok
0x19 reject
0x1a reject
0x82 0
0xe 1600 in mhz
0x42 4200 in mhz
0xF 0x3f800000
0x3F rejected (did test following values: 0x3f800000, 0x3f700000, 0x3f900000, 0x1, 0x0)

@irusanov
Copy link
Owner

irusanov commented Feb 25, 2021

For disable prochot (0x17) you might need an argument 0x1000000, but I don't know if it works on Renoir and it's not that important anyway. It's only useful on extreme cooling and not recommended.

Zen2 (Matisse) and Zen3 (Vermeer) combine that "disable prochot" command with "enable manual overclock" (with default 0x0 argument).
"Enable prochot" is also used to "disable manual oc" and switch to "auto".
Setting oc mode appears to be blocked on APUs and can only control the manual OC from bios, I guess it overrides something, which is not possible at runtime.

0x19 and 0x1A should only work if you manage to enable manual oc mode first. Same for 0x1B.
0x82 - not sure if 0 means true or false (Edit: it should be "false" - value & 1)

@Falcosc
Copy link

Falcosc commented Feb 25, 2021

I did search for prochot adjustments because even with tctl, prochot gets trigger on my system. Prochot is very painful because it does apply maximum throttle which nearly freezes the system.

But I guess found the issue. Seams like tctl is to slow. Here is my contribution to this topic

--tctl-temp / THM Limit (Core, GFX, SOC)

Put your temperature target here. But be careful there is a hidden prochot failsafe thermal limit.
If you do select to high values, proc-hot gets triggered and limit your CPU power below 4W, which nearly freezes the system. So your number 1 goal should be proc-hot prevention, because all the small tuning gains means nothing, if the overall system experience does suck.

For example

  • my device has a max temp of 100, if I enter 102°C only 100 gets applied.
  • I guess my prochot is around 102-105°C, you might guess you are safe with 100°C? Wrong!
  • Sustained workloads are fine, temperature get managed to stay between 99.9 to 100.3
  • Workload demand spikes are not fine, because the thermal management has a little delay around 1000ms. And this is a problem with extreme changes in workload. Even with sensor polling of only 2000ms I could get single readings of 103°C, proc-hot gets triggered and the whole system gets limited to 4W for some seconds
  • Using 97°C did fix the proc-hot issue for transient workloads

Because the prochot temperature limit is unknown you need to monitor if this limit got applied during an unexpected system slowdown. HWiNFO has a Value for this Thermal Throttling (PROCHOT EXT) and Thermal Throttling (PROCHOT CPU). Lower your thermal Limit step by step untill you don't get prochot limits anymore.

quote from Renoir Tuning Guide

@Falcosc
Copy link

Falcosc commented Mar 16, 2021

I did try to find out if Pstates are used at all at Renoir.
Value range is fitting. For my CPU anything above 4200Mhz is out of spec and each value above don't get saved, even 4210Mhz. So looks like Pstate was found on the correct position.

However, I couldn't get PState to do anything.
I did set all of them to 1000, 2000, 3000 and 3900

After setting PState values bit 21 get set (LockTscToCurrentP0: lock the TSC to the current P0 frequency)

This doesn't help either. Maybe it does prevent it from working.

So I did also try to see what's happening without it.
So disable bit 21 after setting P0 and still nothing happens

Then I did repeat all these tests with bit 25 CpbDis: core performance boost disable

But the only thing which this is doing: applying the 1700Mhz Limit. Even after and during PState value changes and with or without bit 21.

Seams like the mobile CPUs do ignore the values which can be written and read from the usual PState registers.

The interesting thing is that Windows can not limit the Core frequency either.
On Intel you can do it by:

  • Frequency
  • or by Percent

Both options are hidden on my AMD installation, so I did enable the GUI options

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\bc5038f7-23e0-4960-96da-33abaf5935ec
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\75b0ae3f-bce0-45a7-8c89-c9611c25e100

But one thing does work:

  • Disable Boost (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\be337238-0d82-4146-a960-4f3749d470c7)

Surprise surprise, changing this value does automatically set bit 25 according to the picklist value. Thanks for the hint @alexantone we now know who windows is doing this.

Edit:
All tests were done with Cinebench R20 Single Core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants