adjustor 3.2.0__tar.gz → 3.2.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. adjustor-3.2.1/PKG-INFO +152 -0
  2. {adjustor-3.2.0 → adjustor-3.2.1}/pyproject.toml +1 -1
  3. adjustor-3.2.1/readme.md +131 -0
  4. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/amd/settings.yml +2 -2
  5. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/asus/settings.yml +2 -3
  6. adjustor-3.2.1/src/adjustor.egg-info/PKG-INFO +152 -0
  7. adjustor-3.2.0/PKG-INFO +0 -82
  8. adjustor-3.2.0/readme.md +0 -61
  9. adjustor-3.2.0/src/adjustor.egg-info/PKG-INFO +0 -82
  10. {adjustor-3.2.0 → adjustor-3.2.1}/LICENSE +0 -0
  11. {adjustor-3.2.0 → adjustor-3.2.1}/MANIFEST.in +0 -0
  12. {adjustor-3.2.0 → adjustor-3.2.1}/setup.cfg +0 -0
  13. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/__init__.py +0 -0
  14. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/__main__.py +0 -0
  15. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/core/__init__.py +0 -0
  16. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/core/acpi.py +0 -0
  17. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/core/alib.py +0 -0
  18. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/core/const.py +0 -0
  19. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/core/lenovo.py +0 -0
  20. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/core/platform.py +0 -0
  21. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/__init__.py +0 -0
  22. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/amd/__init__.py +0 -0
  23. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/amd/power-profiles-daemon.dbus.xml.in +0 -0
  24. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/amd/ppd.py +0 -0
  25. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/asus/__init__.py +0 -0
  26. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/lenovo/__init__.py +0 -0
  27. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/lenovo/settings.yml +0 -0
  28. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/smu/__init__.py +0 -0
  29. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/smu/qam.yml +0 -0
  30. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/drivers/smu/smu.yml +0 -0
  31. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/events.py +0 -0
  32. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/fuse/__init__.py +0 -0
  33. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/fuse/driver.py +0 -0
  34. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/fuse/gpu.py +0 -0
  35. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/fuse/utils.py +0 -0
  36. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/hhd.py +0 -0
  37. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/i18n.py +0 -0
  38. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor/settings.yml +0 -0
  39. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor.egg-info/SOURCES.txt +0 -0
  40. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor.egg-info/dependency_links.txt +0 -0
  41. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor.egg-info/entry_points.txt +0 -0
  42. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor.egg-info/requires.txt +0 -0
  43. {adjustor-3.2.0 → adjustor-3.2.1}/src/adjustor.egg-info/top_level.txt +0 -0
  44. {adjustor-3.2.0 → adjustor-3.2.1}/usr/share/dbus-1/system.d/hhd-net.hadess.PowerProfiles.conf +0 -0
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.1
2
+ Name: adjustor
3
+ Version: 3.2.1
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.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "adjustor"
3
- version = "3.2.0"
3
+ version = "3.2.1"
4
4
  authors = [
5
5
  { name="Kapenekakis Antheas", email="pypi@antheas.dev" },
6
6
  ]
@@ -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.
@@ -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
@@ -119,6 +119,6 @@ core:
119
119
  amd_energy_ppd:
120
120
  title: Enable PPD Emulation (KDE/Gnome Power)
121
121
  type: bool
122
- default: False
122
+ default: True
123
123
  hint: >-
124
124
  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:
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.1
2
+ Name: adjustor
3
+ Version: 3.2.1
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