Repository navigation
Installation
ZenMaster is distributed as a standard Python package available from PyPI. It has no third-party library dependencies across Linux, Windows, or macOS. Direct interaction with the AMD System Management Unit (SMU) requires elevated privileges and platform-specific hardware access interfaces.
pip install zenmasterTo update an existing installation:
pip install -U zenmasterTo check the installed version:
zenmaster --versionHardware access on Linux requires root privileges (sudo). ZenMaster communicates with the SMU via direct PCI root complex configuration access or through the ryzen_smu kernel module.
pip install zenmaster
sudo zenmaster --stapm-limit=15000 --fast-limit=20000 --tctl-temp=90ZenMaster evaluates hardware access mechanisms automatically:
-
Direct PCI Config Access (Default)
- Target device: Root complex Host Bridge (
/sys/bus/pci/devices/0000:00:00.0/config). - Registers: Northbridge Address Register
0xB8(NB_ADDR) and Data Register0xBC(NB_DATA). - Synchronization: Cross-process file lock at
/run/lock/access_pci.lock(falls back to/tmp/access_pci.lock) with a 5000 ms timeout. - Operating condition: Standard kernels where PCI configuration space writes are permitted.
- Target device: Root complex Host Bridge (
-
Kernel Driver (
ryzen_smu)- Sysfs interface:
/sys/kernel/ryzen_smu_drv/smn. - Minimum version requirement:
0.1.7or newer. - Operating condition: Required when Linux kernel lockdown restricts physical memory access (
/dev/mem) or blocks direct PCI configuration writes (such as under active Secure Boot policies).
- Sysfs interface:
When kernel lockdown prevents direct PCI access, install the out-of-tree DKMS driver:
git clone https://github.com/amkillam/ryzen_smu
cd ryzen_smu
make
sudo make install
sudo modprobe ryzen_smuSystems enforcing module signature verification under Secure Boot require enrolling a Machine Owner Key (MOK) using mokutil prior to loading the compiled module.
SMU operations require elevation. When installed in a user-specific virtual environment or local prefix (~/.local), sudo zenmaster may fail to locate the binary on PATH. Execute the module directly through the target Python interpreter:
sudo python3 -m zenmaster --infoWindows restricts user-mode access to PCI configuration registers and physical memory. ZenMaster accesses the SMU through PawnIO, a Microsoft-attested kernel driver, replacing legacy drivers such as WinRing0.
- Download and run the official PawnIO installer: https://github.com/namazso/PawnIO.Setup/releases/latest/download/PawnIO_setup.exe
- Reboot the system to finalize driver registration.
- Launch an elevated command prompt or PowerShell instance (Run as Administrator).
pip install zenmaster
zenmaster --stapm-limit=15000 --fast-limit=20000 --tctl-temp=90- Driver Interface:
\\?\GLOBALROOT\Device\PawnIOusing IOCTL0xA1B22084(LOAD) and0xA1B22104(EXEC). - Payload: ZenMaster embeds the compiled
RyzenSMU.binmicro-payload and transfers it directly into the PawnIO driver runtime. - Mutex Synchronization: Inter-process coordination is enforced via the Win32 named mutex
Global\Access_PCIwith a 5000 ms wait ceiling.
ZenMaster operates on AMD-based macOS installations. CPU identification executes via sysctlbyname querying hardware CPUID parameters directly, remaining unaffected by OpenCore SMBIOS model spoofing.
Root privileges are required (sudo). Two hardware access paths are supported:
-
DirectHW User Client (
DirectHW.kext)- Provides full register and DRAM mapping access for both SMU tuning and telemetry PM table reading (
--sensors,--table). - Repository: https://github.com/joevt/directhw.
- System Integrity Protection (SIP): Requires enabling third-party kernel extensions via
csr-active-configset to03080000in OpenCore or Clover.
- Provides full register and DRAM mapping access for both SMU tuning and telemetry PM table reading (
-
Apple IOPCI Diagnostics (
--iopci, Kext-Free)- Communicates directly through Apple's native
IOPCIBridgeframework (_kIOPCIDiagnosticsClientType = 0x99000001). - Requires setting the
debug=0x144boot argument inboot-args. - Capability: Supports SMU parameter writes; does not support physical memory mapping for PM table decoding.
- Communicates directly through Apple's native
pip3 install zenmaster
sudo python3 -m zenmaster --stapm-limit=15000 --fast-limit=20000 --tctl-temp=90To force the kext-free IOPCIBridge backend explicitly:
sudo python3 -m zenmaster --iopci --infoVerify platform detection, driver connectivity, and mailbox communication using --info:
# Linux
sudo zenmaster --info
# Windows (Elevated Terminal)
zenmaster --info
# macOS
sudo python3 -m zenmaster --infoName : AMD Ryzen 9 7950X 16-Core Processor
Family : Raphael (Zen 4)
Type : Amd_Desktop_Cpu
Socket : AM5_V1
CCDs : 2
CPUID : Family 25 (0x19), Model 97 (0x61), Stepping 2
PM Table : Supported (0x00540004, 2236 bytes)
Tuning : 44 commands supported
Mailbox : MP1 / RSMU
Backend : pci
Driver : PCI direct access
SMU BIOS IF: 13
SMU Version: 84.79.0 (0x00544F00)
The --info command reports hardware CCD topology, decoded CPUID integers, PM table structural dimensions, active mailbox protocol, and SMU firmware revision.
For operational usage and syntax, consult CLI Usage and Tuning Arguments. For hardware error codes or initialization failures, consult Troubleshooting.
PyPI | Report an Issue | Releases | Under GPL-3.0 by HorizonUnix
Getting started
Monitoring
Developers
Help