Skip to content

afftab/zhelper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZHelper

A lightweight TUI for managing ASUS ROG / TUF laptops on Linux. Control battery charge limits, CPU power profiles, GPU modes, audio devices, and display settings from a single keyboard-driven interface.


Features

Overview

  • Live dashboard with sparkline graphs: CPU/GPU temperature, memory usage, battery %, fan RPM, and power draw over time
  • Read-only at-a-glance system health

Battery

  • Charge limit (20–100%) with presets (1/2/3 = 60/80/100%) and fine-grained adjustment (/ steps by 1, Shift+←/Shift+→ by 5)
  • Persistent across reboots via systemd service + udev rule
  • Live stats: voltage, current, power draw, cycle count, health %, time remaining

CPU

  • Thermal profile switching (Silent / Balanced / Turbo) via ASUS WMI (throttle_thermal_policy)
  • CPU boost toggle (/sys/devices/system/cpu/cpufreq/boost)
  • Live CPU temperature and fan RPM (CPU fan + GPU fan) from asus-nb-wmi hwmon

GPU

  • dGPU mode switching via ASUS WMI: Integrated (dGPU off, best battery) / Hybrid (iGPU + dGPU on-demand) / Ultimate (dGPU via MUX, if present)
  • Mode changes are queued and applied at the next shutdown/reboot via a systemd service (firmware requires it)
  • iGPU / dGPU model names detected from lspci

Audio

  • Output and input device management via PipeWire/PulseAudio (pactl)
  • Volume control, mute toggle, default device selection
  • Port switching (speakers/headphones, internal mic/headset mic)

Display

  • Per-monitor resolution and refresh-rate switching (GNOME only, via Mutter DisplayConfig D-Bus)
  • Modes sorted by pixels then refresh rate; applies through gdbus

System

  • CPU/GPU temperatures, memory usage, thermal zones, AC status

Requirements

  • Linux with ASUS asus-nb-wmi kernel module (5.4+, 5.9+ recommended)
  • PipeWire or PulseAudio with pactl installed (for audio features)
  • GNOME desktop (for the display tab; other tabs work anywhere)
  • pkexec available (for one-time setup and privilege escalation)

Verify battery charge control support:

ls /sys/class/power_supply/BAT*/charge_control_end_threshold

Installation

Build from source

git clone https://github.com/Ichihiroy/ghelper-for-linux
cd ghelper-for-linux
cargo build --release
sudo cp target/release/zhelper /usr/local/bin/

Then run from anywhere:

zhelper

First-time Setup

Battery charge limit writes require root. Run the one-time setup to create a udev rule and systemd service:

sudo bash setup.sh 80

Or inside the app: navigate to the battery tab and press s.

After setup, three things happen:

  1. A udev rule makes the charge-threshold sysfs file world-writable, so the app never needs sudo for battery writes.
  2. A systemd service re-applies your limit on boot and after suspend/resume.
  3. A GPU shutdown service applies any queued dGPU mode change at shutdown.

Keybindings

Key Action
Tab Switch sidebar/content (or output/input in audio tab)
j / k Navigate items
/ Adjust values or navigate modes
a / Enter Apply selected setting
Space Toggle mute / boost / settings
1/2/3 Battery charge presets (60 / 80 / 100%)
s Battery persistence setup
d Set default audio device
r Force refresh
q Quit

Supported Hardware

Any ASUS laptop with the asus-nb-wmi kernel module, including ROG Zephyrus (G14/G15/G16/M16), ROG Flow, ROG Strix, TUF Gaming, and VivoBook series.


License

MIT -- see LICENSE

About

ghelper for linux - TUI

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 98.4%
  • Shell 1.6%