@@ -133,16 +133,14 @@ def set_cpuTDP(self, value: int):
133
133
134
134
command = f"{ sys_ryzenadj_path } -a { stapm_limit } -b { fast_minit } -c { slow_limit } -f { tctl_temp } "
135
135
command_args = command .split ()
136
- logging .debug (f"set_cpuTDP command: { command } " )
137
- logging .debug (f"set_cpuTDP { value } " )
136
+ logging .info (f"set_cpuTDP command: { command } " )
137
+ logging .info (f"set_cpuTDP { value } " )
138
138
process = subprocess .run (command_args , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
139
139
stdout , stderr = process .stdout .decode ('utf-8' ), process .stderr .decode ('utf-8' )
140
- logging .debug (f"set_cpuTDP result:\n { stdout } " )
140
+ logging .info (f"set_cpuTDP result:\n { stdout } " )
141
141
if stderr :
142
142
logging .error (f"set_cpuTDP error:\n { stderr } " )
143
143
144
- self .set_platform_profile (value )
145
-
146
144
return True
147
145
else :
148
146
return False
@@ -394,26 +392,5 @@ def get_ryzenadj_info(self):
394
392
except Exception as e :
395
393
logging .error (e )
396
394
return f"get_ryzenadj_info error:\n { e } "
397
-
398
- def set_platform_profile (self , tdp ):
399
- # if PLATFORM_PROFILE_PATH is not a file
400
- if not os .path .exists (PLATFORM_PROFILE_PATH ) or not os .path .isfile (PLATFORM_PROFILE_CHOICES_PATH ):
401
- return
402
- try :
403
- # read platform_profile_choices
404
- with open (PLATFORM_PROFILE_CHOICES_PATH , 'r' ) as file :
405
- choices = file .read ().strip ().split ()
406
- logging .debug (f"platform_profile_choices { choices } " )
407
- if tdp <= 12 :
408
- profile = choices [0 ]
409
- elif tdp < 20 :
410
- profile = choices [1 ]
411
- else :
412
- profile = choices [len (choices ) - 1 ]
413
- with open (PLATFORM_PROFILE_PATH , 'w' ) as file :
414
- logging .debug (f"set_platform_profile { profile } " )
415
- file .write (profile )
416
- except Exception as e :
417
- logging .error (f"set_platform_profile error:\n { e } " )
418
395
419
396
cpuManager = CPUManager ()
0 commit comments