TDP Limitation doesn't apply #135

Closed
opened 2023-12-08 10:58:38 +00:00 by aalfadhela · 3 comments

Expected Behaviour

When applying new tdp limits I should see it applied using sudo ryzenadj -i

Actual Behaviour

Before

TDP (sudo ryzenadj -i)

CPU Family: Rembrandt
SMU BIOS Interface Version: 17
Version: v0.14.0 
PM Table Version: 450004
|        Name         |   Value   |     Parameter      |
|---------------------|-----------|--------------------|
| STAPM LIMIT         |    28.000 | stapm-limit        |
| STAPM VALUE         |    11.573 |                    |
| PPT LIMIT FAST      |    28.000 | fast-limit         |
| PPT VALUE FAST      |    21.737 |                    |
| PPT LIMIT SLOW      |    28.000 | slow-limit         |
| PPT VALUE SLOW      |    20.152 |                    |
| StapmTimeConst      |       nan | stapm-time         |
| SlowPPTTimeConst    |       nan | slow-time          |
| PPT LIMIT APU       |    28.001 | apu-slow-limit     |
| PPT VALUE APU       |     0.000 |                    |
| TDC LIMIT VDD       |    50.000 | vrm-current        |
| TDC VALUE VDD       |    11.840 |                    |
| TDC LIMIT SOC       |    13.000 | vrmsoc-current     |
| TDC VALUE SOC       |     3.149 |                    |
| EDC LIMIT VDD       |   105.000 | vrmmax-current     |
| EDC VALUE VDD       |   114.548 |                    |
| EDC LIMIT SOC       |    17.000 | vrmsocmax-current  |
| EDC VALUE SOC       |     0.225 |                    |
| THM LIMIT CORE      |    80.000 | tctl-temp          |
| THM VALUE CORE      |    79.845 |                    |
| STT LIMIT APU       |     0.000 | apu-skin-temp      |
| STT VALUE APU       |     0.000 |                    |
| STT LIMIT dGPU      |     0.000 | dgpu-skin-temp     |
| STT VALUE dGPU      |     0.000 |                    |
| CCLK Boost SETPOINT |       nan | power-saving /     |
| CCLK BUSY VALUE     |       nan | max-performance    |

After

TDP (sudo ryzenadj -i)

CPU Family: Rembrandt
SMU BIOS Interface Version: 17
Version: v0.14.0 
PM Table Version: 450004
|        Name         |   Value   |     Parameter      |
|---------------------|-----------|--------------------|
| STAPM LIMIT         |    28.000 | stapm-limit        |
| STAPM VALUE         |    11.573 |                    |
| PPT LIMIT FAST      |    28.000 | fast-limit         |
| PPT VALUE FAST      |    21.737 |                    |
| PPT LIMIT SLOW      |    28.000 | slow-limit         |
| PPT VALUE SLOW      |    20.152 |                    |
| StapmTimeConst      |       nan | stapm-time         |
| SlowPPTTimeConst    |       nan | slow-time          |
| PPT LIMIT APU       |    28.001 | apu-slow-limit     |
| PPT VALUE APU       |     0.000 |                    |
| TDC LIMIT VDD       |    50.000 | vrm-current        |
| TDC VALUE VDD       |    11.840 |                    |
| TDC LIMIT SOC       |    13.000 | vrmsoc-current     |
| TDC VALUE SOC       |     3.149 |                    |
| EDC LIMIT VDD       |   105.000 | vrmmax-current     |
| EDC VALUE VDD       |   114.548 |                    |
| EDC LIMIT SOC       |    17.000 | vrmsocmax-current  |
| EDC VALUE SOC       |     0.225 |                    |
| THM LIMIT CORE      |    80.000 | tctl-temp          |
| THM VALUE CORE      |    79.845 |                    |
| STT LIMIT APU       |     0.000 | apu-skin-temp      |
| STT VALUE APU       |     0.000 |                    |
| STT LIMIT dGPU      |     0.000 | dgpu-skin-temp     |
| STT VALUE dGPU      |     0.000 |                    |
| CCLK Boost SETPOINT |       nan | power-saving /     |
| CCLK BUSY VALUE     |       nan | max-performance    |

