We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb9d92a commit d363667Copy full SHA for d363667
1 file changed
library/sensors/sensors_python.py
@@ -325,12 +325,18 @@ def fps() -> int:
325
@staticmethod
326
def fan_percent() -> float:
327
try:
328
+ # Try with psutil fans
329
fans = sensors_fans_percent()
330
if fans:
331
for name, entries in fans.items():
332
for entry in entries:
333
if "gpu" in (entry.label or name):
334
return entry.current
335
+
336
+ # Try with pyadl if psutil did not find GPU fan
337
+ if pyadl:
338
+ return pyadl.ADLManager.getInstance().getDevices()[0].getCurrentFanSpeed(
339
+ pyadl.ADL_DEVICE_FAN_SPEED_TYPE_PERCENTAGE)
340
except:
341
pass
342
0 commit comments