Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
honjow committed Dec 10, 2023
1 parent a9734d0 commit 0e4955c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions backend/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,16 @@ def set_cpuTDP(self, value: int):

stapm_limit = tdp
fast_minit = tdp
slow_limit = tdp
tctl_temp = 90

command = f"{sys_ryzenadj_path} --stapm-limit={stapm_limit} --fast-limit={fast_minit} --tctl-temp={tctl_temp}"
os.system(command)
command = f"sudo {sys_ryzenadj_path} -a {stapm_limit} -b {fast_minit} -c {slow_limit} -f {tctl_temp}"
logging.info(f"set_cpuTDP command: {command}")
logging.info(f"set_cpuTDP {value}")
# os.system(command)
result = subprocess.getoutput(command)
logging.info(f"set_cpuTDP result: {result}")

return True
else:
return False
Expand Down

0 comments on commit 0e4955c

Please sign in to comment.