adjustor 3.2.0__tar.gz → 3.3.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- adjustor-3.3.0/PKG-INFO +152 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/pyproject.toml +1 -1
- adjustor-3.3.0/readme.md +131 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/core/const.py +13 -1
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/amd/__init__.py +71 -6
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/amd/settings.yml +15 -2
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/asus/settings.yml +2 -3
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/hhd.py +12 -0
- adjustor-3.3.0/src/adjustor.egg-info/PKG-INFO +152 -0
- adjustor-3.2.0/PKG-INFO +0 -82
- adjustor-3.2.0/readme.md +0 -61
- adjustor-3.2.0/src/adjustor.egg-info/PKG-INFO +0 -82
- {adjustor-3.2.0 → adjustor-3.3.0}/LICENSE +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/MANIFEST.in +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/setup.cfg +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/__init__.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/__main__.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/core/__init__.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/core/acpi.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/core/alib.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/core/lenovo.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/core/platform.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/__init__.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/amd/power-profiles-daemon.dbus.xml.in +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/amd/ppd.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/asus/__init__.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/lenovo/__init__.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/lenovo/settings.yml +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/smu/__init__.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/smu/qam.yml +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/drivers/smu/smu.yml +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/events.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/fuse/__init__.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/fuse/driver.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/fuse/gpu.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/fuse/utils.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/i18n.py +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor/settings.yml +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor.egg-info/SOURCES.txt +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor.egg-info/dependency_links.txt +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor.egg-info/entry_points.txt +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor.egg-info/requires.txt +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/src/adjustor.egg-info/top_level.txt +0 -0
- {adjustor-3.2.0 → adjustor-3.3.0}/usr/share/dbus-1/system.d/hhd-net.hadess.PowerProfiles.conf +0 -0
adjustor-3.3.0/PKG-INFO
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: adjustor
|
3
|
+
Version: 3.3.0
|
4
|
+
Summary: Adjustor, a userspace program for managing the TDP of handheld devices.
|
5
|
+
Author-email: Kapenekakis Antheas <pypi@antheas.dev>
|
6
|
+
Project-URL: Homepage, https://github.com/hhd-dev/adjustor
|
7
|
+
Project-URL: Bug Tracker, https://github.com/hhd-dev/adjustor/issues
|
8
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
12
|
+
Classifier: Operating System :: POSIX :: Linux
|
13
|
+
Requires-Python: >=3.10
|
14
|
+
Description-Content-Type: text/markdown
|
15
|
+
License-File: LICENSE
|
16
|
+
Requires-Dist: rich>=13.5.2
|
17
|
+
Requires-Dist: pyroute2>=0.7.3
|
18
|
+
Requires-Dist: fuse-python>=1.0.7
|
19
|
+
Requires-Dist: PyGObject>=3.46.0
|
20
|
+
Requires-Dist: dbus-python>=1.3.2
|
21
|
+
|
22
|
+
# Adjustor
|
23
|
+
Home of the Adjustor TDP plugin for Handheld Daemon.
|
24
|
+
Adjustor currently allows for TDP control of all AMD Handhelds past generation
|
25
|
+
6### (support is added manually).
|
26
|
+
Intel is not currently supported.
|
27
|
+
For installation and usage, see the [main readme](https://github.com/hhd-dev/hhd).
|
28
|
+
Adjustor supports all handhelds in the Handheld Daemon supported list,
|
29
|
+
except intel handhelds and older prior to 6XXX AMD handhelds.
|
30
|
+
|
31
|
+
> [!IMPORTANT]
|
32
|
+
> Adjustor supports per-device TDP values but its database is not fully featured
|
33
|
+
> yet, with a fallback to 0-30W for missing devices
|
34
|
+
> that use the ALIB driver. Use common sense while on battery and reference
|
35
|
+
> your manufacturer's spec sheet. Open an issue so your device can have correct
|
36
|
+
> limits.
|
37
|
+
|
38
|
+
## TDP Control
|
39
|
+
For the ROG Ally, Ally X and Legion Go that have an ACPI/EC implementation for
|
40
|
+
bios and fan curves,
|
41
|
+
Adjustor uses the manufactuer functions for setting TDP.
|
42
|
+
For the Allys, the asus-wmi kernel driver is used to set the tdp and manage the
|
43
|
+
fan curves.
|
44
|
+
For the Go, Lenovo's WMI methods are called through `acpi_call`, which will hopefully
|
45
|
+
become part of a driver in the future.
|
46
|
+
|
47
|
+
For other devices, Adjustor implements a reverse engineered version of AMD's
|
48
|
+
vendor function for setting TDP on demand in Ryzen processors, through ACPI.
|
49
|
+
This means that it can be used regardless of the current memory policy
|
50
|
+
or secure-boot/lockdown status (provided the module `acpi_call` is installed.).
|
51
|
+
For more, see [AMD TDP Control Details](#amd-tdp).
|
52
|
+
|
53
|
+
In all cases, there are checks to ensure that the TDP is within the safe range
|
54
|
+
of the processors.
|
55
|
+
|
56
|
+
## Energy Management
|
57
|
+
Adjustor can also manage the energy profile of the processor, by setting EPP
|
58
|
+
and proper frequency values.
|
59
|
+
After we transitioned people away from Decky plugins (which had some governor controls)
|
60
|
+
to using Handheld Daemon for TDP, we found that Power Profiles Daemon (PPD)
|
61
|
+
would use aggressive CPU values.
|
62
|
+
These values are optimized for devices that have a dedicated power budget for the CPU
|
63
|
+
(e.g., laptops, desktops), which caused issues with handhelds.
|
64
|
+
|
65
|
+
For example, the balanced PPD profile would set EPP to balance_performance and
|
66
|
+
enable CPU boost, which would increase the draw of the CPU during gaming by 2W
|
67
|
+
and idle CPU temperature from 55C to around 70C.
|
68
|
+
The performance profile would switch the governor to performance and set EPP to
|
69
|
+
performance, which would exacerbate this problem.
|
70
|
+
In addition, the KDE and Gnome sliders were confusing for users, as they did not
|
71
|
+
affect TDP (which is mostly determined by the GPU which is unaffected by PPD).
|
72
|
+
|
73
|
+
Starting with version 3.1, when PPD is not present, Adjustor will manage the
|
74
|
+
EPP, boost, and minimum frequency of the processor itself.
|
75
|
+
By default, this is automatic, with sane values for handhelds:
|
76
|
+
- governor is always powersave
|
77
|
+
- EPP is power or balance_power
|
78
|
+
- boost is enabled only on high TDPs
|
79
|
+
- On high TDPs, minimum frequency is ~1Ghz (min. nonlinear). Was found to help frame
|
80
|
+
pacing on the Ally and VRR displays.
|
81
|
+
|
82
|
+
The user can also tweak the values themselves, as certain games have a preference
|
83
|
+
for high CPU utilization.
|
84
|
+
During testing, it was found that disabling CPU boost and lowering EPP results
|
85
|
+
in a modest 10 fps increase on high TDPs and around 1W of less power consumption
|
86
|
+
on non-demanding games.
|
87
|
+
|
88
|
+
In addition, Adjustor will emulate the dbus protocol of PPD, so that the sliders in
|
89
|
+
KDE Powerdevil and Gnome shell work as expected, and make them control the
|
90
|
+
TDP range instead of CPU values (which is the user's expectation).
|
91
|
+
Of course, depending on TDP and user preference, the CPU governor values will be set
|
92
|
+
accordingly.
|
93
|
+
|
94
|
+
## AMD TDP Control Details<a name="amd-tdp"></a>
|
95
|
+
Adjustor controls TDP through the Dynamic Power and Thermal Configuration Interface
|
96
|
+
of AMD, which exposes a superset of the parameters that can be currently found in
|
97
|
+
[RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/), through ACPI.
|
98
|
+
This vendor interface is part of the ACPI ASL library, and provided through the
|
99
|
+
ALIB method 0x0C.
|
100
|
+
The underlying implementation of the interface is SMU calls.
|
101
|
+
This means that as long as the kernel module `acpi_call` is loaded, Adjustor
|
102
|
+
can control TDP in an equivalent way to [RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/).
|
103
|
+
|
104
|
+
The ABI of this vendor function (as it is provided to manufacturers) can be
|
105
|
+
considered mostly stable, so little work is needed between subsequent
|
106
|
+
processor generations (it has not changed since 6XXX; previous
|
107
|
+
generations only had additions).
|
108
|
+
Of course, support for processors is only added after the ACPI bindings have
|
109
|
+
been reviewed, to avoid surprises.
|
110
|
+
Both the Ally and Legion Go use this function, in the exact same way, so setting
|
111
|
+
TDP with it is very stable, and we have had no reported crashes.
|
112
|
+
It should not be used (and is not used) with those devices, however, as the
|
113
|
+
manufacturer functions will interfere.
|
114
|
+
|
115
|
+
Unfortunately for devices that do have an ACPI/EC implementation for TDP, there
|
116
|
+
is no official way of setting TDP on demand, either on Linux or Windows, with
|
117
|
+
TDP remaining to what is set on the BIOS level.
|
118
|
+
Vendors that offer this functionality without an ACPI implementation
|
119
|
+
(such as Ayaneo), use RyzenAdj on Windows (can be seen on the Ayaneo Space directory).
|
120
|
+
This is not ideal, as RyzenAdj does not hold a lock while performing
|
121
|
+
SMU calls, and may perform them at the same time as the GPU driver which can
|
122
|
+
confuse it and cause a kernel panic.
|
123
|
+
We have recorded crashes with it both on Windows and Linux with implementations
|
124
|
+
which set TDP at a frequent interval (5-10s; unrelated
|
125
|
+
to this project; as neither AutoTDP or RyzenAdj are used).
|
126
|
+
|
127
|
+
Right now, Adjustor only implements a subset of useful ALIB parameters that are
|
128
|
+
well documented.
|
129
|
+
In addition, ALIB does not provide a way for reading the performance metrics table,
|
130
|
+
which is meant for debugging, so Adjustor can only write (not read) TDP values.
|
131
|
+
For that purpose, refer to [RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/).
|
132
|
+
From reverse engineering the Legion Go (see [here](./alib.md)), and seeing how it
|
133
|
+
interacts with ALIB, it was found that there are at least 10 parameters which control
|
134
|
+
the method STTv2 and are not part of RyzenAdj or have been documented elsewhere.
|
135
|
+
|
136
|
+
## Installation
|
137
|
+
Adjustor is installed as part of Handheld Daemon now, so follow the instructions
|
138
|
+
at [the main repository](https://github.com/hhd-dev/hhd#installation-instructions).
|
139
|
+
It is available in [AUR](https://aur.archlinux.org/packages/adjustor),
|
140
|
+
[COPR](https://copr.fedorainfracloud.org/coprs/hhd-dev/hhd/package/adjustor/),
|
141
|
+
and [PyPi](https://github.com/hhd-dev/adjustor/issues).
|
142
|
+
|
143
|
+
## Development
|
144
|
+
Install to the same virtual environment as Handheld Daemon to have Adjustor picked up
|
145
|
+
as a plugin upon restart, or to its own virtual environment to use independently.
|
146
|
+
```python
|
147
|
+
pip install -e .
|
148
|
+
```
|
149
|
+
|
150
|
+
# License
|
151
|
+
Adjustor is licensed under THE GNU GPLv3+. See LICENSE for details.
|
152
|
+
Versions prior to and excluding 2.0.0 are licensed using MIT.
|
adjustor-3.3.0/readme.md
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
# Adjustor
|
2
|
+
Home of the Adjustor TDP plugin for Handheld Daemon.
|
3
|
+
Adjustor currently allows for TDP control of all AMD Handhelds past generation
|
4
|
+
6### (support is added manually).
|
5
|
+
Intel is not currently supported.
|
6
|
+
For installation and usage, see the [main readme](https://github.com/hhd-dev/hhd).
|
7
|
+
Adjustor supports all handhelds in the Handheld Daemon supported list,
|
8
|
+
except intel handhelds and older prior to 6XXX AMD handhelds.
|
9
|
+
|
10
|
+
> [!IMPORTANT]
|
11
|
+
> Adjustor supports per-device TDP values but its database is not fully featured
|
12
|
+
> yet, with a fallback to 0-30W for missing devices
|
13
|
+
> that use the ALIB driver. Use common sense while on battery and reference
|
14
|
+
> your manufacturer's spec sheet. Open an issue so your device can have correct
|
15
|
+
> limits.
|
16
|
+
|
17
|
+
## TDP Control
|
18
|
+
For the ROG Ally, Ally X and Legion Go that have an ACPI/EC implementation for
|
19
|
+
bios and fan curves,
|
20
|
+
Adjustor uses the manufactuer functions for setting TDP.
|
21
|
+
For the Allys, the asus-wmi kernel driver is used to set the tdp and manage the
|
22
|
+
fan curves.
|
23
|
+
For the Go, Lenovo's WMI methods are called through `acpi_call`, which will hopefully
|
24
|
+
become part of a driver in the future.
|
25
|
+
|
26
|
+
For other devices, Adjustor implements a reverse engineered version of AMD's
|
27
|
+
vendor function for setting TDP on demand in Ryzen processors, through ACPI.
|
28
|
+
This means that it can be used regardless of the current memory policy
|
29
|
+
or secure-boot/lockdown status (provided the module `acpi_call` is installed.).
|
30
|
+
For more, see [AMD TDP Control Details](#amd-tdp).
|
31
|
+
|
32
|
+
In all cases, there are checks to ensure that the TDP is within the safe range
|
33
|
+
of the processors.
|
34
|
+
|
35
|
+
## Energy Management
|
36
|
+
Adjustor can also manage the energy profile of the processor, by setting EPP
|
37
|
+
and proper frequency values.
|
38
|
+
After we transitioned people away from Decky plugins (which had some governor controls)
|
39
|
+
to using Handheld Daemon for TDP, we found that Power Profiles Daemon (PPD)
|
40
|
+
would use aggressive CPU values.
|
41
|
+
These values are optimized for devices that have a dedicated power budget for the CPU
|
42
|
+
(e.g., laptops, desktops), which caused issues with handhelds.
|
43
|
+
|
44
|
+
For example, the balanced PPD profile would set EPP to balance_performance and
|
45
|
+
enable CPU boost, which would increase the draw of the CPU during gaming by 2W
|
46
|
+
and idle CPU temperature from 55C to around 70C.
|
47
|
+
The performance profile would switch the governor to performance and set EPP to
|
48
|
+
performance, which would exacerbate this problem.
|
49
|
+
In addition, the KDE and Gnome sliders were confusing for users, as they did not
|
50
|
+
affect TDP (which is mostly determined by the GPU which is unaffected by PPD).
|
51
|
+
|
52
|
+
Starting with version 3.1, when PPD is not present, Adjustor will manage the
|
53
|
+
EPP, boost, and minimum frequency of the processor itself.
|
54
|
+
By default, this is automatic, with sane values for handhelds:
|
55
|
+
- governor is always powersave
|
56
|
+
- EPP is power or balance_power
|
57
|
+
- boost is enabled only on high TDPs
|
58
|
+
- On high TDPs, minimum frequency is ~1Ghz (min. nonlinear). Was found to help frame
|
59
|
+
pacing on the Ally and VRR displays.
|
60
|
+
|
61
|
+
The user can also tweak the values themselves, as certain games have a preference
|
62
|
+
for high CPU utilization.
|
63
|
+
During testing, it was found that disabling CPU boost and lowering EPP results
|
64
|
+
in a modest 10 fps increase on high TDPs and around 1W of less power consumption
|
65
|
+
on non-demanding games.
|
66
|
+
|
67
|
+
In addition, Adjustor will emulate the dbus protocol of PPD, so that the sliders in
|
68
|
+
KDE Powerdevil and Gnome shell work as expected, and make them control the
|
69
|
+
TDP range instead of CPU values (which is the user's expectation).
|
70
|
+
Of course, depending on TDP and user preference, the CPU governor values will be set
|
71
|
+
accordingly.
|
72
|
+
|
73
|
+
## AMD TDP Control Details<a name="amd-tdp"></a>
|
74
|
+
Adjustor controls TDP through the Dynamic Power and Thermal Configuration Interface
|
75
|
+
of AMD, which exposes a superset of the parameters that can be currently found in
|
76
|
+
[RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/), through ACPI.
|
77
|
+
This vendor interface is part of the ACPI ASL library, and provided through the
|
78
|
+
ALIB method 0x0C.
|
79
|
+
The underlying implementation of the interface is SMU calls.
|
80
|
+
This means that as long as the kernel module `acpi_call` is loaded, Adjustor
|
81
|
+
can control TDP in an equivalent way to [RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/).
|
82
|
+
|
83
|
+
The ABI of this vendor function (as it is provided to manufacturers) can be
|
84
|
+
considered mostly stable, so little work is needed between subsequent
|
85
|
+
processor generations (it has not changed since 6XXX; previous
|
86
|
+
generations only had additions).
|
87
|
+
Of course, support for processors is only added after the ACPI bindings have
|
88
|
+
been reviewed, to avoid surprises.
|
89
|
+
Both the Ally and Legion Go use this function, in the exact same way, so setting
|
90
|
+
TDP with it is very stable, and we have had no reported crashes.
|
91
|
+
It should not be used (and is not used) with those devices, however, as the
|
92
|
+
manufacturer functions will interfere.
|
93
|
+
|
94
|
+
Unfortunately for devices that do have an ACPI/EC implementation for TDP, there
|
95
|
+
is no official way of setting TDP on demand, either on Linux or Windows, with
|
96
|
+
TDP remaining to what is set on the BIOS level.
|
97
|
+
Vendors that offer this functionality without an ACPI implementation
|
98
|
+
(such as Ayaneo), use RyzenAdj on Windows (can be seen on the Ayaneo Space directory).
|
99
|
+
This is not ideal, as RyzenAdj does not hold a lock while performing
|
100
|
+
SMU calls, and may perform them at the same time as the GPU driver which can
|
101
|
+
confuse it and cause a kernel panic.
|
102
|
+
We have recorded crashes with it both on Windows and Linux with implementations
|
103
|
+
which set TDP at a frequent interval (5-10s; unrelated
|
104
|
+
to this project; as neither AutoTDP or RyzenAdj are used).
|
105
|
+
|
106
|
+
Right now, Adjustor only implements a subset of useful ALIB parameters that are
|
107
|
+
well documented.
|
108
|
+
In addition, ALIB does not provide a way for reading the performance metrics table,
|
109
|
+
which is meant for debugging, so Adjustor can only write (not read) TDP values.
|
110
|
+
For that purpose, refer to [RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/).
|
111
|
+
From reverse engineering the Legion Go (see [here](./alib.md)), and seeing how it
|
112
|
+
interacts with ALIB, it was found that there are at least 10 parameters which control
|
113
|
+
the method STTv2 and are not part of RyzenAdj or have been documented elsewhere.
|
114
|
+
|
115
|
+
## Installation
|
116
|
+
Adjustor is installed as part of Handheld Daemon now, so follow the instructions
|
117
|
+
at [the main repository](https://github.com/hhd-dev/hhd#installation-instructions).
|
118
|
+
It is available in [AUR](https://aur.archlinux.org/packages/adjustor),
|
119
|
+
[COPR](https://copr.fedorainfracloud.org/coprs/hhd-dev/hhd/package/adjustor/),
|
120
|
+
and [PyPi](https://github.com/hhd-dev/adjustor/issues).
|
121
|
+
|
122
|
+
## Development
|
123
|
+
Install to the same virtual environment as Handheld Daemon to have Adjustor picked up
|
124
|
+
as a plugin upon restart, or to its own virtual environment to use independently.
|
125
|
+
```python
|
126
|
+
pip install -e .
|
127
|
+
```
|
128
|
+
|
129
|
+
# License
|
130
|
+
Adjustor is licensed under THE GNU GPLv3+. See LICENSE for details.
|
131
|
+
Versions prior to and excluding 2.0.0 are licensed using MIT.
|
@@ -41,12 +41,24 @@ DEV_PARAMS_7040: dict[str, DeviceParams] = {
|
|
41
41
|
"temp_target": D(60, 70, 85, 90, 100),
|
42
42
|
}
|
43
43
|
|
44
|
+
DEV_PARAMS_NEO: dict[str, DeviceParams] = {
|
45
|
+
"stapm_limit": D(0, 4, 15, 28, 35),
|
46
|
+
"skin_limit": D(0, 4, 15, 28, 35),
|
47
|
+
"slow_limit": D(0, 4, 20, 32, 37),
|
48
|
+
"fast_limit": D(0, 4, 25, 35, 40),
|
49
|
+
# Times
|
50
|
+
"slow_time": D(5, 5, 10, 10, 10),
|
51
|
+
"stapm_time": D(100, 100, 100, 200, 200),
|
52
|
+
# Temp
|
53
|
+
"temp_target": D(60, 70, 85, 90, 100),
|
54
|
+
}
|
55
|
+
|
44
56
|
DEV_PARAMS_6040: dict[str, DeviceParams] = DEV_PARAMS_7040
|
45
57
|
DEV_PARAMS_8040: dict[str, DeviceParams] = DEV_PARAMS_7040
|
46
58
|
DEV_PARAMS_LEGO = DEV_PARAMS_7040
|
47
59
|
|
48
60
|
DEV_DATA: dict[str, tuple[dict[str, DeviceParams], dict[str, AlibParams], bool]] = {
|
49
|
-
"NEO-01": (
|
61
|
+
"NEO-01": (DEV_PARAMS_NEO, ALIB_PARAMS_7040, False),
|
50
62
|
"83E1": (DEV_PARAMS_LEGO, ALIB_PARAMS_7040, False),
|
51
63
|
}
|
52
64
|
|
@@ -2,10 +2,11 @@ import logging
|
|
2
2
|
import os
|
3
3
|
import subprocess
|
4
4
|
import sys
|
5
|
-
from threading import Event as TEvent
|
6
5
|
from threading import Thread
|
7
6
|
from typing import Literal
|
7
|
+
import shutil
|
8
8
|
import time
|
9
|
+
import signal
|
9
10
|
|
10
11
|
from hhd.plugins import Context, HHDPlugin, load_relative_yaml
|
11
12
|
from hhd.plugins.conf import Config
|
@@ -67,14 +68,18 @@ class AmdGPUPlugin(HHDPlugin):
|
|
67
68
|
self.ppd_conflict = False
|
68
69
|
self.initialized = False
|
69
70
|
self.supports_boost = False
|
71
|
+
self.supports_sched = False
|
72
|
+
self.avail_scheds = {}
|
70
73
|
|
71
74
|
self.proc = None
|
72
75
|
self.t = None
|
73
76
|
|
74
77
|
self.queue = None
|
78
|
+
self.sched_proc = None
|
75
79
|
self.old_ppd = False
|
76
80
|
self.old_gpu = None
|
77
81
|
self.old_freq = None
|
82
|
+
self.old_sched = "disabled"
|
78
83
|
self.old_boost = None
|
79
84
|
self.old_epp = None
|
80
85
|
self.old_target = None
|
@@ -174,6 +179,31 @@ class AmdGPUPlugin(HHDPlugin):
|
|
174
179
|
"cpu_pref"
|
175
180
|
]
|
176
181
|
|
182
|
+
self.avail_scheds = {}
|
183
|
+
avail_pretty = {}
|
184
|
+
kernel_supports = os.path.isfile("/sys/kernel/sched_ext/state")
|
185
|
+
if kernel_supports:
|
186
|
+
for sched, pretty in sets["enabled"]["children"]["mode"]["modes"]["manual"][
|
187
|
+
"children"
|
188
|
+
]["sched"]["options"].items():
|
189
|
+
if sched == "disabled":
|
190
|
+
avail_pretty[sched] = pretty
|
191
|
+
continue
|
192
|
+
|
193
|
+
exe = shutil.which(sched)
|
194
|
+
if exe:
|
195
|
+
self.avail_scheds[sched] = exe
|
196
|
+
avail_pretty[sched] = pretty
|
197
|
+
|
198
|
+
if self.avail_scheds:
|
199
|
+
sets["enabled"]["children"]["mode"]["modes"]["manual"]["children"]["sched"][
|
200
|
+
"options"
|
201
|
+
] = avail_pretty
|
202
|
+
else:
|
203
|
+
del sets["enabled"]["children"]["mode"]["modes"]["manual"]["children"][
|
204
|
+
"sched"
|
205
|
+
]
|
206
|
+
|
177
207
|
self.logged_boost = True
|
178
208
|
return {
|
179
209
|
"tdp": {"amd_energy": sets["enabled"]},
|
@@ -197,7 +227,7 @@ class AmdGPUPlugin(HHDPlugin):
|
|
197
227
|
self.proc.stdin.flush()
|
198
228
|
except Exception as e:
|
199
229
|
logger.error(f"Failed to send PPD mode:\n{e}")
|
200
|
-
self.
|
230
|
+
self.close_ppd()
|
201
231
|
|
202
232
|
def update(self, conf: Config):
|
203
233
|
self.core_enabled = conf["hhd.settings.tdp_enable"].to(bool)
|
@@ -224,9 +254,9 @@ class AmdGPUPlugin(HHDPlugin):
|
|
224
254
|
self.proc, self.t = _open_ppd_server(self.emit)
|
225
255
|
except Exception as e:
|
226
256
|
logger.error(f"Failed to open PPD server:\n{e}")
|
227
|
-
self.
|
257
|
+
self.close_ppd()
|
228
258
|
else:
|
229
|
-
self.
|
259
|
+
self.close_ppd()
|
230
260
|
|
231
261
|
if conf["tdp.amd_energy.mode.mode"].to(str) == "auto":
|
232
262
|
curr = time.perf_counter()
|
@@ -239,6 +269,8 @@ class AmdGPUPlugin(HHDPlugin):
|
|
239
269
|
logger.info(
|
240
270
|
f"Handling energy settings for power profile '{self.target}'."
|
241
271
|
)
|
272
|
+
# Unless it is set manually, use the default scheduler.
|
273
|
+
self.close_sched()
|
242
274
|
try:
|
243
275
|
match self.target:
|
244
276
|
case "balanced":
|
@@ -329,10 +361,43 @@ class AmdGPUPlugin(HHDPlugin):
|
|
329
361
|
except Exception as e:
|
330
362
|
logger.error(f"Failed to set minimum CPU frequency:\n{e}")
|
331
363
|
|
332
|
-
|
364
|
+
if self.avail_scheds:
|
365
|
+
# Check health and print error
|
366
|
+
if self.sched_proc and self.sched_proc.poll():
|
367
|
+
err = self.sched_proc.poll()
|
368
|
+
self.sched_proc = None
|
369
|
+
logger.error(
|
370
|
+
f"Scheduler from sched_ext '{self.old_sched}' closed with error code: {err}"
|
371
|
+
)
|
372
|
+
|
373
|
+
new_sched = conf.get("tdp.amd_energy.mode.manual.sched", "disabled")
|
374
|
+
if new_sched != self.old_sched:
|
375
|
+
self.close_sched()
|
376
|
+
self.old_sched = new_sched
|
377
|
+
if new_sched and new_sched != "disabled":
|
378
|
+
logger.info(f"Starting sched_ext scheduler '{new_sched}'")
|
379
|
+
self.sched_proc = subprocess.Popen(
|
380
|
+
self.avail_scheds[new_sched],
|
381
|
+
stderr=subprocess.DEVNULL,
|
382
|
+
stdout=subprocess.DEVNULL,
|
383
|
+
)
|
384
|
+
|
385
|
+
def close_ppd(self):
|
333
386
|
if self.proc is not None:
|
334
|
-
self.proc.
|
387
|
+
self.proc.send_signal(signal.SIGINT)
|
335
388
|
self.proc.wait()
|
389
|
+
self.proc = None
|
336
390
|
if self.t is not None:
|
337
391
|
self.t.join()
|
338
392
|
self.t = None
|
393
|
+
|
394
|
+
def close_sched(self):
|
395
|
+
if self.sched_proc is not None:
|
396
|
+
logger.info(f"Closing sched_ext scheduler '{self.old_sched}'.")
|
397
|
+
self.sched_proc.send_signal(signal.SIGINT)
|
398
|
+
self.sched_proc.wait()
|
399
|
+
self.sched_proc = None
|
400
|
+
|
401
|
+
def close(self):
|
402
|
+
self.close_ppd()
|
403
|
+
self.close_sched()
|
@@ -1,7 +1,7 @@
|
|
1
1
|
enabled:
|
2
2
|
title: Energy Management
|
3
3
|
type: container
|
4
|
-
tags: [ hide-title ]
|
4
|
+
tags: [ hide-title, non-essential ]
|
5
5
|
children:
|
6
6
|
mode:
|
7
7
|
type: mode
|
@@ -87,6 +87,19 @@ enabled:
|
|
87
87
|
max: 2000
|
88
88
|
step: 100
|
89
89
|
default: 1000
|
90
|
+
sched:
|
91
|
+
type: multiple
|
92
|
+
title: Custom Scheduler
|
93
|
+
hint: >-
|
94
|
+
Allows attaching a scheduler to the kernel sched_ext.
|
95
|
+
Schedulers need to be installed.
|
96
|
+
"Kernel" .
|
97
|
+
options:
|
98
|
+
disabled: Disabled
|
99
|
+
scx_lavd: LAVD
|
100
|
+
scx_bpfland: bpfland
|
101
|
+
scx_rusty: rusty
|
102
|
+
default: disabled
|
90
103
|
|
91
104
|
conflict:
|
92
105
|
title: Energy Management
|
@@ -119,6 +132,6 @@ core:
|
|
119
132
|
amd_energy_ppd:
|
120
133
|
title: Enable PPD Emulation (KDE/Gnome Power)
|
121
134
|
type: bool
|
122
|
-
default:
|
135
|
+
default: True
|
123
136
|
hint: >-
|
124
137
|
Enable PPD service to manage the power preferences for the system.
|
@@ -100,17 +100,16 @@ children:
|
|
100
100
|
charge_limit:
|
101
101
|
type: multiple
|
102
102
|
title: Charge Limit (%)
|
103
|
-
tags: [ non-essential ]
|
103
|
+
tags: [ non-essential, ordinal ]
|
104
104
|
hint: >-
|
105
105
|
Applies a charge limit to the battery, 75% and up.
|
106
106
|
options:
|
107
|
-
disabled: Disabled
|
108
|
-
p65: 65%
|
109
107
|
p70: 70%
|
110
108
|
p80: 80%
|
111
109
|
p85: 85%
|
112
110
|
p90: 90%
|
113
111
|
p95: 95%
|
112
|
+
disabled: Unset
|
114
113
|
default: disabled
|
115
114
|
|
116
115
|
# disclaimer:
|
@@ -274,6 +274,18 @@ def autodetect(existing: Sequence[HHDPlugin]) -> Sequence[HHDPlugin]:
|
|
274
274
|
|
275
275
|
if not drivers_matched and prod in DEV_DATA:
|
276
276
|
dev, cpu, pp_enable = DEV_DATA[prod]
|
277
|
+
|
278
|
+
try:
|
279
|
+
# Set values for the steam slider
|
280
|
+
if dev["skin_limit"].smin:
|
281
|
+
min_tdp = dev["skin_limit"].smin
|
282
|
+
if dev["skin_limit"].default:
|
283
|
+
default_tdp = dev["skin_limit"].default
|
284
|
+
if dev["skin_limit"].smax:
|
285
|
+
max_tdp = dev["skin_limit"].smax
|
286
|
+
except Exception as e:
|
287
|
+
logger.error(f"Failed to get TDP limits for {prod}:\n{e}")
|
288
|
+
|
277
289
|
pp_enable |= bool(os.environ.get("HHD_ADJ_DEBUG"))
|
278
290
|
drivers.append(
|
279
291
|
SmuDriverPlugin(
|
@@ -0,0 +1,152 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: adjustor
|
3
|
+
Version: 3.3.0
|
4
|
+
Summary: Adjustor, a userspace program for managing the TDP of handheld devices.
|
5
|
+
Author-email: Kapenekakis Antheas <pypi@antheas.dev>
|
6
|
+
Project-URL: Homepage, https://github.com/hhd-dev/adjustor
|
7
|
+
Project-URL: Bug Tracker, https://github.com/hhd-dev/adjustor/issues
|
8
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
12
|
+
Classifier: Operating System :: POSIX :: Linux
|
13
|
+
Requires-Python: >=3.10
|
14
|
+
Description-Content-Type: text/markdown
|
15
|
+
License-File: LICENSE
|
16
|
+
Requires-Dist: rich>=13.5.2
|
17
|
+
Requires-Dist: pyroute2>=0.7.3
|
18
|
+
Requires-Dist: fuse-python>=1.0.7
|
19
|
+
Requires-Dist: PyGObject>=3.46.0
|
20
|
+
Requires-Dist: dbus-python>=1.3.2
|
21
|
+
|
22
|
+
# Adjustor
|
23
|
+
Home of the Adjustor TDP plugin for Handheld Daemon.
|
24
|
+
Adjustor currently allows for TDP control of all AMD Handhelds past generation
|
25
|
+
6### (support is added manually).
|
26
|
+
Intel is not currently supported.
|
27
|
+
For installation and usage, see the [main readme](https://github.com/hhd-dev/hhd).
|
28
|
+
Adjustor supports all handhelds in the Handheld Daemon supported list,
|
29
|
+
except intel handhelds and older prior to 6XXX AMD handhelds.
|
30
|
+
|
31
|
+
> [!IMPORTANT]
|
32
|
+
> Adjustor supports per-device TDP values but its database is not fully featured
|
33
|
+
> yet, with a fallback to 0-30W for missing devices
|
34
|
+
> that use the ALIB driver. Use common sense while on battery and reference
|
35
|
+
> your manufacturer's spec sheet. Open an issue so your device can have correct
|
36
|
+
> limits.
|
37
|
+
|
38
|
+
## TDP Control
|
39
|
+
For the ROG Ally, Ally X and Legion Go that have an ACPI/EC implementation for
|
40
|
+
bios and fan curves,
|
41
|
+
Adjustor uses the manufactuer functions for setting TDP.
|
42
|
+
For the Allys, the asus-wmi kernel driver is used to set the tdp and manage the
|
43
|
+
fan curves.
|
44
|
+
For the Go, Lenovo's WMI methods are called through `acpi_call`, which will hopefully
|
45
|
+
become part of a driver in the future.
|
46
|
+
|
47
|
+
For other devices, Adjustor implements a reverse engineered version of AMD's
|
48
|
+
vendor function for setting TDP on demand in Ryzen processors, through ACPI.
|
49
|
+
This means that it can be used regardless of the current memory policy
|
50
|
+
or secure-boot/lockdown status (provided the module `acpi_call` is installed.).
|
51
|
+
For more, see [AMD TDP Control Details](#amd-tdp).
|
52
|
+
|
53
|
+
In all cases, there are checks to ensure that the TDP is within the safe range
|
54
|
+
of the processors.
|
55
|
+
|
56
|
+
## Energy Management
|
57
|
+
Adjustor can also manage the energy profile of the processor, by setting EPP
|
58
|
+
and proper frequency values.
|
59
|
+
After we transitioned people away from Decky plugins (which had some governor controls)
|
60
|
+
to using Handheld Daemon for TDP, we found that Power Profiles Daemon (PPD)
|
61
|
+
would use aggressive CPU values.
|
62
|
+
These values are optimized for devices that have a dedicated power budget for the CPU
|
63
|
+
(e.g., laptops, desktops), which caused issues with handhelds.
|
64
|
+
|
65
|
+
For example, the balanced PPD profile would set EPP to balance_performance and
|
66
|
+
enable CPU boost, which would increase the draw of the CPU during gaming by 2W
|
67
|
+
and idle CPU temperature from 55C to around 70C.
|
68
|
+
The performance profile would switch the governor to performance and set EPP to
|
69
|
+
performance, which would exacerbate this problem.
|
70
|
+
In addition, the KDE and Gnome sliders were confusing for users, as they did not
|
71
|
+
affect TDP (which is mostly determined by the GPU which is unaffected by PPD).
|
72
|
+
|
73
|
+
Starting with version 3.1, when PPD is not present, Adjustor will manage the
|
74
|
+
EPP, boost, and minimum frequency of the processor itself.
|
75
|
+
By default, this is automatic, with sane values for handhelds:
|
76
|
+
- governor is always powersave
|
77
|
+
- EPP is power or balance_power
|
78
|
+
- boost is enabled only on high TDPs
|
79
|
+
- On high TDPs, minimum frequency is ~1Ghz (min. nonlinear). Was found to help frame
|
80
|
+
pacing on the Ally and VRR displays.
|
81
|
+
|
82
|
+
The user can also tweak the values themselves, as certain games have a preference
|
83
|
+
for high CPU utilization.
|
84
|
+
During testing, it was found that disabling CPU boost and lowering EPP results
|
85
|
+
in a modest 10 fps increase on high TDPs and around 1W of less power consumption
|
86
|
+
on non-demanding games.
|
87
|
+
|
88
|
+
In addition, Adjustor will emulate the dbus protocol of PPD, so that the sliders in
|
89
|
+
KDE Powerdevil and Gnome shell work as expected, and make them control the
|
90
|
+
TDP range instead of CPU values (which is the user's expectation).
|
91
|
+
Of course, depending on TDP and user preference, the CPU governor values will be set
|
92
|
+
accordingly.
|
93
|
+
|
94
|
+
## AMD TDP Control Details<a name="amd-tdp"></a>
|
95
|
+
Adjustor controls TDP through the Dynamic Power and Thermal Configuration Interface
|
96
|
+
of AMD, which exposes a superset of the parameters that can be currently found in
|
97
|
+
[RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/), through ACPI.
|
98
|
+
This vendor interface is part of the ACPI ASL library, and provided through the
|
99
|
+
ALIB method 0x0C.
|
100
|
+
The underlying implementation of the interface is SMU calls.
|
101
|
+
This means that as long as the kernel module `acpi_call` is loaded, Adjustor
|
102
|
+
can control TDP in an equivalent way to [RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/).
|
103
|
+
|
104
|
+
The ABI of this vendor function (as it is provided to manufacturers) can be
|
105
|
+
considered mostly stable, so little work is needed between subsequent
|
106
|
+
processor generations (it has not changed since 6XXX; previous
|
107
|
+
generations only had additions).
|
108
|
+
Of course, support for processors is only added after the ACPI bindings have
|
109
|
+
been reviewed, to avoid surprises.
|
110
|
+
Both the Ally and Legion Go use this function, in the exact same way, so setting
|
111
|
+
TDP with it is very stable, and we have had no reported crashes.
|
112
|
+
It should not be used (and is not used) with those devices, however, as the
|
113
|
+
manufacturer functions will interfere.
|
114
|
+
|
115
|
+
Unfortunately for devices that do have an ACPI/EC implementation for TDP, there
|
116
|
+
is no official way of setting TDP on demand, either on Linux or Windows, with
|
117
|
+
TDP remaining to what is set on the BIOS level.
|
118
|
+
Vendors that offer this functionality without an ACPI implementation
|
119
|
+
(such as Ayaneo), use RyzenAdj on Windows (can be seen on the Ayaneo Space directory).
|
120
|
+
This is not ideal, as RyzenAdj does not hold a lock while performing
|
121
|
+
SMU calls, and may perform them at the same time as the GPU driver which can
|
122
|
+
confuse it and cause a kernel panic.
|
123
|
+
We have recorded crashes with it both on Windows and Linux with implementations
|
124
|
+
which set TDP at a frequent interval (5-10s; unrelated
|
125
|
+
to this project; as neither AutoTDP or RyzenAdj are used).
|
126
|
+
|
127
|
+
Right now, Adjustor only implements a subset of useful ALIB parameters that are
|
128
|
+
well documented.
|
129
|
+
In addition, ALIB does not provide a way for reading the performance metrics table,
|
130
|
+
which is meant for debugging, so Adjustor can only write (not read) TDP values.
|
131
|
+
For that purpose, refer to [RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/).
|
132
|
+
From reverse engineering the Legion Go (see [here](./alib.md)), and seeing how it
|
133
|
+
interacts with ALIB, it was found that there are at least 10 parameters which control
|
134
|
+
the method STTv2 and are not part of RyzenAdj or have been documented elsewhere.
|
135
|
+
|
136
|
+
## Installation
|
137
|
+
Adjustor is installed as part of Handheld Daemon now, so follow the instructions
|
138
|
+
at [the main repository](https://github.com/hhd-dev/hhd#installation-instructions).
|
139
|
+
It is available in [AUR](https://aur.archlinux.org/packages/adjustor),
|
140
|
+
[COPR](https://copr.fedorainfracloud.org/coprs/hhd-dev/hhd/package/adjustor/),
|
141
|
+
and [PyPi](https://github.com/hhd-dev/adjustor/issues).
|
142
|
+
|
143
|
+
## Development
|
144
|
+
Install to the same virtual environment as Handheld Daemon to have Adjustor picked up
|
145
|
+
as a plugin upon restart, or to its own virtual environment to use independently.
|
146
|
+
```python
|
147
|
+
pip install -e .
|
148
|
+
```
|
149
|
+
|
150
|
+
# License
|
151
|
+
Adjustor is licensed under THE GNU GPLv3+. See LICENSE for details.
|
152
|
+
Versions prior to and excluding 2.0.0 are licensed using MIT.
|
adjustor-3.2.0/PKG-INFO
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: adjustor
|
3
|
-
Version: 3.2.0
|
4
|
-
Summary: Adjustor, a userspace program for managing the TDP of handheld devices.
|
5
|
-
Author-email: Kapenekakis Antheas <pypi@antheas.dev>
|
6
|
-
Project-URL: Homepage, https://github.com/hhd-dev/adjustor
|
7
|
-
Project-URL: Bug Tracker, https://github.com/hhd-dev/adjustor/issues
|
8
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
9
|
-
Classifier: Programming Language :: Python :: 3.10
|
10
|
-
Classifier: Programming Language :: Python :: 3.11
|
11
|
-
Classifier: Programming Language :: Python :: 3.12
|
12
|
-
Classifier: Operating System :: POSIX :: Linux
|
13
|
-
Requires-Python: >=3.10
|
14
|
-
Description-Content-Type: text/markdown
|
15
|
-
License-File: LICENSE
|
16
|
-
Requires-Dist: rich>=13.5.2
|
17
|
-
Requires-Dist: pyroute2>=0.7.3
|
18
|
-
Requires-Dist: fuse-python>=1.0.7
|
19
|
-
Requires-Dist: PyGObject>=3.46.0
|
20
|
-
Requires-Dist: dbus-python>=1.3.2
|
21
|
-
|
22
|
-
# Adjustor
|
23
|
-
Home of the Adjustor TDP plugin for Handheld Daemon.
|
24
|
-
Adjustor currently allows for TDP control of all AMD Handhelds past generation
|
25
|
-
6### (support is added manually).
|
26
|
-
Since it integrates with Handheld Daemon, it is available through
|
27
|
-
[Decky](https://github.com/hhd-dev/hhd-decky),
|
28
|
-
and through [hhd-ui](https://github.com/hhd-dev/hhd-ui).
|
29
|
-
|
30
|
-
Adjustor implements a reversed engineered version of AMD's vendor function for
|
31
|
-
setting TDP on demand in Ryzen processors, through ACPI.
|
32
|
-
This means that it can be used regardless of the current memory policy
|
33
|
-
or secure-boot/lockdown status (provided the module `acpi_call` is installed.).
|
34
|
-
|
35
|
-
For the ROG Ally and Legion Go that have an ACPI/EC implementation for bios and fan curves,
|
36
|
-
Adjustor uses the manufactuer way for setting TDP.
|
37
|
-
For the ally, the asus-wmi kernel driver is used to set the tdp and manage the
|
38
|
-
fan curves.
|
39
|
-
For the go, Lenovo's WMI methods are called through `acpi_call`, which will hopefully
|
40
|
-
become part of a driver in the future.
|
41
|
-
|
42
|
-
## AMD TDP Control
|
43
|
-
Adjustor controls TDP through the Dynamic Power and Thermal Configuration Interface
|
44
|
-
of AMD, which exposes a superset of the parameters that can be currently found in
|
45
|
-
[RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/), through ACPI.
|
46
|
-
This vendor interface is part of the ACPI ASL library, and provided through the
|
47
|
-
ALIB method 0x0C.
|
48
|
-
The underlying implementation of the interface is SMU calls.
|
49
|
-
This means that as long as the kernel module `acpi_call` is loaded, Adjustor
|
50
|
-
can control TDP in an equivalent way to [RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/).
|
51
|
-
|
52
|
-
Right now, Adjustor only implements a subset of useful ALIB parameters that are
|
53
|
-
well documented.
|
54
|
-
In addition, ALIB does not provide a way for reading the performance metrics table,
|
55
|
-
so Adjustor can only write (not read) TDP values.
|
56
|
-
From reverse engineering the Legion Go (see [here](./alib.md)), and seeing how it
|
57
|
-
interacts with ALIB, it was found that there are at least 10 parameters which control
|
58
|
-
the method STTv2 and are not part of RyzenAdj or have been documented elsewhere.
|
59
|
-
|
60
|
-
## Installation
|
61
|
-
Adjustor is available on [AUR](https://aur.archlinux.org/packages/adjustor)
|
62
|
-
and provided Handheld Daemon has been installed through
|
63
|
-
[AUR](https://aur.archlinux.org/packages/hhd) too, it will load it automatically
|
64
|
-
on restart.
|
65
|
-
COPR coming soon.
|
66
|
-
|
67
|
-
Alternatively, on a local install of Handheld Daemon you may:
|
68
|
-
```bash
|
69
|
-
~/.local/share/hhd/venv/bin/pip install --upgrade adjustor
|
70
|
-
```
|
71
|
-
However, the autoupdater in Handheld Daemon does not support updating yet.
|
72
|
-
|
73
|
-
## Development
|
74
|
-
Install to the same virtual environment as hhd to have Adjustor picked up
|
75
|
-
as a plugin upon restart, or to its own venv to use independently.
|
76
|
-
```python
|
77
|
-
pip install -e .
|
78
|
-
```
|
79
|
-
|
80
|
-
# License
|
81
|
-
Adjustor is licensed under THE GNU GPLv3+. See LICENSE for details.
|
82
|
-
Versions prior to and excluding 2.0.0 are licensed using MIT.
|
adjustor-3.2.0/readme.md
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
# Adjustor
|
2
|
-
Home of the Adjustor TDP plugin for Handheld Daemon.
|
3
|
-
Adjustor currently allows for TDP control of all AMD Handhelds past generation
|
4
|
-
6### (support is added manually).
|
5
|
-
Since it integrates with Handheld Daemon, it is available through
|
6
|
-
[Decky](https://github.com/hhd-dev/hhd-decky),
|
7
|
-
and through [hhd-ui](https://github.com/hhd-dev/hhd-ui).
|
8
|
-
|
9
|
-
Adjustor implements a reversed engineered version of AMD's vendor function for
|
10
|
-
setting TDP on demand in Ryzen processors, through ACPI.
|
11
|
-
This means that it can be used regardless of the current memory policy
|
12
|
-
or secure-boot/lockdown status (provided the module `acpi_call` is installed.).
|
13
|
-
|
14
|
-
For the ROG Ally and Legion Go that have an ACPI/EC implementation for bios and fan curves,
|
15
|
-
Adjustor uses the manufactuer way for setting TDP.
|
16
|
-
For the ally, the asus-wmi kernel driver is used to set the tdp and manage the
|
17
|
-
fan curves.
|
18
|
-
For the go, Lenovo's WMI methods are called through `acpi_call`, which will hopefully
|
19
|
-
become part of a driver in the future.
|
20
|
-
|
21
|
-
## AMD TDP Control
|
22
|
-
Adjustor controls TDP through the Dynamic Power and Thermal Configuration Interface
|
23
|
-
of AMD, which exposes a superset of the parameters that can be currently found in
|
24
|
-
[RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/), through ACPI.
|
25
|
-
This vendor interface is part of the ACPI ASL library, and provided through the
|
26
|
-
ALIB method 0x0C.
|
27
|
-
The underlying implementation of the interface is SMU calls.
|
28
|
-
This means that as long as the kernel module `acpi_call` is loaded, Adjustor
|
29
|
-
can control TDP in an equivalent way to [RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/).
|
30
|
-
|
31
|
-
Right now, Adjustor only implements a subset of useful ALIB parameters that are
|
32
|
-
well documented.
|
33
|
-
In addition, ALIB does not provide a way for reading the performance metrics table,
|
34
|
-
so Adjustor can only write (not read) TDP values.
|
35
|
-
From reverse engineering the Legion Go (see [here](./alib.md)), and seeing how it
|
36
|
-
interacts with ALIB, it was found that there are at least 10 parameters which control
|
37
|
-
the method STTv2 and are not part of RyzenAdj or have been documented elsewhere.
|
38
|
-
|
39
|
-
## Installation
|
40
|
-
Adjustor is available on [AUR](https://aur.archlinux.org/packages/adjustor)
|
41
|
-
and provided Handheld Daemon has been installed through
|
42
|
-
[AUR](https://aur.archlinux.org/packages/hhd) too, it will load it automatically
|
43
|
-
on restart.
|
44
|
-
COPR coming soon.
|
45
|
-
|
46
|
-
Alternatively, on a local install of Handheld Daemon you may:
|
47
|
-
```bash
|
48
|
-
~/.local/share/hhd/venv/bin/pip install --upgrade adjustor
|
49
|
-
```
|
50
|
-
However, the autoupdater in Handheld Daemon does not support updating yet.
|
51
|
-
|
52
|
-
## Development
|
53
|
-
Install to the same virtual environment as hhd to have Adjustor picked up
|
54
|
-
as a plugin upon restart, or to its own venv to use independently.
|
55
|
-
```python
|
56
|
-
pip install -e .
|
57
|
-
```
|
58
|
-
|
59
|
-
# License
|
60
|
-
Adjustor is licensed under THE GNU GPLv3+. See LICENSE for details.
|
61
|
-
Versions prior to and excluding 2.0.0 are licensed using MIT.
|
@@ -1,82 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: adjustor
|
3
|
-
Version: 3.2.0
|
4
|
-
Summary: Adjustor, a userspace program for managing the TDP of handheld devices.
|
5
|
-
Author-email: Kapenekakis Antheas <pypi@antheas.dev>
|
6
|
-
Project-URL: Homepage, https://github.com/hhd-dev/adjustor
|
7
|
-
Project-URL: Bug Tracker, https://github.com/hhd-dev/adjustor/issues
|
8
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
9
|
-
Classifier: Programming Language :: Python :: 3.10
|
10
|
-
Classifier: Programming Language :: Python :: 3.11
|
11
|
-
Classifier: Programming Language :: Python :: 3.12
|
12
|
-
Classifier: Operating System :: POSIX :: Linux
|
13
|
-
Requires-Python: >=3.10
|
14
|
-
Description-Content-Type: text/markdown
|
15
|
-
License-File: LICENSE
|
16
|
-
Requires-Dist: rich>=13.5.2
|
17
|
-
Requires-Dist: pyroute2>=0.7.3
|
18
|
-
Requires-Dist: fuse-python>=1.0.7
|
19
|
-
Requires-Dist: PyGObject>=3.46.0
|
20
|
-
Requires-Dist: dbus-python>=1.3.2
|
21
|
-
|
22
|
-
# Adjustor
|
23
|
-
Home of the Adjustor TDP plugin for Handheld Daemon.
|
24
|
-
Adjustor currently allows for TDP control of all AMD Handhelds past generation
|
25
|
-
6### (support is added manually).
|
26
|
-
Since it integrates with Handheld Daemon, it is available through
|
27
|
-
[Decky](https://github.com/hhd-dev/hhd-decky),
|
28
|
-
and through [hhd-ui](https://github.com/hhd-dev/hhd-ui).
|
29
|
-
|
30
|
-
Adjustor implements a reversed engineered version of AMD's vendor function for
|
31
|
-
setting TDP on demand in Ryzen processors, through ACPI.
|
32
|
-
This means that it can be used regardless of the current memory policy
|
33
|
-
or secure-boot/lockdown status (provided the module `acpi_call` is installed.).
|
34
|
-
|
35
|
-
For the ROG Ally and Legion Go that have an ACPI/EC implementation for bios and fan curves,
|
36
|
-
Adjustor uses the manufactuer way for setting TDP.
|
37
|
-
For the ally, the asus-wmi kernel driver is used to set the tdp and manage the
|
38
|
-
fan curves.
|
39
|
-
For the go, Lenovo's WMI methods are called through `acpi_call`, which will hopefully
|
40
|
-
become part of a driver in the future.
|
41
|
-
|
42
|
-
## AMD TDP Control
|
43
|
-
Adjustor controls TDP through the Dynamic Power and Thermal Configuration Interface
|
44
|
-
of AMD, which exposes a superset of the parameters that can be currently found in
|
45
|
-
[RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/), through ACPI.
|
46
|
-
This vendor interface is part of the ACPI ASL library, and provided through the
|
47
|
-
ALIB method 0x0C.
|
48
|
-
The underlying implementation of the interface is SMU calls.
|
49
|
-
This means that as long as the kernel module `acpi_call` is loaded, Adjustor
|
50
|
-
can control TDP in an equivalent way to [RyzenAdj](https://github.dev/FlyGoat/RyzenAdj/).
|
51
|
-
|
52
|
-
Right now, Adjustor only implements a subset of useful ALIB parameters that are
|
53
|
-
well documented.
|
54
|
-
In addition, ALIB does not provide a way for reading the performance metrics table,
|
55
|
-
so Adjustor can only write (not read) TDP values.
|
56
|
-
From reverse engineering the Legion Go (see [here](./alib.md)), and seeing how it
|
57
|
-
interacts with ALIB, it was found that there are at least 10 parameters which control
|
58
|
-
the method STTv2 and are not part of RyzenAdj or have been documented elsewhere.
|
59
|
-
|
60
|
-
## Installation
|
61
|
-
Adjustor is available on [AUR](https://aur.archlinux.org/packages/adjustor)
|
62
|
-
and provided Handheld Daemon has been installed through
|
63
|
-
[AUR](https://aur.archlinux.org/packages/hhd) too, it will load it automatically
|
64
|
-
on restart.
|
65
|
-
COPR coming soon.
|
66
|
-
|
67
|
-
Alternatively, on a local install of Handheld Daemon you may:
|
68
|
-
```bash
|
69
|
-
~/.local/share/hhd/venv/bin/pip install --upgrade adjustor
|
70
|
-
```
|
71
|
-
However, the autoupdater in Handheld Daemon does not support updating yet.
|
72
|
-
|
73
|
-
## Development
|
74
|
-
Install to the same virtual environment as hhd to have Adjustor picked up
|
75
|
-
as a plugin upon restart, or to its own venv to use independently.
|
76
|
-
```python
|
77
|
-
pip install -e .
|
78
|
-
```
|
79
|
-
|
80
|
-
# License
|
81
|
-
Adjustor is licensed under THE GNU GPLv3+. See LICENSE for details.
|
82
|
-
Versions prior to and excluding 2.0.0 are licensed using MIT.
|
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.2.0 → adjustor-3.3.0}/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.2.0 → adjustor-3.3.0}/usr/share/dbus-1/system.d/hhd-net.hadess.PowerProfiles.conf
RENAMED
File without changes
|