Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
Fix TDP settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
fewtarius committed Jul 20, 2024
1 parent d08d2df commit 4ea74a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-decky-tdp",
"version": "0.3.7-SF",
"version": "0.3.8-SF",
"description": "Very simple RyzenAdj Decky plugin",
"scripts": {
"build": "shx rm -rf dist && rollup -c --silent",
Expand Down
7 changes: 3 additions & 4 deletions py_modules/cpu_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,15 @@ def ryzenadj(tdp: int):
if advanced_options.get_setting(RogAllySettings.USE_WMI.value):
return rog_ally.ryzenadj(tdp)

fast_tdp = (tdp+2)*1000
tdp = tdp*1000

if RYZENADJ_PATH:
commands = [
RYZENADJ_PATH,
'--stapm-limit', f"{tdp}",
'--fast-limit', f"{fast_tdp}",
'--fast-limit', f"{tdp}",
'--slow-limit', f"{tdp}",
'--apu-slow-limit', f"{tdp}"
'--tctl-temp', f"90"
]

results = subprocess.call(commands)
Expand Down Expand Up @@ -233,4 +232,4 @@ def get_scaling_driver():
return scaling_driver
except Exception as e:
logging.error(f'{__name__} get_scaling_driver {e}')
return ''
return ''

0 comments on commit 4ea74a1

Please sign in to comment.