File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -323,7 +323,8 @@ def fan_percent(cls) -> float:
323323 try :
324324 for sensor in gpu_to_use .Sensors :
325325 if sensor .SensorType == Hardware .SensorType .Control :
326- return float (sensor .Value )
326+ if sensor .Value :
327+ return float (sensor .Value )
327328 except :
328329 pass
329330
@@ -339,8 +340,11 @@ def frequency(cls) -> float:
339340
340341 try :
341342 for sensor in gpu_to_use .Sensors :
342- if sensor .SensorType == Hardware .SensorType .Control :
343- pass
343+ if sensor .SensorType == Hardware .SensorType .Clock :
344+ # Keep only real core clocks, ignore effective core clocks
345+ if "Core" in str (sensor .Name ) and "Effective" not in str (sensor .Name ):
346+ if sensor .Value :
347+ return float (sensor .Value )
344348 except :
345349 pass
346350
You can’t perform that action at this time.
0 commit comments