powertools.log

10:36:32 [DEBUG] (5) powertools::settings::general: Set CPUs
10:36:32 [DEBUG] (5) powertools::settings::general: Set GPU
10:36:32 [ERROR] Settings on_set() err:
        GPU setting error: RyzenAdj get_fast_value() err: ryzenadj table init failed: -1, set functions might still work,
        GPU setting error: RyzenAdj get_slow_value() err: ryzenadj table init failed: -1, set functions might still work,

10:36:32 [DEBUG] (5) powertools::api::handler: api_worker is saving...

Steps To Reproduce

  1. Go to PowerTools
  2. Enable PowerPlay Limits
  3. Slid SlowPPT and FastyPPT to lower value
  4. Check sudo ryzenadj -i and powertools.log

Anything else?

OS: Linux 6.6.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 04 Dec 2023 00:29:19 +0000 x86_64 GNU/Linux

Device: Ayaneo Air Plus (6800U, 16GB)

RyzenAdj: 0.14.0

Applying tdp values using ryzenadj works without any issues.

Version

1.5.0-ng1-dbg

Platform

Ayaneo Air Plus (Arch Linux)

OS

Not listed

### Expected Behaviour When applying new tdp limits I should see it applied using `sudo ryzenadj -i` ### Actual Behaviour ### Before #### TDP (sudo ryzenadj -i) ``` CPU Family: Rembrandt SMU BIOS Interface Version: 17 Version: v0.14.0 PM Table Version: 450004 | Name | Value | Parameter | |---------------------|-----------|--------------------| | STAPM LIMIT | 28.000 | stapm-limit | | STAPM VALUE | 11.573 | | | PPT LIMIT FAST | 28.000 | fast-limit | | PPT VALUE FAST | 21.737 | | | PPT LIMIT SLOW | 28.000 | slow-limit | | PPT VALUE SLOW | 20.152 | | | StapmTimeConst | nan | stapm-time | | SlowPPTTimeConst | nan | slow-time | | PPT LIMIT APU | 28.001 | apu-slow-limit | | PPT VALUE APU | 0.000 | | | TDC LIMIT VDD | 50.000 | vrm-current | | TDC VALUE VDD | 11.840 | | | TDC LIMIT SOC | 13.000 | vrmsoc-current | | TDC VALUE SOC | 3.149 | | | EDC LIMIT VDD | 105.000 | vrmmax-current | | EDC VALUE VDD | 114.548 | | | EDC LIMIT SOC | 17.000 | vrmsocmax-current | | EDC VALUE SOC | 0.225 | | | THM LIMIT CORE | 80.000 | tctl-temp | | THM VALUE CORE | 79.845 | | | STT LIMIT APU | 0.000 | apu-skin-temp | | STT VALUE APU | 0.000 | | | STT LIMIT dGPU | 0.000 | dgpu-skin-temp | | STT VALUE dGPU | 0.000 | | | CCLK Boost SETPOINT | nan | power-saving / | | CCLK BUSY VALUE | nan | max-performance | ``` ### After #### TDP (sudo ryzenadj -i) ``` CPU Family: Rembrandt SMU BIOS Interface Version: 17 Version: v0.14.0 PM Table Version: 450004 | Name | Value | Parameter | |---------------------|-----------|--------------------| | STAPM LIMIT | 28.000 | stapm-limit | | STAPM VALUE | 11.573 | | | PPT LIMIT FAST | 28.000 | fast-limit | | PPT VALUE FAST | 21.737 | | | PPT LIMIT SLOW | 28.000 | slow-limit | | PPT VALUE SLOW | 20.152 | | | StapmTimeConst | nan | stapm-time | | SlowPPTTimeConst | nan | slow-time | | PPT LIMIT APU | 28.001 | apu-slow-limit | | PPT VALUE APU | 0.000 | | | TDC LIMIT VDD | 50.000 | vrm-current | | TDC VALUE VDD | 11.840 | | | TDC LIMIT SOC | 13.000 | vrmsoc-current | | TDC VALUE SOC | 3.149 | | | EDC LIMIT VDD | 105.000 | vrmmax-current | | EDC VALUE VDD | 114.548 | | | EDC LIMIT SOC | 17.000 | vrmsocmax-current | | EDC VALUE SOC | 0.225 | | | THM LIMIT CORE | 80.000 | tctl-temp | | THM VALUE CORE | 79.845 | | | STT LIMIT APU | 0.000 | apu-skin-temp | | STT VALUE APU | 0.000 | | | STT LIMIT dGPU | 0.000 | dgpu-skin-temp | | STT VALUE dGPU | 0.000 | | | CCLK Boost SETPOINT | nan | power-saving / | | CCLK BUSY VALUE | nan | max-performance | ``` #### powertools.log ``` 10:36:32 [DEBUG] (5) powertools::settings::general: Set CPUs 10:36:32 [DEBUG] (5) powertools::settings::general: Set GPU 10:36:32 [ERROR] Settings on_set() err: GPU setting error: RyzenAdj get_fast_value() err: ryzenadj table init failed: -1, set functions might still work, GPU setting error: RyzenAdj get_slow_value() err: ryzenadj table init failed: -1, set functions might still work, 10:36:32 [DEBUG] (5) powertools::api::handler: api_worker is saving... ``` ### Steps To Reproduce 1. Go to PowerTools 2. Enable PowerPlay Limits 3. Slid SlowPPT and FastyPPT to lower value 4. Check `sudo ryzenadj -i` and powertools.log ### Anything else? **OS**: Linux 6.6.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 04 Dec 2023 00:29:19 +0000 x86_64 GNU/Linux **Device**: Ayaneo Air Plus (6800U, 16GB) **RyzenAdj**: 0.14.0 Applying tdp values using `ryzenadj` works without any issues. ### Version 1.5.0-ng1-dbg ### Platform Ayaneo Air Plus (Arch Linux) ### OS Not listed
aalfadhela added the
bug
label 2023-12-08 10:58:38 +00:00
Owner

