Skip to content

Commit

Permalink
allow for having tdp control enabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
antheas committed Feb 21, 2024
1 parent c942ea8 commit 62e4627
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/adjustor/hhd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions src/adjustor/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ children:
enforce_limits:
title: Enforce Device Limits
type: bool
tags: [ expert ]
default: True

error:
Expand Down

0 comments on commit 62e4627

Please sign in to comment.