adjustor 3.5.3__tar.gz → 3.5.4__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {adjustor-3.5.3/src/adjustor.egg-info → adjustor-3.5.4}/PKG-INFO +1 -1
- {adjustor-3.5.3 → adjustor-3.5.4}/pyproject.toml +1 -1
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/core/const.py +32 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/asus/__init__.py +4 -1
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/general/__init__.py +3 -3
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/lenovo/__init__.py +11 -1
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/lenovo/settings.yml +6 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/events.py +1 -0
- {adjustor-3.5.3 → adjustor-3.5.4/src/adjustor.egg-info}/PKG-INFO +1 -1
- {adjustor-3.5.3 → adjustor-3.5.4}/LICENSE +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/MANIFEST.in +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/readme.md +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/setup.cfg +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/__init__.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/__main__.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/core/__init__.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/core/acpi.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/core/alib.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/core/fan/__init__.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/core/fan/__main__.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/core/fan/alg.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/core/fan/core.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/core/fan/utils.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/core/lenovo.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/core/platform.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/__init__.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/amd/__init__.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/amd/power-profiles-daemon.dbus.xml.in +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/amd/ppd.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/amd/settings.yml +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/asus/settings.yml +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/general/settings.yml +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/smu/__init__.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/smu/qam.yml +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/drivers/smu/smu.yml +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/fuse/__init__.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/fuse/driver.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/fuse/gpu.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/fuse/utils.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/hhd.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/i18n.py +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor/settings.yml +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor.egg-info/SOURCES.txt +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor.egg-info/dependency_links.txt +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor.egg-info/entry_points.txt +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor.egg-info/requires.txt +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/src/adjustor.egg-info/top_level.txt +0 -0
- {adjustor-3.5.3 → adjustor-3.5.4}/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.5.
|
3
|
+
Version: 3.5.4
|
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,5 +1,33 @@
|
|
1
|
+
from typing import TypedDict
|
2
|
+
|
1
3
|
from .alib import A, D, DeviceParams, AlibParams
|
2
4
|
|
5
|
+
|
6
|
+
class DevicePreset(TypedDict):
|
7
|
+
tdp_limit: int
|
8
|
+
slow_limit: int
|
9
|
+
fast_limit: int
|
10
|
+
slow_time: int
|
11
|
+
stapm_time: int
|
12
|
+
temp_target: int
|
13
|
+
fan_curve: dict[int, float] | None
|
14
|
+
|
15
|
+
|
16
|
+
class DevideProfile(TypedDict):
|
17
|
+
quiet: DevicePreset
|
18
|
+
balanced: DevicePreset
|
19
|
+
performance: DevicePreset
|
20
|
+
# Turbo is custom with max tdp values
|
21
|
+
turbo: DevicePreset
|
22
|
+
|
23
|
+
platform_profile_map: dict[str, int]
|
24
|
+
ppd_balanced_min: int
|
25
|
+
ppd_performance_min: int
|
26
|
+
|
27
|
+
alib: dict[str, AlibParams]
|
28
|
+
dev: dict[str, DeviceParams]
|
29
|
+
|
30
|
+
|
3
31
|
PLATFORM_PROFILE_MAP = [
|
4
32
|
("low-power", 0),
|
5
33
|
("quiet", 0),
|
@@ -29,6 +57,7 @@ ALIB_PARAMS_5040: dict[str, AlibParams] = ALIB_PARAMS
|
|
29
57
|
ALIB_PARAMS_7040: dict[str, AlibParams] = ALIB_PARAMS
|
30
58
|
ALIB_PARAMS_6040: dict[str, AlibParams] = ALIB_PARAMS
|
31
59
|
ALIB_PARAMS_8040: dict[str, AlibParams] = ALIB_PARAMS
|
60
|
+
ALIB_PARAMS_HX370: dict[str, AlibParams] = ALIB_PARAMS
|
32
61
|
|
33
62
|
DEV_PARAMS_30W: dict[str, DeviceParams] = {
|
34
63
|
"stapm_limit": D(0, 4, 15, 30, 40),
|
@@ -69,12 +98,14 @@ DEV_PARAMS_5000: dict[str, DeviceParams] = DEV_PARAMS_25W
|
|
69
98
|
DEV_PARAMS_6000: dict[str, DeviceParams] = DEV_PARAMS_30W
|
70
99
|
DEV_PARAMS_7040: dict[str, DeviceParams] = DEV_PARAMS_30W
|
71
100
|
DEV_PARAMS_8040: dict[str, DeviceParams] = DEV_PARAMS_30W
|
101
|
+
DEV_PARAMS_HX370: dict[str, DeviceParams] = DEV_PARAMS_30W
|
72
102
|
DEV_PARAMS_LEGO = DEV_PARAMS_30W
|
73
103
|
|
74
104
|
DEV_DATA: dict[str, tuple[dict[str, DeviceParams], dict[str, AlibParams], bool]] = {
|
75
105
|
"NEO-01": (DEV_PARAMS_28W, ALIB_PARAMS_7040, False),
|
76
106
|
"V3": (DEV_PARAMS_28W, ALIB_PARAMS_8040, False),
|
77
107
|
"83E1": (DEV_PARAMS_LEGO, ALIB_PARAMS_7040, False),
|
108
|
+
"ONEXPLAYER F1Pro": (DEV_PARAMS_HX370, ALIB_PARAMS_HX370, False),
|
78
109
|
}
|
79
110
|
|
80
111
|
CPU_DATA: dict[str, tuple[dict[str, DeviceParams], dict[str, AlibParams]]] = {
|
@@ -88,4 +119,5 @@ CPU_DATA: dict[str, tuple[dict[str, DeviceParams], dict[str, AlibParams]]] = {
|
|
88
119
|
"AMD Ryzen 7 7840U": (DEV_PARAMS_7040, ALIB_PARAMS_7040),
|
89
120
|
"AMD Ryzen 7 8840U": (DEV_PARAMS_8040, ALIB_PARAMS_8040),
|
90
121
|
# AMD Athlon Silver 3050e (Win600, will it support tdp?)
|
122
|
+
"AMD Ryzen AI 9 HX 370": (DEV_PARAMS_HX370, ALIB_PARAMS_HX370),
|
91
123
|
}
|
@@ -225,7 +225,7 @@ class AsusDriverPlugin(HHDPlugin):
|
|
225
225
|
lim != self.old_conf["charge_limit"].to(str)
|
226
226
|
):
|
227
227
|
self.queue_charge_limit = curr + APPLY_DELAY
|
228
|
-
|
228
|
+
|
229
229
|
if self.queue_charge_limit and self.queue_charge_limit < curr:
|
230
230
|
self.queue_charge_limit = None
|
231
231
|
match lim:
|
@@ -281,6 +281,9 @@ class AsusDriverPlugin(HHDPlugin):
|
|
281
281
|
self.sys_tdp = False
|
282
282
|
tdp_reset = True
|
283
283
|
|
284
|
+
if mode is not None and self.startup:
|
285
|
+
tdp_reset = True
|
286
|
+
|
284
287
|
# Handle EPP for presets
|
285
288
|
if tdp_reset and mode != "custom":
|
286
289
|
match mode:
|
@@ -64,7 +64,7 @@ class GeneralPowerPlugin(HHDPlugin):
|
|
64
64
|
logger.info("Unmasking TuneD in the case it was masked.")
|
65
65
|
os.system('systemctl unmask tuned')
|
66
66
|
subprocess.run(
|
67
|
-
[tuned],
|
67
|
+
[tuned,'active'],
|
68
68
|
check=True,
|
69
69
|
stdin=subprocess.DEVNULL,
|
70
70
|
stdout=subprocess.DEVNULL,
|
@@ -75,7 +75,7 @@ class GeneralPowerPlugin(HHDPlugin):
|
|
75
75
|
logger.warning(f"tuned-adm returned with error:\n{e}")
|
76
76
|
|
77
77
|
|
78
|
-
if not self.ppd_supported:
|
78
|
+
if not self.ppd_supported and not self.tuned_supported:
|
79
79
|
del sets["children"]["profile"]
|
80
80
|
|
81
81
|
# SchedExt
|
@@ -188,7 +188,7 @@ class GeneralPowerPlugin(HHDPlugin):
|
|
188
188
|
conf["tdp.general.profile"] = self.target
|
189
189
|
except Exception as e:
|
190
190
|
self.tuned_supported = False
|
191
|
-
logger.warning(f"
|
191
|
+
logger.warning(f"tuned-adm returned with error:\n{e}")
|
192
192
|
self.tuned_supported = False
|
193
193
|
|
194
194
|
# Handle sched
|
@@ -44,6 +44,7 @@ class LenovoDriverPlugin(HHDPlugin):
|
|
44
44
|
self.old_conf = None
|
45
45
|
self.sys_tdp = False
|
46
46
|
self.fan_curve_set = False
|
47
|
+
self.notify_tdp = False
|
47
48
|
|
48
49
|
bios_version = get_bios_version()
|
49
50
|
logger.info(f"Lenovo BIOS version: {bios_version}")
|
@@ -326,6 +327,12 @@ class LenovoDriverPlugin(HHDPlugin):
|
|
326
327
|
# Save current config
|
327
328
|
self.old_conf = conf["tdp.lenovo"]
|
328
329
|
|
330
|
+
if self.notify_tdp:
|
331
|
+
self.notify_tdp = False
|
332
|
+
print(new_mode)
|
333
|
+
if conf.get("tdp.lenovo.tdp_rgb", False):
|
334
|
+
self.emit({"type": "special", "event": f"tdp_cycle_{new_mode}"}) # type: ignore
|
335
|
+
|
329
336
|
if self.startup:
|
330
337
|
self.startup = False
|
331
338
|
|
@@ -333,7 +340,7 @@ class LenovoDriverPlugin(HHDPlugin):
|
|
333
340
|
for ev in events:
|
334
341
|
if ev["type"] == "tdp":
|
335
342
|
self.new_tdp = ev["tdp"]
|
336
|
-
self.sys_tdp = ev[
|
343
|
+
self.sys_tdp = ev["tdp"] is not None
|
337
344
|
if ev["type"] == "ppd":
|
338
345
|
match ev["status"]:
|
339
346
|
case "power":
|
@@ -342,6 +349,9 @@ class LenovoDriverPlugin(HHDPlugin):
|
|
342
349
|
self.new_mode = "balanced"
|
343
350
|
case "performance":
|
344
351
|
self.new_mode = "performance"
|
352
|
+
print(ev)
|
353
|
+
if ev["type"] == "acpi" and ev.get("event", None) == "tdp":
|
354
|
+
self.notify_tdp = True
|
345
355
|
|
346
356
|
def close(self):
|
347
357
|
pass
|
@@ -143,6 +143,12 @@ children:
|
|
143
143
|
hint: >-
|
144
144
|
Reset to the original fan curve provided by Lenovo in BIOS V28.
|
145
145
|
|
146
|
+
tdp_rgb:
|
147
|
+
type: bool
|
148
|
+
title: Show TDP changes with RGB
|
149
|
+
tags: [non-essential]
|
150
|
+
default: False
|
151
|
+
|
146
152
|
charge_limit:
|
147
153
|
tags: [advanced]
|
148
154
|
type: bool
|
@@ -15,6 +15,7 @@ EVENT_MATCHES: Sequence[tuple[dict[str, Any], str]] = [
|
|
15
15
|
({"device_class": b"button/power"}, "powerbutton"),
|
16
16
|
# Legion GO TDP event
|
17
17
|
({"bus_id": b"D320289E-8FEA-"}, "tdp"),
|
18
|
+
({"device_class": b"wmi", "bus_id": b"PNP0C14:01"}, "tdp"), # Legion go
|
18
19
|
# GPD Force hibernate thermal event
|
19
20
|
# , 'type': 0xf100, 'data': 0x0100 ignore these attrs for now...
|
20
21
|
({"device_class": b"thermal_zone", "bus_id": b"LNXTHERM:00"}, "hibernate-thermal"),
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: adjustor
|
3
|
-
Version: 3.5.
|
3
|
+
Version: 3.5.4
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{adjustor-3.5.3 → adjustor-3.5.4}/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
|
{adjustor-3.5.3 → adjustor-3.5.4}/usr/share/dbus-1/system.d/hhd-net.hadess.PowerProfiles.conf
RENAMED
File without changes
|