You're using a dev version, so there could be a few reasons for RyzenAdj failing to initialize:

  1. libryzenadj is not available (it is not built with PowerTools except when in using the decky cli tool)
  2. you've got mismatched libryzenadj versions (PowerTools currently expects libryzenadj v0.12)
  3. it's broken because dev builds aren't stable
  4. cgroups are ruining everyone's fun
  5. ryzenadj just isn't happy about something

The decky loader logs (see journalctl -u plugin_loader.service) might contain the actual init error from ryzenadj. libryzenadj.so should be in ~/homebrew/plugins/PowerTools/bin/ (or at ./bin/libryzenadj.so relative to the PowerTools dir, if you've put it somewhere else).

Unfortunately support for platforms other than Steam Deck (LCD & OLED) are best-effort and poorly tested since I don't have any devices to test against.

  • Sent from my Ryzen 7 7840U laptop as I'm in the middle of setting it up to test out the ryzenadj functionality in PowerTools 🙃
You're using a dev version, so there could be a few reasons for RyzenAdj failing to initialize: 1. libryzenadj is not available (it is not built with PowerTools except when in using the decky cli tool) 2. you've got mismatched libryzenadj versions (PowerTools currently expects libryzenadj v0.12) 3. it's broken because dev builds aren't stable 4. cgroups are ruining everyone's fun 5. ryzenadj just isn't happy about something The decky loader logs (see `journalctl -u plugin_loader.service`) might contain the actual init error from ryzenadj. libryzenadj.so should be in `~/homebrew/plugins/PowerTools/bin/` (or at `./bin/libryzenadj.so` relative to the PowerTools dir, if you've put it somewhere else). Unfortunately support for platforms other than Steam Deck (LCD & OLED) are best-effort and poorly tested since I don't have any devices to test against. - Sent from my Ryzen 7 7840U laptop as I'm in the middle of setting it up to test out the ryzenadj functionality in PowerTools 🙃
Author

Version I am using is built using decky cli.

  1. libryzenadj.so is there.
  2. I tried copying 1.4.0 libryzenadj.so same issue.
  3. maybe 4 and 5 also maybe.

journalctl -u plugin_loader.service

Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: plugin_path: /home/ayaneo/homebrew/plugins
Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: import plugins from /home/ayaneo/homebrew/plugins
Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: found plugin: decky-steamgriddb
Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: Loaded SteamGridDB
Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: found plugin: SDH-PauseGames
Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: Loaded Pause Games
Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: found plugin: PowerTools
Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: Loaded PowerTools
Dec 09 11:39:53 ayaneo PluginLoader[2905]: Logging to: "/home/raed/powertools.log"
Dec 09 11:39:53 ayaneo PluginLoader[2905]: Starting back-end (powertools v1.5.0-ng1)
Dec 09 11:39:53 ayaneo PluginLoader[2905]: Current dir `/home/raed/homebrew/services`
Dec 09 11:39:57 ayaneo PluginLoader[2274]: [main][INFO]: Loading Decky frontend!

ls ~/homebrew/plugins/PowerTools/bin/libryzenadj.so

/home/ayaneo/homebrew/plugins/PowerTools/bin/libryzenadj.so

I'll continue testing and I'll make PR containing any fixes if I found any.

Thanks,

Version I am using is built using decky cli. 1. `libryzenadj.so` is there. 2. I tried copying 1.4.0 `libryzenadj.so` same issue. 3. maybe 4 and 5 also maybe. `journalctl -u plugin_loader.service` ``` Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: plugin_path: /home/ayaneo/homebrew/plugins Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: import plugins from /home/ayaneo/homebrew/plugins Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: found plugin: decky-steamgriddb Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: Loaded SteamGridDB Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: found plugin: SDH-PauseGames Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: Loaded Pause Games Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: found plugin: PowerTools Dec 09 11:39:52 ayaneo PluginLoader[2274]: [loader][INFO]: Loaded PowerTools Dec 09 11:39:53 ayaneo PluginLoader[2905]: Logging to: "/home/raed/powertools.log" Dec 09 11:39:53 ayaneo PluginLoader[2905]: Starting back-end (powertools v1.5.0-ng1) Dec 09 11:39:53 ayaneo PluginLoader[2905]: Current dir `/home/raed/homebrew/services` Dec 09 11:39:57 ayaneo PluginLoader[2274]: [main][INFO]: Loading Decky frontend! ``` `ls ~/homebrew/plugins/PowerTools/bin/libryzenadj.so` ``` /home/ayaneo/homebrew/plugins/PowerTools/bin/libryzenadj.so ``` I'll continue testing and I'll make PR containing any fixes if I found any. Thanks,
Owner

JSYK, I've made some fixes in a2d5103f12

I think the values being set for fast/slow PPT may have been wrong, which would explain why things weren't getting set correctly for you. You'll probably need to delete your limits_cache.ron file (should be in ~/homebrew/settings/PowerTools if it exists) to pick up the latest ranges.

I'm going to try to get ryzenadj v0.14 support added to the Rust wrapper I rely on for PowerTools so that I can also support some of the newer chips (e.g. the 7840U which I just added a config for).

JSYK, I've made some fixes in https://git.ngni.us/NG-SD-Plugins/PowerTools/commit/a2d5103f12892e2730de1dca952a12c83fb5ba3b I think the values being set for fast/slow PPT may have been wrong, which would explain why things weren't getting set correctly for you. You'll probably need to delete your limits_cache.ron file (should be in `~/homebrew/settings/PowerTools` if it exists) to pick up the latest ranges. I'm going to try to get ryzenadj v0.14 support added to the Rust wrapper I rely on for PowerTools so that I can also support some of the newer chips (e.g. the 7840U which I just added a config for).
NGnius added the
tbr
label 2024-02-03 02:49:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: NG-SD-Plugins/PowerTools#135
No description provided.