Adjust power management settings for Ryzen CPUs on Linux, Windows, and macOS
Project description
ZenMaster
Overview
ZenMaster adjusts power limits, temperatures, VRM currents, clocks, voltages, and Curve Optimizer offsets on AMD Ryzen CPUs and APUs, no BIOS access needed. Runs on Linux, Windows, and macOS (AMD Hackintosh). Same CLI as RyzenAdj, so your existing scripts and presets just work, except you pip install it instead of building it.
pip install zenmaster
sudo zenmaster --stapm-limit=15000 --fast-limit=20000 --tctl-temp=90
What you get over RyzenAdj itself:
- No cmake, no libpci, no build step.
pip installand you're done. - Same
--name=valueargs, so nothing you already have breaks. - PawnIO on Windows, not WinRing0. WinRing0 has known CVEs, PawnIO doesn't.
--helponly lists what your CPU actually supports.--tablefor a labeled sensor readout,--sensorsfor a compact live view,--jsonwhen you need to parse it.--reapply=Nif you want the settings to stick against other software fighting you.import zenmasterworks as a library on all three platforms.- Zero mandatory third-party dependencies, anywhere.
Full documentation is in the Wiki, this README is just the overview. See below for what's there.
Documentation
| Page | What's in it |
|---|---|
| Installation | Linux, Windows, and macOS setup: ryzen_smu, PawnIO, DirectHW |
| CLI Usage | Every option, examples, JSON output |
| Tuning Arguments | Full argument reference with units |
| PM Table and Monitoring | --table / --sensors / --dump-table |
| Library API | Embedding ZenMaster in Python |
| How ZenMaster Talks to the SMU | The mailbox protocol, and how each OS reaches it |
| Architecture | Package layout, internals, opcode tables |
| Troubleshooting | Fixes for the common problems |
| FAQ | Short answers |
Compatibility
| Platform | Privileges | Driver |
|---|---|---|
| Linux, Python 3.10+ | root | ryzen_smu module, or PCI direct access |
| Windows, Python 3.10+ | Administrator | PawnIO |
| macOS (AMD Hackintosh), Python 3.10+ | root | DirectHW.kext, or the kext-free IOPCIBridge path (tuning only) |
| Intel | n/a | Not supported |
[!NOTE] On Linux, PCI direct access works on most systems without any kernel module.
ryzen_smuis only required when Secure Boot is enabled, since kernel lockdown blocks raw PCI access. Install ryzen_smu ≥ 0.1.7 and enroll the signing key in that case. Full detail on why: the How ZenMaster Talks to the SMU wiki page.
[!WARNING] This tool writes directly to the CPU's System Management Unit. Wrong values can cause instability, throttling, or a hard lock. Use at your own risk.
Quick start
Linux:
pip install zenmaster
sudo zenmaster --stapm-limit=15000 --fast-limit=20000 --tctl-temp=90
Windows (install PawnIO first, reboot, then open an Administrator terminal):
pip install zenmaster
zenmaster --stapm-limit=15000 --fast-limit=20000 --tctl-temp=90
macOS (AMD Hackintosh, needs DirectHW.kext or the --iopci fallback, see the wiki):
pip3 install zenmaster
sudo python3 -m zenmaster --stapm-limit=15000 --fast-limit=20000 --tctl-temp=90
Check what your CPU supports with zenmaster --help; it only lists arguments your family actually has. Full walkthrough for each OS, including driver setup: the Installation wiki page.
Library usage
Meant to be embedded, not just run standalone.
import zenmaster
from zenmaster import detect, apply, smu
info = detect()
smu.init()
results, rejected = apply("--stapm-limit=15000 --tctl-temp=90", info.family)
for r in results:
print(r["arg"], smu.status_name(r["status"]))
py.typed ships in the package, so your type checker sees real signatures. smu.init() raises BackendUnavailable on failure; any SMU call before init() raises SMUNotInitialized; both subclass ZenMasterError (itself a RuntimeError). Full API reference, including reading sensors, low-level mailbox access, and two runnable examples ported from RyzenAdj: the Library API wiki page.
How it compares to RyzenAdj
Same argument names, same SMU opcode semantics. Drop-in for most use cases, minus the build step and WinRing0.
| RyzenAdj | ZenMaster | |
|---|---|---|
| Install | Build from source (cmake, pkg-config, libpci) | pip install zenmaster |
| Language | C | Pure Python 3.10+ |
| Windows driver | WinRing0 ⚠️ | PawnIO ✅ |
--help |
Static, lists every argument | Dynamic, only your CPU's arguments |
| Output | Plain text | Plain text or --json |
| PM table | Raw float dump | Labeled fields with units (--table), or a compact live view (--sensors) |
| Use as a library | Link the C libryzenadj / shell out |
import zenmaster |
| Build dependencies | cmake, make, libpci | None |
| Platforms | Windows and Linux | Linux, Windows, and macOS (Hackintosh) |
On WinRing0
RyzenAdj's Windows backend is WinRing0 (OlsApi / OpenLibSys). It has actual CVEs (CVE-2020-14979, CVE-2021-41285) and hands any unprivileged process full read/write to physical memory, PCI config space, I/O ports. A few AV vendors just flag it outright.
ZenMaster uses PawnIO instead: Microsoft-signed, narrow IOCTL interface, no raw physical-memory access, no CVEs on record.
Supported CPUs
First-gen Ryzen (Summit Ridge / Zen 1) through Ryzen 9000 and Strix Halo, APU and desktop. Run zenmaster --info to confirm detection and socket mapping. PM table support (--table/--sensors) is a narrower list, mostly APUs and mobile parts, see the Tuning Arguments and PM Table and Monitoring wiki pages.
Updating
pip install -U zenmaster
zenmaster --version checks PyPI for a newer release without updating; zenmaster.check_update() does the same from code.
Acknowledgments
| Project | Contribution |
|---|---|
| RyzenAdj | Inspiration for the tool as a whole, and canonical argument names |
| Universal x86 Tuning Utility | SMU opcode tables, Windows PawnIO path, and CPU detection approach |
| UXTU4Linux | Core reference implementation: Linux backend logic and hardware detection |
| ryzen_smu | Linux kernel module for SMU access |
| PawnIO | Modern signed Windows kernel driver |
| DirectHW | macOS kext for PCI config and physical memory access (joevt) |
| pciutils | The darwin2 IOPCIBridge method behind the kext-free --iopci path (joevt) |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zenmaster-1.0.0.tar.gz.
File metadata
- Download URL: zenmaster-1.0.0.tar.gz
- Upload date:
- Size: 51.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bd766f79731005928ebed47b4c117ce562f29532eebcd5ba38957aa1d0ca58f
|
|
| MD5 |
820f844b793db1da0c646fe971538974
|
|
| BLAKE2b-256 |
d0d146fbff10435350e297e62c3848b9d8bec9e2d71149cda6b11cbe9dd46ac7
|
Provenance
The following attestation bundles were made for zenmaster-1.0.0.tar.gz:
Publisher:
publish.yml on HorizonUnix/ZenMaster
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zenmaster-1.0.0.tar.gz -
Subject digest:
8bd766f79731005928ebed47b4c117ce562f29532eebcd5ba38957aa1d0ca58f - Sigstore transparency entry: 2066349512
- Sigstore integration time:
-
Permalink:
HorizonUnix/ZenMaster@c3a5620f0767ff9bd9a87dd635f3aa0883b1c28f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/HorizonUnix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c3a5620f0767ff9bd9a87dd635f3aa0883b1c28f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file zenmaster-1.0.0-py3-none-any.whl.
File metadata
- Download URL: zenmaster-1.0.0-py3-none-any.whl
- Upload date:
- Size: 53.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5750ab9d5cfe3b1b8f8ccb123b0d0e4e2820c938259aedd072e2cf7eabde9b7
|
|
| MD5 |
095143ca5c9ae50797b2c3499fabe7b3
|
|
| BLAKE2b-256 |
1a97a2c1f7763e55da2ca44aa1cc4c22cd35d7cd380564f5ea860c9d951d6fee
|
Provenance
The following attestation bundles were made for zenmaster-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on HorizonUnix/ZenMaster
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zenmaster-1.0.0-py3-none-any.whl -
Subject digest:
f5750ab9d5cfe3b1b8f8ccb123b0d0e4e2820c938259aedd072e2cf7eabde9b7 - Sigstore transparency entry: 2066349546
- Sigstore integration time:
-
Permalink:
HorizonUnix/ZenMaster@c3a5620f0767ff9bd9a87dd635f3aa0883b1c28f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/HorizonUnix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c3a5620f0767ff9bd9a87dd635f3aa0883b1c28f -
Trigger Event:
workflow_dispatch
-
Statement type: