adjustor 3.6.1__tar.gz → 3.6.2__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. {adjustor-3.6.1/src/adjustor.egg-info → adjustor-3.6.2}/PKG-INFO +1 -1
  2. {adjustor-3.6.1 → adjustor-3.6.2}/pyproject.toml +1 -1
  3. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/core/fan/core.py +8 -5
  4. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/core/fan/utils.py +6 -3
  5. {adjustor-3.6.1 → adjustor-3.6.2/src/adjustor.egg-info}/PKG-INFO +1 -1
  6. {adjustor-3.6.1 → adjustor-3.6.2}/LICENSE +0 -0
  7. {adjustor-3.6.1 → adjustor-3.6.2}/MANIFEST.in +0 -0
  8. {adjustor-3.6.1 → adjustor-3.6.2}/readme.md +0 -0
  9. {adjustor-3.6.1 → adjustor-3.6.2}/setup.cfg +0 -0
  10. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/__init__.py +0 -0
  11. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/__main__.py +0 -0
  12. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/core/__init__.py +0 -0
  13. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/core/acpi.py +0 -0
  14. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/core/alib.py +0 -0
  15. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/core/const.py +0 -0
  16. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/core/fan/__init__.py +0 -0
  17. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/core/fan/__main__.py +0 -0
  18. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/core/fan/alg.py +0 -0
  19. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/core/lenovo.py +0 -0
  20. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/core/platform.py +0 -0
  21. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/__init__.py +0 -0
  22. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/amd/__init__.py +0 -0
  23. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/amd/power-profiles-daemon.dbus.xml.in +0 -0
  24. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/amd/ppd.py +0 -0
  25. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/amd/settings.yml +0 -0
  26. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/asus/__init__.py +0 -0
  27. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/asus/settings.yml +0 -0
  28. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/general/__init__.py +0 -0
  29. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/general/settings.yml +0 -0
  30. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/lenovo/__init__.py +0 -0
  31. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/lenovo/settings.yml +0 -0
  32. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/smu/__init__.py +0 -0
  33. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/smu/qam.yml +0 -0
  34. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/drivers/smu/smu.yml +0 -0
  35. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/events.py +0 -0
  36. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/fuse/__init__.py +0 -0
  37. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/fuse/driver.py +0 -0
  38. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/fuse/gpu.py +0 -0
  39. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/fuse/utils.py +0 -0
  40. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/hhd.py +0 -0
  41. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/i18n.py +0 -0
  42. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor/settings.yml +0 -0
  43. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor.egg-info/SOURCES.txt +0 -0
  44. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor.egg-info/dependency_links.txt +0 -0
  45. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor.egg-info/entry_points.txt +0 -0
  46. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor.egg-info/requires.txt +0 -0
  47. {adjustor-3.6.1 → adjustor-3.6.2}/src/adjustor.egg-info/top_level.txt +0 -0
  48. {adjustor-3.6.1 → adjustor-3.6.2}/usr/share/dbus-1/system.d/hhd-net.hadess.PowerProfiles.conf +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: adjustor
3
- Version: 3.6.1
3
+ Version: 3.6.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 = "3.6.1"
3
+ version = "3.6.2"
4
4
  authors = [
5
5
  { name="Kapenekakis Antheas", email="pypi@antheas.dev" },
6
6
  ]
@@ -99,9 +99,12 @@ def calculate_fan_speed(
99
99
 
100
100
 
101
101
  def set_fans_to_pwm(enable: bool, fan_info: FanInfo):
102
- for _, fn_enable, _ in fan_info["fans"]:
102
+ for _, fn_enable, _, legacy in fan_info["fans"]:
103
103
  with open(fn_enable, "w") as f:
104
- f.write("1" if enable else "0")
104
+ if enable:
105
+ f.write("1")
106
+ else:
107
+ f.write("0" if legacy else "2")
105
108
 
106
109
 
107
110
  def update_fan_speed(
@@ -121,10 +124,10 @@ def update_fan_speed(
121
124
  v_curr_int = min(255, max(0, int(v_curr * 255)))
122
125
  if not observe_only:
123
126
  if state is None or state["v_target_pwm"] != v_curr_int:
124
- for v_fn, _, _ in fan_info["fans"]:
127
+ for v_fn, _, _, _ in fan_info["fans"]:
125
128
  write_fan_speed(v_fn, v_curr_int)
126
129
 
127
- fan_speeds = [read_fan_speed(rpm_fn) for _, _, rpm_fn in fan_info["fans"] if rpm_fn]
130
+ fan_speeds = [read_fan_speed(rpm_fn) for _, _, rpm_fn, _ in fan_info["fans"] if rpm_fn]
128
131
  return (
129
132
  in_setpoint,
130
133
  {
@@ -153,7 +156,7 @@ def fan_worker(
153
156
  set_fans_to_pwm(True, info)
154
157
  while not should_exit.is_set():
155
158
  with lock:
156
- state_tmp = state or None # First time state will be empty
159
+ state_tmp = state or None # First time state will be empty
157
160
  in_setpoint, state_tmp = update_fan_speed(
158
161
  state_tmp, info, fan_curve, junction.is_set()
159
162
  )
@@ -1,6 +1,7 @@
1
1
  import os
2
2
 
3
- FAN_HWMONS = ["oxpec"]
3
+ FAN_HWMONS_LEGACY = ["oxpec"]
4
+ FAN_HWMONS = ["oxp_ec"]
4
5
  HWMON_DIR = "/sys/class/hwmon"
5
6
 
6
7
 
@@ -53,7 +54,7 @@ def find_fans():
53
54
  with open(f"{HWMON_DIR}/{hwmon}/name") as f:
54
55
  name = f.read().strip()
55
56
 
56
- if name not in FAN_HWMONS:
57
+ if name not in FAN_HWMONS and name not in FAN_HWMONS_LEGACY:
57
58
  continue
58
59
 
59
60
  for fn in os.listdir(f"{HWMON_DIR}/{hwmon}"):
@@ -73,6 +74,7 @@ def find_fans():
73
74
  f"{HWMON_DIR}/{hwmon}/{fn}",
74
75
  f"{HWMON_DIR}/{hwmon}/{fn}_enable",
75
76
  speed_fn,
77
+ name in FAN_HWMONS_LEGACY,
76
78
  )
77
79
  )
78
80
 
@@ -88,6 +90,7 @@ def read_fan_speed(path: str) -> int:
88
90
  with open(path, "r") as f:
89
91
  return int(f.read())
90
92
 
93
+
91
94
  def write_fan_speed(path: str, speed: int):
92
95
  with open(path, "w") as f:
93
- f.write(str(speed))
96
+ f.write(str(speed))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: adjustor
3
- Version: 3.6.1
3
+ Version: 3.6.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
File without changes