adjustor 3.4.0__tar.gz → 3.4.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {adjustor-3.4.0/src/adjustor.egg-info → adjustor-3.4.2}/PKG-INFO +1 -1
- {adjustor-3.4.0 → adjustor-3.4.2}/pyproject.toml +1 -1
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/amd/__init__.py +5 -4
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/amd/settings.yml +1 -1
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/asus/__init__.py +14 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/asus/settings.yml +5 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/lenovo/__init__.py +16 -3
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/lenovo/settings.yml +1 -2
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/smu/__init__.py +21 -3
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/smu/qam.yml +6 -1
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/fuse/utils.py +2 -0
- {adjustor-3.4.0 → adjustor-3.4.2/src/adjustor.egg-info}/PKG-INFO +1 -1
- {adjustor-3.4.0 → adjustor-3.4.2}/LICENSE +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/MANIFEST.in +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/readme.md +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/setup.cfg +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/__init__.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/__main__.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/core/__init__.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/core/acpi.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/core/alib.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/core/const.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/core/lenovo.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/core/platform.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/__init__.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/amd/power-profiles-daemon.dbus.xml.in +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/amd/ppd.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/general/__init__.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/general/settings.yml +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/drivers/smu/smu.yml +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/events.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/fuse/__init__.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/fuse/driver.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/fuse/gpu.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/hhd.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/i18n.py +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor/settings.yml +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor.egg-info/SOURCES.txt +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor.egg-info/dependency_links.txt +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor.egg-info/entry_points.txt +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor.egg-info/requires.txt +0 -0
- {adjustor-3.4.0 → adjustor-3.4.2}/src/adjustor.egg-info/top_level.txt +0 -0
- {adjustor-3.4.0 → adjustor-3.4.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.4.
|
3
|
+
Version: 3.4.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
|
@@ -120,7 +120,7 @@ class AmdGPUPlugin(HHDPlugin):
|
|
120
120
|
"-t",
|
121
121
|
"service",
|
122
122
|
"--full",
|
123
|
-
"--all",
|
123
|
+
# "--all",
|
124
124
|
"--plain",
|
125
125
|
"--no-legend",
|
126
126
|
]
|
@@ -196,7 +196,7 @@ class AmdGPUPlugin(HHDPlugin):
|
|
196
196
|
|
197
197
|
self.avail_scheds = {}
|
198
198
|
avail_pretty = {}
|
199
|
-
kernel_supports = os.path.isfile("/sys/kernel/sched_ext/state")
|
199
|
+
kernel_supports = os.path.isfile("/sys/kernel/sched_ext/state") or True
|
200
200
|
if kernel_supports:
|
201
201
|
for sched, pretty in sets["enabled"]["children"]["mode"]["modes"]["manual"][
|
202
202
|
"children"
|
@@ -284,8 +284,6 @@ class AmdGPUPlugin(HHDPlugin):
|
|
284
284
|
logger.info(
|
285
285
|
f"Handling energy settings for power profile '{self.target}'."
|
286
286
|
)
|
287
|
-
# Unless it is set manually, use the default scheduler.
|
288
|
-
self.close_sched()
|
289
287
|
try:
|
290
288
|
match self.target:
|
291
289
|
case "balanced":
|
@@ -315,6 +313,9 @@ class AmdGPUPlugin(HHDPlugin):
|
|
315
313
|
except Exception as e:
|
316
314
|
logger.error(f"Failed to set energy mode:\n{e}")
|
317
315
|
|
316
|
+
# Unless it is set manually, use the default scheduler.
|
317
|
+
self.close_sched()
|
318
|
+
self.old_sched = None
|
318
319
|
self.old_gpu = None
|
319
320
|
self.old_freq = None
|
320
321
|
self.old_boost = None
|
@@ -115,7 +115,7 @@ conflict:
|
|
115
115
|
type: display
|
116
116
|
default: >-
|
117
117
|
Energy Management can not be enabled while PPD or TuneD are enabled.
|
118
|
-
`systemctl
|
118
|
+
`systemctl mask power-profiles-daemon` or `tuned`.
|
119
119
|
enable:
|
120
120
|
title: Enable Energy Management
|
121
121
|
type: action
|
@@ -6,6 +6,7 @@ from typing import Sequence
|
|
6
6
|
from hhd.plugins import Config, Context, Event, HHDPlugin, load_relative_yaml
|
7
7
|
|
8
8
|
from adjustor.core.platform import set_platform_profile
|
9
|
+
from adjustor.i18n import _
|
9
10
|
|
10
11
|
logger = logging.getLogger(__name__)
|
11
12
|
|
@@ -141,6 +142,7 @@ class AsusDriverPlugin(HHDPlugin):
|
|
141
142
|
self.new_mode = None
|
142
143
|
self.old_target = None
|
143
144
|
self.pp = None
|
145
|
+
self.sys_tdp = False
|
144
146
|
self.allyx = allyx
|
145
147
|
|
146
148
|
def settings(self):
|
@@ -252,6 +254,8 @@ class AsusDriverPlugin(HHDPlugin):
|
|
252
254
|
|
253
255
|
tdp_reset = False
|
254
256
|
if mode is not None and mode != self.old_conf["tdp_v2.mode"].to(str):
|
257
|
+
if not new_tdp:
|
258
|
+
self.sys_tdp = False
|
255
259
|
tdp_reset = True
|
256
260
|
|
257
261
|
# Handle EPP for presets
|
@@ -279,6 +283,9 @@ class AsusDriverPlugin(HHDPlugin):
|
|
279
283
|
steady_updated = steady and steady != self.old_conf["tdp_v2.custom.tdp"].to(
|
280
284
|
int
|
281
285
|
)
|
286
|
+
if not new_tdp and steady_updated:
|
287
|
+
self.sys_tdp = False
|
288
|
+
|
282
289
|
steady_updated |= tdp_reset
|
283
290
|
|
284
291
|
if self.startup and (steady > MAX_TDP_START or steady < MIN_TDP_START):
|
@@ -407,6 +414,12 @@ class AsusDriverPlugin(HHDPlugin):
|
|
407
414
|
logger.error(f"Could not set fan curve. Error:\n{e}")
|
408
415
|
self.queue_fan = None
|
409
416
|
|
417
|
+
# Show steam message
|
418
|
+
if self.sys_tdp:
|
419
|
+
conf["tdp.asus.sys_tdp"] = _("Steam is controlling TDP")
|
420
|
+
else:
|
421
|
+
conf["tdp.asus.sys_tdp"] = ""
|
422
|
+
|
410
423
|
# Save current config
|
411
424
|
self.cycle_tdp = conf["tdp.asus.cycle_tdp"].to(bool)
|
412
425
|
self.old_conf = conf["tdp.asus"]
|
@@ -418,6 +431,7 @@ class AsusDriverPlugin(HHDPlugin):
|
|
418
431
|
for ev in events:
|
419
432
|
if ev["type"] == "tdp":
|
420
433
|
self.new_tdp = ev["tdp"]
|
434
|
+
self.sys_tdp = ev['tdp'] is not None
|
421
435
|
elif ev["type"] == "ppd":
|
422
436
|
match ev["status"]:
|
423
437
|
case "power":
|
@@ -8,22 +8,23 @@ from hhd.plugins.conf import Config
|
|
8
8
|
from adjustor.core.lenovo import (
|
9
9
|
MIN_CURVE,
|
10
10
|
TdpMode,
|
11
|
+
get_bios_version,
|
11
12
|
get_charge_limit,
|
12
13
|
get_full_fan_speed,
|
13
14
|
get_power_light,
|
15
|
+
get_power_light_v1,
|
14
16
|
get_tdp_mode,
|
15
17
|
set_charge_limit,
|
16
18
|
set_fan_curve,
|
17
19
|
set_fast_tdp,
|
18
20
|
set_full_fan_speed,
|
19
21
|
set_power_light,
|
22
|
+
set_power_light_v1,
|
20
23
|
set_slow_tdp,
|
21
24
|
set_steady_tdp,
|
22
25
|
set_tdp_mode,
|
23
|
-
get_bios_version,
|
24
|
-
get_power_light_v1,
|
25
|
-
set_power_light_v1,
|
26
26
|
)
|
27
|
+
from adjustor.i18n import _
|
27
28
|
|
28
29
|
logger = logging.getLogger(__name__)
|
29
30
|
|
@@ -41,6 +42,7 @@ class LenovoDriverPlugin(HHDPlugin):
|
|
41
42
|
self.enforce_limits = True
|
42
43
|
self.startup = True
|
43
44
|
self.old_conf = None
|
45
|
+
self.sys_tdp = False
|
44
46
|
self.fan_curve_set = False
|
45
47
|
|
46
48
|
bios_version = get_bios_version()
|
@@ -175,6 +177,8 @@ class LenovoDriverPlugin(HHDPlugin):
|
|
175
177
|
# Grab from power button
|
176
178
|
new_mode = get_tdp_mode()
|
177
179
|
if new_mode != mode:
|
180
|
+
if not new_tdp:
|
181
|
+
self.sys_tdp = False
|
178
182
|
tdp_reset = True
|
179
183
|
conf["tdp.lenovo.tdp.mode"] = new_mode
|
180
184
|
|
@@ -219,6 +223,8 @@ class LenovoDriverPlugin(HHDPlugin):
|
|
219
223
|
steady_updated = steady and steady != self.old_conf["tdp.custom.tdp"].to(
|
220
224
|
int
|
221
225
|
)
|
226
|
+
if steady_updated and not new_tdp:
|
227
|
+
self.sys_tdp = False
|
222
228
|
|
223
229
|
if self.startup and (steady > 30 or steady < 7):
|
224
230
|
logger.warning(
|
@@ -311,6 +317,12 @@ class LenovoDriverPlugin(HHDPlugin):
|
|
311
317
|
self.fan_curve_set = True
|
312
318
|
self.queue_fan = None
|
313
319
|
|
320
|
+
# Show steam message
|
321
|
+
if self.sys_tdp:
|
322
|
+
conf["tdp.lenovo.cycle_info"] = _("Steam is controlling TDP")
|
323
|
+
else:
|
324
|
+
conf["tdp.lenovo.cycle_info"] = _("Legion L + Y changes TDP Mode")
|
325
|
+
|
314
326
|
# Save current config
|
315
327
|
self.old_conf = conf["tdp.lenovo"]
|
316
328
|
|
@@ -321,6 +333,7 @@ class LenovoDriverPlugin(HHDPlugin):
|
|
321
333
|
for ev in events:
|
322
334
|
if ev["type"] == "tdp":
|
323
335
|
self.new_tdp = ev["tdp"]
|
336
|
+
self.sys_tdp = ev['tdp'] is not None
|
324
337
|
if ev["type"] == "ppd":
|
325
338
|
match ev["status"]:
|
326
339
|
case "power":
|
@@ -49,12 +49,11 @@ children:
|
|
49
49
|
default: True
|
50
50
|
hint: >-
|
51
51
|
Allows the device to boost by setting appropriate slow and fast TDPs.
|
52
|
-
|
52
|
+
|
53
53
|
cycle_info:
|
54
54
|
type: display
|
55
55
|
title: " "
|
56
56
|
tags: [non-essential]
|
57
|
-
default: "Legion L + Y changes TDP Mode"
|
58
57
|
|
59
58
|
ffss:
|
60
59
|
type: bool
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import logging
|
2
2
|
import time
|
3
|
+
from typing import Sequence
|
3
4
|
|
4
|
-
from hhd.plugins import Context, HHDPlugin, load_relative_yaml
|
5
|
+
from hhd.plugins import Context, Event, HHDPlugin, load_relative_yaml
|
5
6
|
from hhd.plugins.conf import Config
|
6
7
|
|
7
8
|
from adjustor.core.alib import AlibParams, DeviceParams, alib
|
8
9
|
from adjustor.core.platform import get_platform_choices, set_platform_profile
|
9
|
-
from
|
10
|
+
from adjustor.i18n import _
|
10
11
|
|
11
12
|
logger = logging.getLogger(__name__)
|
12
13
|
|
@@ -34,6 +35,7 @@ class SmuQamPlugin(HHDPlugin):
|
|
34
35
|
self.old_conf = None
|
35
36
|
self.startup = True
|
36
37
|
self.queued = None
|
38
|
+
self.sys_tdp = False
|
37
39
|
|
38
40
|
self.old_tdp = None
|
39
41
|
self.old_boost = None
|
@@ -101,15 +103,19 @@ class SmuQamPlugin(HHDPlugin):
|
|
101
103
|
return
|
102
104
|
|
103
105
|
curr = time.time()
|
106
|
+
sys_tdp = False
|
104
107
|
if self.new_tdp:
|
105
108
|
new_tdp = self.new_tdp
|
106
109
|
self.new_tdp = None
|
110
|
+
sys_tdp = True
|
107
111
|
conf["tdp.qam.tdp"] = new_tdp
|
108
112
|
else:
|
109
113
|
new_tdp = conf["tdp.qam.tdp"].to(int)
|
110
114
|
|
111
115
|
if self.startup and self.lims:
|
112
|
-
|
116
|
+
smin = self.lims.smin
|
117
|
+
smax = self.lims.smax
|
118
|
+
|
113
119
|
if smin and new_tdp < smin:
|
114
120
|
logger.warning(
|
115
121
|
f"Device TDP ({new_tdp}) too low for startup, adjusting."
|
@@ -129,6 +135,9 @@ class SmuQamPlugin(HHDPlugin):
|
|
129
135
|
and self.old_tdp is not None
|
130
136
|
and self.old_boost is not None
|
131
137
|
)
|
138
|
+
if changed and not sys_tdp:
|
139
|
+
self.sys_tdp = False
|
140
|
+
|
132
141
|
if self.startup or changed:
|
133
142
|
self.queued = curr + APPLY_DELAY
|
134
143
|
self.is_set = False
|
@@ -167,6 +176,12 @@ class SmuQamPlugin(HHDPlugin):
|
|
167
176
|
conf["tdp.smu.std.slow_limit"] = new_tdp
|
168
177
|
conf["tdp.smu.std.fast_limit"] = new_tdp
|
169
178
|
|
179
|
+
# Show steam message
|
180
|
+
if self.sys_tdp:
|
181
|
+
conf["tdp.qam.sys_tdp"] = _("Steam is controlling TDP")
|
182
|
+
else:
|
183
|
+
conf["tdp.qam.sys_tdp"] = ""
|
184
|
+
|
170
185
|
if self.startup or (self.queued and self.queued < curr):
|
171
186
|
self.startup = False
|
172
187
|
self.queued = None
|
@@ -178,7 +193,10 @@ class SmuQamPlugin(HHDPlugin):
|
|
178
193
|
def notify(self, events: Sequence[Event]):
|
179
194
|
for ev in events:
|
180
195
|
if ev["type"] == "tdp":
|
196
|
+
self.sys_tdp = True
|
181
197
|
self.new_tdp = ev["tdp"]
|
198
|
+
self.sys_tdp = ev['tdp'] is not None
|
199
|
+
|
182
200
|
if ev["type"] == "ppd":
|
183
201
|
# TODO: Make tunable per device
|
184
202
|
match ev["status"]:
|
@@ -127,6 +127,8 @@ def _tdp_client(should_exit: Event, set_tdp, min_tdp, default_tdp, max_tdp):
|
|
127
127
|
logger.info(
|
128
128
|
"Received TDP value 0 from /sys. Assuming its the default value and ignoring."
|
129
129
|
)
|
130
|
+
# Send none to remove steam notice
|
131
|
+
set_tdp(None)
|
130
132
|
except:
|
131
133
|
logger.error(f"Failed process TDP value, received:\n{data}")
|
132
134
|
send_cmd(b"ack\n")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: adjustor
|
3
|
-
Version: 3.4.
|
3
|
+
Version: 3.4.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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{adjustor-3.4.0 → adjustor-3.4.2}/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
|
{adjustor-3.4.0 → adjustor-3.4.2}/usr/share/dbus-1/system.d/hhd-net.hadess.PowerProfiles.conf
RENAMED
File without changes
|