Skip to content

fix(ryzenadj): add refresh before get limit#18

Merged
ShadowApex merged 1 commit intoShadowBlip:mainfrom
honjow:refresh
May 12, 2025
Merged

fix(ryzenadj): add refresh before get limit#18
ShadowApex merged 1 commit intoShadowBlip:mainfrom
honjow:refresh

Conversation

@honjow
Copy link
Contributor

@honjow honjow commented Apr 22, 2025

It seems that by default, the limit value read by libryzenadj is cached, causing subsequent inability to read the real-time limit value.

4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z INFO  [powerstation::performance::gpu::amd::tdp] Set TDP
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Setting TDP to: 15
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Getting ppt slow limit
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Getting stapm limit
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Got stapm limit: 28.000002
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Setting stapm limit to 15000
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Set stapm limit to 15000
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Setting boost to: 0
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Getting stapm limit
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Got stapm limit: 28.000002
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Setting slow ppt limit to 28000
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Setting fast ppt limit to 35000
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z INFO  [powerstation::performance::gpu::amd::tdp] TDP set to 15
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z INFO  [powerstation::performance::gpu::amd::tdp] Get TDP
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.980Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Getting stapm limit
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.981Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Got stapm limit: 28.000002
4月 22 20:21:27 G1617-01 powerstation[53890]: 2025-04-22T12:21:27.981Z INFO  [powerstation::performance::gpu::amd::tdp] TDP is currently 28.000001907348633

By performing a refresh operation before obtaining the limit value, the issue is resolved.

4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.165Z INFO  [powerstation::performance::gpu::amd::tdp] Set TDP
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.165Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Setting TDP to: 10
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.165Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Getting ppt slow limit
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.165Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Getting stapm limit
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.166Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Got stapm limit: 10
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.166Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Setting stapm limit to 10000
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.166Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Set stapm limit to 10000
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.166Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Setting boost to: 0
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.166Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Getting stapm limit
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.167Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Got stapm limit: 10
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.167Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Setting slow ppt limit to 10000
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.167Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Setting fast ppt limit to 12500
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.167Z INFO  [powerstation::performance::gpu::amd::tdp] TDP set to 10
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.167Z INFO  [powerstation::performance::gpu::amd::tdp] Get TDP
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.167Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Getting stapm limit
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.179Z DEBUG [powerstation::performance::gpu::amd::ryzenadj] Got stapm limit: 10
4月 22 20:47:59 G1617-01 powerstation[68422]: 2025-04-22T12:47:59.179Z INFO  [powerstation::performance::gpu::amd::tdp] TDP is currently 10

Copy link
Contributor

@pastaq pastaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for identifying and fixing this issue. I'll approve this here, but it might make more sense to fix this in libryzenadj directly.

@honjow
Copy link
Contributor Author

honjow commented Apr 22, 2025

Thanks for identifying and fixing this issue. I'll approve this here, but it might make more sense to fix this in libryzenadj directly.

Because I am worried this might be the expected behavior of ryzenadj.

@ShadowApex ShadowApex merged commit 5710ffe into ShadowBlip:main May 12, 2025
1 check passed
@github-actions
Copy link

🎉 This PR is included in version 0.4.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants