From 62e4627c5e60a9400723887586aebbe3d6caee1f Mon Sep 17 00:00:00 2001 From: antheas Date: Wed, 21 Feb 2024 13:16:39 +0100 Subject: [PATCH] allow for having tdp control enabled by default --- src/adjustor/hhd.py | 8 ++++++-- src/adjustor/settings.yml | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/adjustor/hhd.py b/src/adjustor/hhd.py index 035d873..1dfa14e 100644 --- a/src/adjustor/hhd.py +++ b/src/adjustor/hhd.py @@ -56,7 +56,10 @@ def __init__(self) -> None: self.enfoce_limits = True def settings(self) -> HHDSettings: - return {"tdp": {"general": load_relative_yaml("settings.yml")}} + out = {"tdp": {"general": load_relative_yaml("settings.yml")}} + if os.environ.get("HHD_ADJ_ENABLE_TDP"): + out['tdp']['general']['children']['enable']['default'] = True + return out def open( self, @@ -119,7 +122,8 @@ def autodetect(existing: Sequence[HHDPlugin]) -> Sequence[HHDPlugin]: drivers.append( SmuDriverPlugin( dev, - cpu, platform_profile=True, + cpu, + platform_profile=True, ) ) drivers.append( diff --git a/src/adjustor/settings.yml b/src/adjustor/settings.yml index 7bcc699..928beb1 100644 --- a/src/adjustor/settings.yml +++ b/src/adjustor/settings.yml @@ -10,6 +10,7 @@ children: enforce_limits: title: Enforce Device Limits type: bool + tags: [ expert ] default: True error: