adjustor 2.1.1__tar.gz → 2.1.2__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. {adjustor-2.1.1/src/adjustor.egg-info → adjustor-2.1.2}/PKG-INFO +1 -1
  2. {adjustor-2.1.1 → adjustor-2.1.2}/pyproject.toml +1 -1
  3. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/drivers/asus/__init__.py +1 -1
  4. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/hhd.py +17 -11
  5. {adjustor-2.1.1 → adjustor-2.1.2/src/adjustor.egg-info}/PKG-INFO +1 -1
  6. {adjustor-2.1.1 → adjustor-2.1.2}/LICENSE +0 -0
  7. {adjustor-2.1.1 → adjustor-2.1.2}/MANIFEST.in +0 -0
  8. {adjustor-2.1.1 → adjustor-2.1.2}/readme.md +0 -0
  9. {adjustor-2.1.1 → adjustor-2.1.2}/setup.cfg +0 -0
  10. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/__init__.py +0 -0
  11. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/__main__.py +0 -0
  12. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/core/__init__.py +0 -0
  13. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/core/acpi.py +0 -0
  14. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/core/alib.py +0 -0
  15. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/core/const.py +0 -0
  16. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/core/lenovo.py +0 -0
  17. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/core/platform.py +0 -0
  18. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/drivers/__init__.py +0 -0
  19. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/drivers/asus/settings.yml +0 -0
  20. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/drivers/lenovo/__init__.py +0 -0
  21. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/drivers/lenovo/settings.yml +0 -0
  22. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/drivers/smu/__init__.py +0 -0
  23. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/drivers/smu/qam.yml +0 -0
  24. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/drivers/smu/smu.yml +0 -0
  25. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/events.py +0 -0
  26. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/settings.yml +0 -0
  27. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor/utils.py +0 -0
  28. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor.egg-info/SOURCES.txt +0 -0
  29. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor.egg-info/dependency_links.txt +0 -0
  30. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor.egg-info/entry_points.txt +0 -0
  31. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor.egg-info/requires.txt +0 -0
  32. {adjustor-2.1.1 → adjustor-2.1.2}/src/adjustor.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: adjustor
3
- Version: 2.1.1
3
+ Version: 2.1.2
4
4
  Summary: Adjustor, a userspace program for managing the TDP of handheld devices.
5
5
  Author-email: Kapenekakis Antheas <pypi@antheas.dev>
6
6
  Project-URL: Homepage, https://github.com/hhd-dev/adjustor
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "adjustor"
3
- version = "2.1.1"
3
+ version = "2.1.2"
4
4
  authors = [
5
5
  { name="Kapenekakis Antheas", email="pypi@antheas.dev" },
6
6
  ]
@@ -98,7 +98,7 @@ def disable_fan_curve():
98
98
 
99
99
  class AsusDriverPlugin(HHDPlugin):
100
100
  def __init__(self) -> None:
101
- self.name = f"asus"
101
+ self.name = f"adjustor_asus"
102
102
  self.priority = 6
103
103
  self.log = "adja"
104
104
  self.enabled = False
@@ -22,7 +22,7 @@ CONFLICTING_PLUGINS = {
22
22
 
23
23
 
24
24
  class AdjustorInitPlugin(HHDPlugin):
25
- def __init__(self) -> None:
25
+ def __init__(self, use_acpi_call: bool = True) -> None:
26
26
  self.name = f"adjustor_init"
27
27
  self.priority = 5
28
28
  self.log = "adji"
@@ -31,6 +31,7 @@ class AdjustorInitPlugin(HHDPlugin):
31
31
  self.safe_mode = False
32
32
  self.enabled = False
33
33
  self.action_enabled = False
34
+ self.use_acpi_call = use_acpi_call
34
35
 
35
36
  def open(self, emit: Emitter, context: Context):
36
37
  self.context = context
@@ -78,15 +79,16 @@ class AdjustorInitPlugin(HHDPlugin):
78
79
  self.enabled = False
79
80
  return
80
81
 
81
- initialize()
82
- if not check_perms():
83
- conf["hhd.settings.tdp_enable"] = False
84
- conf["tdp.tdp.tdp_error"] = (
85
- "Can not write to 'acpi_call'. It is required for TDP."
86
- )
87
- self.failed = True
88
- self.enabled = False
89
- return
82
+ if self.use_acpi_call:
83
+ initialize()
84
+ if not check_perms():
85
+ conf["hhd.settings.tdp_enable"] = False
86
+ conf["tdp.tdp.tdp_error"] = (
87
+ "Can not write to 'acpi_call'. It is required for TDP."
88
+ )
89
+ self.failed = True
90
+ self.enabled = False
91
+ return
90
92
 
91
93
  self.failed = False
92
94
  self.enabled = True
@@ -177,10 +179,12 @@ def autodetect(existing: Sequence[HHDPlugin]) -> Sequence[HHDPlugin]:
177
179
  with open("/proc/cpuinfo") as f:
178
180
  cpuinfo = f.read().strip()
179
181
 
182
+ use_acpi_call = False
180
183
  drivers_matched = False
181
184
  if prod == "83E1":
182
185
  drivers.append(LenovoDriverPlugin())
183
186
  drivers_matched = True
187
+ use_acpi_call = True
184
188
 
185
189
  if "ROG Ally RC71L" in prod:
186
190
  drivers.append(AsusDriverPlugin())
@@ -205,6 +209,7 @@ def autodetect(existing: Sequence[HHDPlugin]) -> Sequence[HHDPlugin]:
205
209
  ),
206
210
  )
207
211
  drivers_matched = True
212
+ use_acpi_call = True
208
213
 
209
214
  if not drivers_matched:
210
215
  for name, (dev, cpu) in CPU_DATA.items():
@@ -219,6 +224,7 @@ def autodetect(existing: Sequence[HHDPlugin]) -> Sequence[HHDPlugin]:
219
224
  drivers.append(
220
225
  SmuQamPlugin(dev, ROG_ALLY_PP_MAP),
221
226
  )
227
+ use_acpi_call = True
222
228
  break
223
229
 
224
230
  if not drivers:
@@ -227,6 +233,6 @@ def autodetect(existing: Sequence[HHDPlugin]) -> Sequence[HHDPlugin]:
227
233
 
228
234
  return [
229
235
  *drivers,
230
- AdjustorInitPlugin(),
236
+ AdjustorInitPlugin(use_acpi_call=use_acpi_call),
231
237
  AdjustorPlugin(),
232
238
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: adjustor
3
- Version: 2.1.1
3
+ Version: 2.1.2
4
4
  Summary: Adjustor, a userspace program for managing the TDP of handheld devices.
5
5
  Author-email: Kapenekakis Antheas <pypi@antheas.dev>
6
6
  Project-URL: Homepage, https://github.com/hhd-dev/adjustor
File without changes
File without changes
File without changes
File without changes
File without changes