adjustor 3.4.4__tar.gz → 3.4.5__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {adjustor-3.4.4/src/adjustor.egg-info → adjustor-3.4.5}/PKG-INFO +1 -1
- {adjustor-3.4.4 → adjustor-3.4.5}/pyproject.toml +1 -1
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/amd/__init__.py +58 -17
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/amd/settings.yml +28 -7
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/asus/__init__.py +4 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/fuse/gpu.py +6 -3
- {adjustor-3.4.4 → adjustor-3.4.5/src/adjustor.egg-info}/PKG-INFO +1 -1
- {adjustor-3.4.4 → adjustor-3.4.5}/LICENSE +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/MANIFEST.in +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/readme.md +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/setup.cfg +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/__init__.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/__main__.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/core/__init__.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/core/acpi.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/core/alib.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/core/const.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/core/lenovo.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/core/platform.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/__init__.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/amd/power-profiles-daemon.dbus.xml.in +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/amd/ppd.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/asus/settings.yml +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/general/__init__.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/general/settings.yml +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/lenovo/__init__.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/lenovo/settings.yml +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/smu/__init__.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/smu/qam.yml +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/smu/smu.yml +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/events.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/fuse/__init__.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/fuse/driver.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/fuse/utils.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/hhd.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/i18n.py +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/settings.yml +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor.egg-info/SOURCES.txt +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor.egg-info/dependency_links.txt +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor.egg-info/entry_points.txt +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor.egg-info/requires.txt +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor.egg-info/top_level.txt +0 -0
- {adjustor-3.4.4 → adjustor-3.4.5}/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.4.
|
3
|
+
Version: 3.4.5
|
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
|
@@ -24,7 +24,7 @@ from adjustor.fuse.gpu import (
|
|
24
24
|
|
25
25
|
logger = logging.getLogger(__name__)
|
26
26
|
|
27
|
-
APPLY_DELAY = 0.
|
27
|
+
APPLY_DELAY = 0.25
|
28
28
|
|
29
29
|
|
30
30
|
def _ppd_client(emit, proc):
|
@@ -69,15 +69,16 @@ class AmdGPUPlugin(HHDPlugin):
|
|
69
69
|
self.initialized = False
|
70
70
|
self.supports_boost = False
|
71
71
|
self.supports_sched = False
|
72
|
+
self.min_freq = None
|
72
73
|
self.avail_scheds = {}
|
73
74
|
|
74
75
|
self.proc = None
|
75
76
|
self.t = None
|
76
77
|
|
77
78
|
self.queue = None
|
79
|
+
self.queue_gpu = None
|
78
80
|
self.sched_proc = None
|
79
81
|
self.old_ppd = False
|
80
|
-
self.old_gpu = None
|
81
82
|
self.old_freq = None
|
82
83
|
self.old_sched = "disabled"
|
83
84
|
self.old_boost = None
|
@@ -157,12 +158,29 @@ class AmdGPUPlugin(HHDPlugin):
|
|
157
158
|
}
|
158
159
|
|
159
160
|
self.initialized = True
|
160
|
-
|
161
|
+
|
162
|
+
# Initialize frequency settings
|
163
|
+
manual_freq = sets["enabled"]["children"]["mode"]["modes"]["manual"][
|
164
|
+
"children"
|
165
|
+
]["gpu_freq"]["modes"]["manual"]["children"]["frequency"]
|
166
|
+
upper_freq = sets["enabled"]["children"]["mode"]["modes"]["manual"][
|
167
|
+
"children"
|
168
|
+
]["gpu_freq"]["modes"]["upper"]["children"]["frequency"]
|
169
|
+
min_freq = sets["enabled"]["children"]["mode"]["modes"]["manual"]["children"][
|
161
170
|
"gpu_freq"
|
162
|
-
]["modes"]["
|
163
|
-
|
164
|
-
|
165
|
-
|
171
|
+
]["modes"]["range"]["children"]["min"]
|
172
|
+
max_freq = sets["enabled"]["children"]["mode"]["modes"]["manual"]["children"][
|
173
|
+
"gpu_freq"
|
174
|
+
]["modes"]["range"]["children"]["max"]
|
175
|
+
|
176
|
+
manual_freq["default"] = ((status.freq_min + status.freq_max) // 200) * 100
|
177
|
+
upper_freq["default"] = status.freq_max
|
178
|
+
min_freq["default"] = status.freq_min
|
179
|
+
max_freq["default"] = status.freq_max
|
180
|
+
for freq in (manual_freq, min_freq, max_freq, upper_freq):
|
181
|
+
freq["min"] = status.freq_min
|
182
|
+
freq["max"] = status.freq_max
|
183
|
+
self.min_freq = status.freq_min
|
166
184
|
|
167
185
|
self.supports_boost = status.cpu_boost is not None
|
168
186
|
if self.supports_boost:
|
@@ -196,7 +214,7 @@ class AmdGPUPlugin(HHDPlugin):
|
|
196
214
|
|
197
215
|
self.avail_scheds = {}
|
198
216
|
avail_pretty = {}
|
199
|
-
kernel_supports = os.path.isfile("/sys/kernel/sched_ext/state")
|
217
|
+
kernel_supports = os.path.isfile("/sys/kernel/sched_ext/state")
|
200
218
|
if kernel_supports:
|
201
219
|
for sched, pretty in sets["enabled"]["children"]["mode"]["modes"]["manual"][
|
202
220
|
"children"
|
@@ -273,8 +291,8 @@ class AmdGPUPlugin(HHDPlugin):
|
|
273
291
|
else:
|
274
292
|
self.close_ppd()
|
275
293
|
|
294
|
+
curr = time.perf_counter()
|
276
295
|
if conf["tdp.amd_energy.mode.mode"].to(str) == "auto":
|
277
|
-
curr = time.perf_counter()
|
278
296
|
if self.target != self.old_target:
|
279
297
|
self.old_target = self.target
|
280
298
|
self.queue = curr + APPLY_DELAY
|
@@ -316,7 +334,6 @@ class AmdGPUPlugin(HHDPlugin):
|
|
316
334
|
# Unless it is set manually, use the default scheduler.
|
317
335
|
self.close_sched()
|
318
336
|
self.old_sched = None
|
319
|
-
self.old_gpu = None
|
320
337
|
self.old_freq = None
|
321
338
|
self.old_boost = None
|
322
339
|
self.old_epp = None
|
@@ -324,16 +341,40 @@ class AmdGPUPlugin(HHDPlugin):
|
|
324
341
|
else:
|
325
342
|
self.old_target = None
|
326
343
|
new_gpu = conf["tdp.amd_energy.mode.manual.gpu_freq.mode"].to(str)
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
344
|
+
match new_gpu:
|
345
|
+
case "manual":
|
346
|
+
f = conf["tdp.amd_energy.mode.manual.gpu_freq.manual.frequency"].to(
|
347
|
+
int
|
348
|
+
)
|
349
|
+
new_freq = (f, f)
|
350
|
+
case "upper":
|
351
|
+
f = conf["tdp.amd_energy.mode.manual.gpu_freq.upper.frequency"].to(
|
352
|
+
int
|
353
|
+
)
|
354
|
+
new_freq = (self.min_freq or f, f)
|
355
|
+
case "range":
|
356
|
+
min_f = conf["tdp.amd_energy.mode.manual.gpu_freq.range.min"].to(
|
357
|
+
int
|
358
|
+
)
|
359
|
+
max_f = conf["tdp.amd_energy.mode.manual.gpu_freq.range.max"].to(
|
360
|
+
int
|
361
|
+
)
|
362
|
+
if max_f < min_f:
|
363
|
+
max_f = min_f
|
364
|
+
conf["tdp.amd_energy.mode.manual.gpu_freq.range.max"] = min_f
|
365
|
+
new_freq = (min_f, max_f)
|
366
|
+
case _:
|
367
|
+
new_freq = None
|
368
|
+
|
369
|
+
if new_freq != self.old_freq:
|
332
370
|
self.old_freq = new_freq
|
371
|
+
self.queue_gpu = curr + APPLY_DELAY
|
333
372
|
|
373
|
+
if self.queue_gpu is not None and curr >= self.queue_gpu:
|
374
|
+
self.queue_gpu = None
|
334
375
|
try:
|
335
|
-
if
|
336
|
-
set_gpu_manual(new_freq)
|
376
|
+
if new_freq:
|
377
|
+
set_gpu_manual(*new_freq)
|
337
378
|
else:
|
338
379
|
set_gpu_auto()
|
339
380
|
except Exception as e:
|
@@ -41,7 +41,7 @@ enabled:
|
|
41
41
|
cpu_min_freq:
|
42
42
|
type: multiple
|
43
43
|
title: CPU Minimum Frequency
|
44
|
-
tags: [ordinal]
|
44
|
+
tags: [ordinal, expert]
|
45
45
|
default: min
|
46
46
|
options:
|
47
47
|
min: 400MHz
|
@@ -78,20 +78,41 @@ enabled:
|
|
78
78
|
title: Auto
|
79
79
|
hint: >-
|
80
80
|
Lets the GPU manage its own frequency.
|
81
|
-
|
81
|
+
upper:
|
82
82
|
type: container
|
83
|
-
title:
|
83
|
+
title: Upper Limit
|
84
84
|
hint: >-
|
85
|
-
Sets the GPU frequency
|
85
|
+
Sets the GPU frequency to a maximum.
|
86
86
|
children:
|
87
|
-
frequency:
|
88
|
-
title: Frequency
|
89
|
-
unit: MHz
|
87
|
+
frequency: &freq
|
90
88
|
type: int
|
89
|
+
unit: MHz
|
91
90
|
min: 300
|
92
91
|
max: 2000
|
93
92
|
step: 100
|
94
93
|
default: 1000
|
94
|
+
title: Maximum Frequency
|
95
|
+
range:
|
96
|
+
type: container
|
97
|
+
title: Range
|
98
|
+
hint: >-
|
99
|
+
Sets the GPU frequency to a range.
|
100
|
+
children:
|
101
|
+
min:
|
102
|
+
<<: *freq
|
103
|
+
title: Minimum Frequency
|
104
|
+
max:
|
105
|
+
<<: *freq
|
106
|
+
title: Maximum Frequency
|
107
|
+
manual:
|
108
|
+
type: container
|
109
|
+
title: Fixed
|
110
|
+
hint: >-
|
111
|
+
Sets the GPU frequency manually.
|
112
|
+
children:
|
113
|
+
frequency:
|
114
|
+
<<: *freq
|
115
|
+
title: Frequency
|
95
116
|
sched:
|
96
117
|
type: multiple
|
97
118
|
title: Custom Scheduler
|
@@ -12,6 +12,7 @@ logger = logging.getLogger(__name__)
|
|
12
12
|
|
13
13
|
APPLY_DELAY = 0.7
|
14
14
|
TDP_DELAY = 0.1
|
15
|
+
SLEEP_DELAY = 4
|
15
16
|
MIN_TDP_START = 7
|
16
17
|
MAX_TDP_START = 30
|
17
18
|
# FIXME: add AC/DC values
|
@@ -440,6 +441,9 @@ class AsusDriverPlugin(HHDPlugin):
|
|
440
441
|
self.new_mode = "balanced"
|
441
442
|
case "performance":
|
442
443
|
self.new_mode = "performance"
|
444
|
+
elif ev['type'] == 'special' and ev.get('event', None) == "wakeup":
|
445
|
+
logger.info(f"Waking up from sleep, resetting TDP after {SLEEP_DELAY} seconds.")
|
446
|
+
self.queue_tdp = time.time() + SLEEP_DELAY
|
443
447
|
elif self.cycle_tdp and ev['type'] == "special" and ev['event'] == "xbox_y":
|
444
448
|
match self.mode:
|
445
449
|
case "quiet":
|
@@ -112,15 +112,18 @@ def set_gpu_auto():
|
|
112
112
|
f.write("auto")
|
113
113
|
|
114
114
|
|
115
|
-
def set_gpu_manual(
|
116
|
-
|
115
|
+
def set_gpu_manual(min_freq: int, max_freq: int | None = None):
|
116
|
+
if max_freq is None:
|
117
|
+
max_freq = min_freq
|
118
|
+
|
119
|
+
logger.info(f"Pinning GPU frequency to '{min_freq}Mhz' - '{max_freq}Mhz'.")
|
117
120
|
hwmon = find_igpu()
|
118
121
|
if not hwmon:
|
119
122
|
return None
|
120
123
|
with open(os.path.join(hwmon, GPU_LEVEL_PATH), "w") as f:
|
121
124
|
f.write("manual")
|
122
125
|
|
123
|
-
for cmd in [f"s 0 {
|
126
|
+
for cmd in [f"s 0 {min_freq}\n", f"s 1 {max_freq}\n", f"c\n"]:
|
124
127
|
with open(os.path.join(hwmon, GPU_FREQUENCY_PATH), "w") as f:
|
125
128
|
f.write(cmd)
|
126
129
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: adjustor
|
3
|
-
Version: 3.4.
|
3
|
+
Version: 3.4.5
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{adjustor-3.4.4 → adjustor-3.4.5}/src/adjustor/drivers/amd/power-profiles-daemon.dbus.xml.in
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{adjustor-3.4.4 → adjustor-3.4.5}/usr/share/dbus-1/system.d/hhd-net.hadess.PowerProfiles.conf
RENAMED
File without changes
|