### Install ZenTune from local repository Source: https://github.com/horizonunix/zentune/wiki/macOS-Installation Clones the repository and runs the installer with the --local flag to install from the local checkout instead of downloading a release archive. ```bash git clone https://github.com/HorizonUnix/ZenTune.git cd ZenTune ./install.sh --local ``` -------------------------------- ### Install UXTU4Linux via script Source: https://github.com/horizonunix/zentune/blob/main/Changelog.md Use this command to run the installer, which handles dependencies and preserves existing settings and presets. ```bash curl -fsSL https://raw.githubusercontent.com/HorizonUnix/UXTU4Linux/main/install.sh | bash ``` -------------------------------- ### Run local setup with run0 elevation Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Runs the local setup script with the --run0 flag to enforce run0 elevation during setup. ```bash ./install.sh --local --run0 ``` -------------------------------- ### Install ZenTune with run0 and beta branch Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Use this command to install the latest rolling beta release while explicitly using systemd run0 for privilege elevation. ```bash curl -fsSL https://raw.githubusercontent.com/HorizonUnix/ZenTune/main/install.sh | bash -s -- --run0 --beta ``` -------------------------------- ### Start ZenTune service Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Loads the ZenTune service into the system launchd configuration. ```bash sudo launchctl bootstrap system /Library/LaunchDaemons/com.horizonunix.zentune.plist ``` -------------------------------- ### Install textual-plotext and restart daemon Source: https://github.com/horizonunix/zentune/blob/main/Changelog.md Install the new textual-plotext dependency into the existing environment and restart the daemon to apply the update without reinstalling. ```bash /opt/uxtu4linux/venv/bin/pip install textual textual-plotext sudo systemctl restart uxtu4linux.service ``` -------------------------------- ### Install ZenTune via curl Source: https://github.com/horizonunix/zentune/blob/main/README.md Downloads and runs the official ZenTune installer script from the main branch of the GitHub repository. Requires curl and bash; the script configures dependencies and sets up the daemon. ```bash curl -fsSL https://raw.githubusercontent.com/HorizonUnix/ZenTune/main/install.sh | bash ``` -------------------------------- ### Install ryzen_smu build dependencies on Gentoo Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Installs dev-build/cmake, sys-kernel/dkms, and dev-libs/openssl using emerge on Gentoo. ```bash sudo emerge --ask dev-build/cmake sys-kernel/dkms dev-libs/openssl ``` -------------------------------- ### Install ryzen_smu build dependencies on Debian/Ubuntu/Mint/Pop!_OS Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Installs cmake, GCC, G++, DKMS, and OpenSSL required to build and install the ryzen_smu kernel module. Provides both sudo and run0 commands. ```bash sudo apt update && sudo apt install cmake gcc g++ dkms openssl # With run0: run0 apt update && run0 apt install cmake gcc g++ dkms openssl ``` -------------------------------- ### Clone and install ryzen_smu via DKMS Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Clones the ryzen_smu repository, enters the directory, and installs the driver with DKMS using sudo or run0. This step is required for Secure Boot systems. ```bash git clone https://github.com/amkillam/ryzen_smu cd ryzen_smu sudo make dkms-install # Or with run0: # run0 make dkms-install ``` -------------------------------- ### Run ZenTune Source: https://github.com/horizonunix/zentune/blob/main/README.md Launches the ZenTune terminal UI after installation. The first run walks you through setting up the daemon and detecting your hardware. ```bash zentune ``` -------------------------------- ### Example preset execution log output Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Shows the log lines emitted for each preset execution, including trigger and hardware receipt. ```text Applied preset 'Eco' (power source changed from AC to battery). Applied preset 'Gaming' (selected in the app). Applied preset 'Balanced' (restoring saved settings at startup). ``` -------------------------------- ### Install ryzen_smu build dependencies on CentOS Stream 9 Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Enables the CRB repository, installs EPEL, and then installs cmake, gcc, gcc-c++, dkms, and openssl on CentOS Stream 9. ```bash sudo dnf config-manager --set-enabled crb sudo dnf install epel-release sudo dnf install cmake gcc gcc-c++ dkms openssl ``` -------------------------------- ### Install ryzen_smu build dependencies on Arch/Manjaro/EndeavourOS Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Installs cmake, gcc, dkms, and openssl on Arch Linux, Manjaro, or EndeavourOS using pacman. Both sudo and run0 variants are given. ```bash sudo pacman -S cmake gcc dkms openssl # With run0: run0 pacman -S cmake gcc dkms openssl ``` -------------------------------- ### Example config.ini with canonical section order Source: https://github.com/horizonunix/zentune/wiki/Configuration Example configuration file showing the canonical section order and default values for ZenTune's config.ini. The parser writes sections in strict order: [User], [Settings], [Automations], [Adaptive], [Info]. Custom sections appended to the file are preserved at the end during serialization. ```ini ```ini [User] mode = Balanced [Settings] time = 3 reapply = 0 applyonstart = 1 autostartadaptive = 0 softwareupdate = 1 debug = 0 defaulttab = home privilegetool = auto theme = textual-dark [Automations] onac = onbattery = onresume = [Adaptive] preset = interval = 2 [Info] cpu = AMD Ryzen 7 7840HS with Radeon 780M Graphics signature = Family 25, Model 116, Stepping 1 architecture = Zen 3 - Zen 4 family = PhoenixPoint type = Amd_Apu variant = ``` ``` -------------------------------- ### Install ryzen_smu build dependencies on AlmaLinux/Rocky/RHEL 9 Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Enables EPEL repository and installs the build dependencies (cmake, gcc, gcc-c++, dkms, openssl) on AlmaLinux, Rocky Linux 9, or RHEL 9. ```bash sudo dnf install epel-release sudo dnf install cmake gcc gcc-c++ dkms openssl ``` -------------------------------- ### Install ryzen_smu build dependencies on Fedora Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Installs the required build tools (cmake, gcc, gcc-c++, dkms, openssl) on Fedora using dnf. Both sudo and run0 variants are provided. ```bash sudo dnf install cmake gcc gcc-c++ dkms openssl # With run0: run0 dnf install cmake gcc gcc-c++ dkms openssl ``` -------------------------------- ### Backup archive format (zentune_backup.json) Source: https://github.com/horizonunix/zentune/wiki/Custom-Presets Example of the backup file format for exporting and importing presets. The file defaults to ~/zentune_backup.json and bundles both custom and adaptive presets. The format includes a version and created_utc timestamp. ```json { "format": "ZenTune Preset Backup", "version": 1, "created_utc": "2026-09-13T14:35:00.000000+00:00", "custom_presets": [ { "name": "Silent_Work_custom_preset", "stapm_limit": { "enabled": true, "value": 15 }, "epp": { "enabled": true, "value": 0 } } ], "adaptive_presets": { "Daily_Adaptive": { "max_temp": 90, "power": 30, "co_max": 25, "igpu_min": 400, "igpu_max": 1800, "min_cpu_clk": 1500, "enable_co": true, "enable_igpu": true, "enable_asus": false, "asus_mode": 1, "enable_nvidia": false, "nv_max_clk": 4000, "nv_core_offset": 0, "nv_mem_offset": 0, "nv_power_limit": 0 } } } ``` -------------------------------- ### Verify DirectHW kext is loaded with kextstat Source: https://github.com/horizonunix/zentune/wiki/macOS-Installation Run this command after installing DirectHW.kext and rebooting to confirm the extension is active. Expected output includes 'com.coresystems.DirectHW' or equivalent identifier. ```bash kextstat | grep -i directhw ``` -------------------------------- ### Install ryzen_smu build dependencies on openSUSE Tumbleweed/Leap Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Installs cmake, gcc, gcc-c++, dkms, and openssl on openSUSE Tumbleweed or Leap using zypper. The snippet contains a placeholder line '{{ ... }}' as displayed. ```bash sudo zypper install cmake gcc gcc-c++ dkms openssl {{ ... }} ``` -------------------------------- ### Check ryzen_smu driver version Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Displays the installed driver version. If older than 0.1.7, update the driver. ```bash cat /sys/kernel/ryzen_smu_drv/drv_version ``` -------------------------------- ### Uninstall ZenTune Source: https://github.com/horizonunix/zentune/wiki/macOS-Installation Run the installer script with the --uninstall flag to remove ZenTune completely from the system. ```bash curl -fsSL https://raw.githubusercontent.com/HorizonUnix/ZenTune/main/install.sh | bash -s -- --uninstall ``` -------------------------------- ### Verify Secure Boot state with mokutil --sb-state Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Check whether UEFI Secure Boot is enabled or disabled on the system. Output 'SecureBoot disabled' means ryzen_smu is not required; 'SecureBoot enabled' requires installing the module. ```bash mokutil --sb-state ``` -------------------------------- ### Check ryzen_smu module visibility with lsmod Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Use this command to confirm the ryzen_smu kernel module is loaded. Run after installing DKMS packages and compiling ryzen_smu. ```bash lsmod | grep ryzen_smu ``` -------------------------------- ### Custom preset JSON schema (custom.json) Source: https://github.com/horizonunix/zentune/wiki/Custom-Presets Example of a custom preset entry in the custom.json file. Each entry is a JSON object within an array. Internal preset keys append the suffix '_custom_preset' to avoid namespace collisions, which the UI strips for display. ```json [ { "name": "Gaming_custom_preset", "tctl_temp": { "enabled": true, "value": 90 }, "stapm_limit": { "enabled": true, "value": 45 }, "fast_limit": { "enabled": true, "value": 54 }, "stapm_time": { "enabled": false, "value": 64 }, "coall": { "enabled": true, "value": -20 }, "epp": { "enabled": true, "value": 3 }, "cpu_boost": { "enabled": true, "value": 1 } } ] ``` -------------------------------- ### Verify ryzen_smu driver initialization and version Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Loads the module and checks the driver version file. The version string must report 0.1.7 or higher. ```bash sudo modprobe ryzen_smu cat /sys/kernel/ryzen_smu_drv/drv_version ``` -------------------------------- ### Collect system diagnostics for issue reporting Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Run this script to gather environment details, hardware info, and service logs for the development tracker. ```bash # Distribution and kernel uname -a cat /etc/os-release # Python and virtual environment status python3 --version /opt/zentune/venv/bin/python3 --version # Privilege tool and backend status which sudo run0 2>/dev/null powerprofilesctl get 2>/dev/null || tuned-adm active 2>/dev/null || cat /sys/firmware/acpi/platform_profile 2>/dev/null # Hardware identification cat /sys/kernel/ryzen_smu_drv/drv_version 2>/dev/null || echo "ryzen_smu not loaded" grep -E "^cpu family|^model|^model name" /proc/cpuinfo | head -6 # Recent daemon journal receipts journalctl -u zentune.service -n 40 --no-pager ``` -------------------------------- ### Manually update dependencies and restart daemon Source: https://github.com/horizonunix/zentune/blob/main/Changelog.md If you prefer not to reinstall, manually add the required dependencies to your existing virtual environment and restart the service. ```bash /opt/uxtu4linux/venv/bin/pip install textual pyzmq sudo systemctl restart uxtu4linux.service ``` -------------------------------- ### Manage ZenTune service on macOS with launchd Source: https://github.com/horizonunix/zentune/wiki/Configuration Commands to check status, kickstart the daemon, and view logs for the ZenTune daemon on macOS systems using launchd. ```bash # Check service status sudo launchctl print system/com.horizonunix.zentune # Kickstart daemon sudo launchctl kickstart -k system/com.horizonunix.zentune # View daemon output log tail -n 50 /var/log/zentune.log ``` -------------------------------- ### Collect diagnostic summary for GitHub issues Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Run these commands to gather system, Python environment, hardware, kernel extension, and service status information for troubleshooting. ```bash # macOS release and kernel sw_vers uname -a # Python environment python3 --version /opt/zentune/venv/bin/python3 --version # Hardware CPUID sysctl machdep.cpu.family machdep.cpu.model machdep.cpu.brand_string # SMU backend state kextstat | grep -i directhw || echo "DirectHW not loaded" sysctl kern.bootargs nvram csr-active-config 2>/dev/null # launchd service status sudo launchctl print system/com.horizonunix.zentune | grep -E "state =|pid =" # Recent daemon logs tail -40 /var/log/zentune.log ``` -------------------------------- ### Enroll MOK signing key for ryzen_smu Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Imports the DKMS public certificate into the UEFI MOK database using mokutil. A temporary password is required, and the system must be rebooted afterwards. ```bash sudo mokutil --import /var/lib/dkms/mok.pub # Or with run0: # run0 mokutil --import /var/lib/dkms/mok.pub ``` -------------------------------- ### Uninstall ZenTune without prompts Source: https://github.com/horizonunix/zentune/wiki/macOS-Installation Use the ZENTUNE_ASSUME_YES environment variable to bypass confirmation prompts during automated uninstallation. ```bash ZENTUNE_ASSUME_YES=1 bash install.sh --uninstall ``` -------------------------------- ### Load ryzen_smu module and verify with lsmod Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Loads the ryzen_smu kernel module and verifies it is listed in the loaded modules. If 'modprobe' fails with 'Operation not permitted' or a verification error, MOK enrollment is required. ```bash sudo modprobe ryzen_smu lsmod | grep ryzen_smu ``` -------------------------------- ### Verify boot-args with sysctl kern.bootargs Source: https://github.com/horizonunix/zentune/wiki/macOS-Installation Run this command after adding debug=0x144 to boot-args and rebooting to confirm the kernel argument registered. Verify that 'debug=0x144' appears in the output string. ```bash sysctl kern.bootargs ``` -------------------------------- ### Stream live ZenTune log Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Stream live logs during preset switching or sleep/wake events. ```bash tail -f /var/log/zentune.log ``` -------------------------------- ### Enroll DKMS signing key with mokutil Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Imports the DKMS public key into UEFI MOK and reboots. Complete key authorization at the blue Shim MOK screen during boot. ```bash sudo mokutil --import /var/lib/dkms/mok.pub sudo reboot ``` -------------------------------- ### Inspect CPU scaling driver Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Check the currently active CPU scaling driver to verify if EPP is supported. ```bash cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver ``` -------------------------------- ### Architecture Diagram: Client-Daemon Two-Process Source: https://github.com/horizonunix/zentune/wiki/Developer-Documentation ASCII diagram showing the separation between the unprivileged client (ZenTune TUI) and the privileged daemon (PowerDaemon), with IPC via ZeroMQ over a Unix socket. It also shows the daemon's interactions with zenmaster, platformctl, and NVML. ```text +-------------------------------------------------------------+ | Unprivileged Client | | ZenTune TUI (textual) - Runs as standard user | | Lock: /tmp/zentune_tui.lock | +-------------------------------------------------------------+ | | ZeroMQ REQ/REP over IPC | Address: ipc://{RUNTIME_DIR}/zentune.sock | Socket Permissions: 0o666 (world-writable) v +-------------------------------------------------------------+ | Privileged Daemon | | PowerDaemon (daemon.py) - Runs as root | | Lock: {RUNTIME_DIR}/zentune_daemon.lock | +-------------------------------------------------------------+ | | | v v v +------------------+ +-------------------+ +--------------------+ | zenmaster (SMU) | | platformctl.py | | NVML (libnvidia) | | HSMP / MP1 / RSMU| | ppd > tuned > sys | | Clock Offsets / PL | +------------------+ +-------------------+ +--------------------+ ``` -------------------------------- ### Manage ZenTune service on Linux with systemd Source: https://github.com/horizonunix/zentune/wiki/Configuration Commands to check status, restart the service, and view logs for the ZenTune daemon on Linux systems using systemd. ```bash # Check service status systemctl status zentune.service # Restart service sudo systemctl restart zentune.service # Or with systemd-run0: run0 systemctl restart zentune.service # View daemon journal logs journalctl -u zentune.service -n 50 --no-pager ``` -------------------------------- ### Restart zentune service to apply config Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Restart the zentune service to apply the updated configuration. Provides both sudo and run0 alternatives. ```bash sudo systemctl restart zentune.service # Or with run0: run0 systemctl restart zentune.service ``` -------------------------------- ### Run0 command execution pattern Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting ZenTune executes commands via run0 when configured to use it. This is the command pattern used for privilege elevation. ```bash run0 --background= --pipe ``` -------------------------------- ### Switch privilege tool to sudo in config.ini Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Manually edit /opt/zentune/src/Assets/config.ini to set privilegetool = sudo as an alternative to run0. ```ini [Settings] privilegetool = sudo ``` -------------------------------- ### Inspect PM table via zenmaster CLI Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Use DirectHW to access raw PM table telemetry via the CLI. Requires sudo. ```bash sudo /opt/zentune/venv/bin/zenmaster --sensors sudo /opt/zentune/venv/bin/zenmaster --table ``` -------------------------------- ### Reset ZenTune configuration via terminal Source: https://github.com/horizonunix/zentune/wiki/Configuration Procedure to reset configuration files to factory defaults by removing the config.ini file and restarting the application. ```bash rm /opt/zentune/src/Assets/config.ini zentune ``` -------------------------------- ### Inspect ZenTune service state Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Use this command to check the execution details of the com.horizonunix.zentune daemon. ```bash sudo launchctl print system/com.horizonunix.zentune ``` -------------------------------- ### Check IPC socket existence and permissions Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Lists the ZenTune IPC socket file. The socket permissions must be mode 0o666 (srw-rw-rw-) for the daemon to communicate correctly. ```bash ls -l /run/zentune.sock ``` -------------------------------- ### Execute Standalone Daemon Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Commands for running the ZenTune daemon in non-systemd environments. ```bash sudo /opt/zentune/venv/bin/python3 /opt/zentune/src/Assets/daemon/daemon.py # Or with run0: run0 /opt/zentune/venv/bin/python3 /opt/zentune/src/Assets/daemon/daemon.py ``` -------------------------------- ### Launch ZenTune daemon manually Source: https://github.com/horizonunix/zentune/wiki/Configuration Commands to launch the ZenTune daemon directly from a root terminal for debugging or use with alternative init systems. ```bash # Using sudo: sudo /opt/zentune/venv/bin/python3 /opt/zentune/src/Assets/daemon/daemon.py # Using run0 on systemd systems: run0 /opt/zentune/venv/bin/python3 /opt/zentune/src/Assets/daemon/daemon.py ``` -------------------------------- ### SMU backend priority list Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Lists the two backends evaluated by check_macos_backend() in Assets/core/hardware.py. ```text 1. Priority 1: zenmaster.directhw (DirectHW.kext) 2. Priority 2: zenmaster.iopci (IOPCIBridge with debug=0x144 boot-arg) ``` -------------------------------- ### Verify macOS launchd service status Source: https://github.com/horizonunix/zentune/wiki/Automations Checks the state of the com.horizonunix.zentune background service on macOS. ```bash launchctl print system/com.horizonunix.zentune | grep state ``` -------------------------------- ### Tail last 100 lines of ZenTune log Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Inspect the latest 100 entries from /var/log/zentune.log, where the launchd service directs StandardOutPath and StandardErrorPath. ```bash tail -100 /var/log/zentune.log ``` -------------------------------- ### Inspect Linux daemon log stream Source: https://github.com/horizonunix/zentune/wiki/Automations Follows the zentune.service log output in real-time to monitor power transitions. ```bash journalctl -u zentune.service -f ``` -------------------------------- ### Restart ZenTune daemon via launchctl Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Restart the background daemon after enabling debug logging. ```bash sudo launchctl kickstart -k system/com.horizonunix.zentune ``` -------------------------------- ### Enable debug logging in config.ini Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Set debug = 1 in /opt/zentune/src/Assets/config.ini to log individual SMU opcodes, sysctl queries, and IPC payload transactions. ```ini # /opt/zentune/src/Assets/config.ini [Settings] debug = 1 ``` -------------------------------- ### Add user to administrative group for sudo Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Add the current user to the wheel or sudo group to resolve sudo password rejection. Use the appropriate command for your distribution. ```bash sudo usermod -aG wheel "$USER" # Fedora / Arch sudo usermod -aG sudo "$USER" # Debian / Ubuntu ``` -------------------------------- ### UXTU4Unix Project Directory Structure Source: https://github.com/horizonunix/zentune/blob/main/Changelog.md The directory layout of the project following the v0.5.0 refactor into a modular Python package. ```text UXTU4Unix/ ├── UXTU4Unix.py └── Assets/ ├── SoftwareUpdate.py ├── Darwin/ ryzenadj, dmidecode ├── Linux/ ryzenadj ├── Presets/ └── Modules/ ├── config.py central constants, paths, config singleton ├── hardware.py CPU detection, codename, NVRAM check ├── power.py preset loading, ryzenadj, dynamic mode ├── settings.py all settings sub-menus ├── setup.py first-run wizard, integrity check ├── ui.py banner, clear, prompts ├── updater.py version check, self-update ├── installer.py macOS EFI/plist dependency installer ├── about.py about screen └── secure_password.py keyring wrapper ``` -------------------------------- ### Adaptive Mode Preset Data in adaptive.json Source: https://github.com/horizonunix/zentune/wiki/Adaptive-Mode Stores adaptive preset parameters including temperature limits, power targets, and hardware-specific offsets. ```json { "Gaming_Adaptive": { "max_temp": 95, "power": 35, "co_max": 25, "igpu_min": 400, "igpu_max": 1900, "min_cpu_clk": 1500, "enable_co": true, "enable_igpu": true, "enable_asus": false, "asus_mode": 1, "enable_nvidia": false, "nv_max_clk": 4000, "nv_core_offset": 0, "nv_mem_offset": 0, "nv_power_limit": 0 } } ``` -------------------------------- ### Reboot system after MOK enrollment Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Reboots the system to apply the MOK enrollment. The Shim UEFI key management utility will launch during reboot for confirmation. ```bash sudo reboot ``` -------------------------------- ### Verify macOS power source reporting Source: https://github.com/horizonunix/zentune/wiki/Automations Displays the current battery and power source status using the pmset utility. ```bash pmset -g batt ``` -------------------------------- ### ZenTune KeepAlive configuration Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting The plist configuration snippet that defines the daemon's restart behavior. ```xml KeepAlive SuccessfulExit ``` -------------------------------- ### Manual cleanup of ZenTune artifacts Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Removes the systemd service, binaries, venv, and runtime files manually. Includes commands to stop and purge the unit, delete the service file, reload systemd, and remove /usr/local/bin/zentune, /opt/zentune, and lock files. ```bash # Stop and purge systemd unit sudo systemctl disable --now zentune.service # Or with run0: run0 systemctl disable --now zentune.service sudo rm -f /etc/systemd/system/zentune.service sudo systemctl daemon-reload # Remove binaries, venv, and runtime files sudo rm -f /usr/local/bin/zentune sudo rm -rf /opt/zentune sudo rm -f /run/zentune.sock /run/zentune_daemon.lock rm -f /tmp/zentune_tui.lock ``` -------------------------------- ### Inspect daemon journal logs with journalctl Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Use journalctl to view the last 100 lines of ZenTune daemon logs or follow live events. The daemon logs preset changes, privilege transitions, hardware probes, and SMU communication attempts. ```bash journalctl -u zentune.service -n 100 --no-pager ``` ```bash journalctl -u zentune.service -f ``` -------------------------------- ### Check systemd unit status for zentune.service Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Use this command to verify whether the ZenTune daemon service is active and to inspect its status when the TUI reports 'Daemon: Not running'. ```bash systemctl status zentune.service ``` -------------------------------- ### ZenTune Backup JSON Schema Source: https://github.com/horizonunix/zentune/wiki/Developer-Documentation The structure of the unified backup archive, including custom and adaptive preset definitions. ```json { "format": "ZenTune Preset Backup", "version": 1, "created_utc": "2026-09-13T14:35:00.000000+00:00", "custom_presets": [ { "name": "Performance_Custom", "tctl_temp": { "enabled": true, "value": 90 }, "stapm_limit": { "enabled": true, "value": 35 }, "fast_limit": { "enabled": true, "value": 45 }, "stapm_time": { "enabled": false, "value": 64 } } ], "adaptive_presets": { "Adaptive_Custom": { "max_temp": 95, "power": 35, "co_max": 30, "igpu_min": 400, "igpu_max": 1900, "min_cpu_clk": 1500, "enable_co": true, "enable_igpu": false, "enable_asus": false, "asus_mode": 1, "enable_nvidia": false, "nv_max_clk": 4000, "nv_core_offset": 0, "nv_mem_offset": 0, "nv_power_limit": 0 } } } ``` -------------------------------- ### Verify IPC socket existence Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Checks if the ZenTune IPC socket file exists at the expected location. ```bash ls -l /var/run/zentune.sock ``` -------------------------------- ### Verify Linux daemon service status Source: https://github.com/horizonunix/zentune/wiki/Automations Checks if the zentune.service is currently active on Linux systems. ```bash systemctl is-active zentune.service ``` -------------------------------- ### Query CPUID registers via sysctl Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Use sysctl to read CPU family, model, and brand string directly from CPUID registers, avoiding SMBIOS spoofing. ```bash sysctl machdep.cpu.family machdep.cpu.model machdep.cpu.brand_string ``` -------------------------------- ### Reload ryzen_smu kernel module Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Reloads the ryzen_smu module after updating the driver. Requires sudo privileges. ```bash sudo modprobe -r ryzen_smu && sudo modprobe ryzen_smu ``` -------------------------------- ### Inspect Linux power supply sysfs attributes Source: https://github.com/horizonunix/zentune/wiki/Automations Reads the online status of AC power supply nodes. Returns 1 for AC mains and 0 for battery power. ```bash cat /sys/class/power_supply/AC*/online 2>/dev/null || cat /sys/class/power_supply/ACAD*/online 2>/dev/null ``` -------------------------------- ### Stop ZenTune service Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Unloads the ZenTune service from the system launchd configuration. ```bash sudo launchctl bootout system/com.horizonunix.zentune ``` -------------------------------- ### Purge ryzen_smu from DKMS Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Runs dkms-uninstall in the ryzen_smu directory to purge it from DKMS. Also provides a run0 alternative. ```bash cd ryzen_smu sudo make dkms-uninstall # Or with run0: run0 make dkms-uninstall ``` -------------------------------- ### Platform Identification Flow Source: https://github.com/horizonunix/zentune/wiki/Premade-Presets ASCII diagram showing the decision flow for identifying hardware profiles based on CPUID, SMU version, and DMI chassis data. Amd_Apu profiles use suffixes and architecture, while Amd_Desktop_Cpu profiles use architecture, SKU tier, and thermal ceiling. ```text ┌──────────────────────────────┐ │ Platform Identification │ │ CPUID, SMU Version, DMI │ └──────────────┬───────────────┘ │ ┌───────────────────────┴───────────────────────┐ ▼ ▼ ┌──────────────────┐ ┌──────────────────┐ │ Amd_Apu │ │ Amd_Desktop_Cpu │ └────────┬─────────┘ └────────┬─────────┘ │ │ ├─► Suffix (U, H, HS, HX, G, GE) ├─► Architecture (Pre/Post-Raphael) ├─► Architecture (Pre/Post-Matisse) ├─► SKU Tier (X3D, X9, X, Non-X, E) ├─► High-Wattage (Dragon Range, Strix Halo) └─► Thermal Ceiling (85°C vs 95°C) └─► OEM Quirks (Framework 13, Framework 16) ``` -------------------------------- ### Systemd service unit for ZenTune daemon Source: https://github.com/horizonunix/zentune/wiki/Linux-Installation Service unit stored at /etc/systemd/system/zentune.service. Defines the daemon as a simple service running /opt/zentune/venv/bin/python3 /opt/zentune/src/Assets/daemon/daemon.py with restart on failure and journal logging. ```ini [Unit] Description=ZenTune Power Management Daemon After=multi-user.target [Service] Type=simple ExecStart=/opt/zentune/venv/bin/python3 /opt/zentune/src/Assets/daemon/daemon.py Restart=on-failure RestartSec=5 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target ``` -------------------------------- ### Check SIP csr-active-config Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Confirm SIP permits kernel extensions. The value must correspond to 03080000 (or %03%08%00%00). If SIP is fully enabled (00000000), macOS blocks raw physical memory mapping. ```bash nvram csr-active-config ``` -------------------------------- ### Clear stale runtime artifacts Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Removes stale socket and lock files before restarting the service to resolve initialization issues. ```bash sudo rm -f /var/run/zentune.sock /var/run/zentune_daemon.lock sudo launchctl kickstart -k system/com.horizonunix.zentune ``` -------------------------------- ### Debug daemon crash loops Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Stops the service and runs the daemon manually to capture immediate terminal output for debugging. ```bash sudo launchctl bootout system/com.horizonunix.zentune sudo /opt/zentune/venv/bin/python3 /opt/zentune/src/Assets/daemon/daemon.py ``` -------------------------------- ### Run daemon directly to isolate crash causes Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Stops the service and executes the daemon in a terminal to observe crashes without continuous restarts. Includes a commented run0 alternative. ```bash sudo systemctl stop zentune.service sudo /opt/zentune/venv/bin/python3 /opt/zentune/src/Assets/daemon/daemon.py # Or with run0: # run0 /opt/zentune/venv/bin/python3 /opt/zentune/src/Assets/daemon/daemon.py ``` -------------------------------- ### Fix IPC socket permissions Source: https://github.com/horizonunix/zentune/wiki/macOS-Troubleshooting Sets the socket permissions to 666 if the TUI cannot connect due to restricted access. ```bash sudo chmod 666 /var/run/zentune.sock ``` -------------------------------- ### Preset Dataclass Definition Source: https://github.com/horizonunix/zentune/wiki/Developer-Documentation The Preset dataclass defines the structure for built-in power profiles, including Eco, Balanced, Performance, and Extreme modes. ```python @dataclass class Preset: Eco: str Balanced: str Performance: str Extreme: str ``` -------------------------------- ### Anti-Flap Hysteresis Guard: Skip SMU command if within 3.0s cooldown Source: https://github.com/horizonunix/zentune/wiki/Automations This Python snippet shows the logic that suppresses an SMU command dispatch if the last application occurred less than 3.0 seconds ago. It logs a debug message and continues the loop, protecting voltage rails from rapid toggling. ```python if time.monotonic() - last_smu_apply < 3.0: log.debug("Power monitor skipped: SMU command applied %.1fs ago.", time.monotonic() - last_smu_apply) continue ``` -------------------------------- ### Define _ClockOffset structure for NVML Source: https://github.com/horizonunix/zentune/wiki/Developer-Documentation The _ClockOffset structure is used to configure clock offsets via the modern NVML API. Versioning is handled by encoding the struct size and a version flag. ```python class _ClockOffset(ctypes.Structure): _fields_ = [ ("version", ctypes.c_uint), ("type", ctypes.c_uint), ("pstate", ctypes.c_uint), ("clockOffsetMHz", ctypes.c_int), ("minClockOffsetMHz", ctypes.c_int), ("maxClockOffsetMHz", ctypes.c_int), ] ``` -------------------------------- ### Recover from stale locks or uncleaned sockets Source: https://github.com/horizonunix/zentune/wiki/Linux-Troubleshooting Removes stale lock and socket files, then restarts the service. Includes commented alternatives using run0. Use after a forceful daemon kill (SIGKILL) that blocks restart. ```bash sudo rm -f /run/zentune.sock /run/zentune_daemon.lock sudo systemctl restart zentune.service # Or with run0: # run0 rm -f /run/zentune.sock /run/zentune_daemon.lock # run0 systemctl restart zentune.service ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.