utajum/g-helper-linux 是一个托管在 GitHub 上的开源项目,主要使用 C# 编写,采用 GNU General Public License v3.0 许可证,目前获得 584 个 Star、36 次 Fork。
仓库全名
utajum/g-helper-linux
README 摘要
Click on the screenshot to view full size. ░▒▓█ ╔══[ WEBSITE ]══╗ █▓▒░ g-helper-linux.elevatech.xyz Documentation: g-helper-linux.elevatech.xyz/docs ░▒▓█ ╔══[ MOTIVATION ]══╗ █▓▒░ Since asusctl doesn't really care about Ubuntu, I decided to port most functionality from the original G-Helper for Windows. The application is tested on KDE but other desktop environments should also work. Pull requests and feature…
Forget Armoury Crate and Windows. This unofficial Linux port of G-Helper turns your ASUS ROG, TUF, Flow, Z13, Ally, Zenbook, Vivobook or ProArt into a power user's dream. Fan curves, AURA RGB, MUX, battery limits, GPU mode. No bloat. No telemetry. And much more.
Since asusctl doesn’t really care about Ubuntu, I decided to port most functionality from the original G-Helper for Windows.
The application is tested on KDE but other desktop environments should also work.
Pull requests and feature requests are welcome!
G-Helper Linux is maintained by one developer. Donations pay for development time and hosting. Any amount helps.
░▒▓█ ╔══[ FEATURES ]══╗ █▓▒░
┌──────────────────────────────────────────────────────────────────┐
│ Performance modes Silent / Balanced / Turbo │
│ Custom fan curves 8-point drag-to-edit per fan │
│ Battery charge limit Protect longevity (40-100%) │
│ GPU mode switching Eco/Standard/Optimized (MUX, eBPF) │
│ Power limits CPU PL1/PL2, Dynamic Boost, temps │
│ Screen control Refresh rate, Panel OD, MiniLED │
│ Keyboard backlight Brightness + RGB (per-key Aura) │
│ Display Brightness, gamma, multi-backend │
│ Undervolting AMD Curve Optimizer, Intel MSR │
│ CPU boost + EPP Turbo boost, energy preference │
│ Audio DSP EQ, noise, reverb, vocoder │
│ Anime Matrix / Slash LED matrix display control │
│ ROG Ally Controller mode, handheld config │
│ On-screen keyboard Toggle with ghelper --osk │
│ XG Mobile dock Dock lights + dock GPU fan curve │
│ Steam integration Add to Steam, gamescope game mode │
│ FnLock remapping Custom Fn key bindings │
│ NumberPad Trackpad numpad emulation │
│ Mouse / peripherals DPI, polling, Logitech HID++ │
│ System monitor CPU/GPU/RAM dashboard + tray stats │
│ Self-updater In-app update check + changelog │
│ System tray Background tray icon + context menu │
│ Auto-start XDG autostart .desktop integration │
└──────────────────────────────────────────────────────────────────┘
Experimental Lenovo support (IdeaPad / Legion / LOQ / Yoga): performance modes, battery conservation, fan monitoring, PPT limits and keyboard backlight via the mainline ideapad-laptop and lenovo-wmi kernel drivers (kernel 6.17+ for power limits). The eBPF dGPU block works without ASUS firmware.
░▒▓█ ╔══[ GPU MODE SWITCHING ]══╗ █▓▒░
G-Helper manages the ASUS dGPU (discrete GPU) power state and MUX switch through four modes. Eco can block the card with the ASUS firmware, with PCI disable or with a kernel eBPF filter. Pick the backend in Extra > GPU.
╔══[ MODES ]═════════════════════════════════════════════════════╗
║ ║
║ Eco dGPU powered off (dgpu_disable=1) ║
║ Maximum battery life, iGPU only ║
║ ║
║ Standard Hybrid mode (dgpu_disable=0, MUX=iGPU) ║
║ dGPU available for offloading, iGPU drives display ║
║ ║
║ Optimized Auto-switch based on power source ║
║ Eco on battery, Standard on AC power ║
║ ║
║ Ultimate dGPU direct (dgpu_disable=0, MUX=dGPU) ║
║ Best performance — dGPU drives display directly ║
║ ║
╚═════════════════════════════════════════════════════════════════╝
╠══[ BLOCK BACKENDS ]══╣
Backend
Eco does
Back to Standard
ASUS firmware (MUX mode)
dgpu_disable=1 in the EC
Usually no reboot
PCI disable
Unloads the driver, removes the card from the PCI bus
Rescan, usually no reboot
eBPF block (default on new installs)
Driver stays loaded, a kernel filter hides the dGPU from apps
Instant, no reboot
New installs use eBPF when it can run; otherwise they start on MUX mode on ASUS and PCI elsewhere, and switch to eBPF at a later start in Standard once it can run, until you pick a backend yourself. Existing installs keep their backend.
The reboot rules below are for the ASUS firmware backend. PCI and eBPF release Eco live.
╠══[ REBOOT REQUIREMENTS ]══╣
Transition
Reboot?
Why
Eco ↔ Standard
Usually no
May need reboot if GPU driver is active
Any → Ultimate
Yes
MUX switch is latched, takes effect on reboot
Ultimate → Any
Yes
MUX switch back to iGPU requires reboot
When a reboot is required, G-Helper shows a notification and the pending mode appears in the UI. You can change your mind before rebooting — clicking a different mode cancels the pending change.
╠══[ DRIVER BLOCKING DIALOG ]══╣
Switching to Eco while the dGPU driver is active shows a dialog with three options:
Switch Now — closes the apps using the dGPU and unloads its driver (unsaved work in them is lost)
After Reboot — saves the mode for next boot (dGPU driver is blocked from loading via modprobe rules)
Cancel — keeps the current mode
╠══[ eBPF dGPU BLOCK ]══╣
Extra > GPU: eBPF is used when neither “Use MUX mode (ASUS firmware)” nor “Use PCI dGPU disable” is ticked.
A kernel eBPF filter hides the dGPU PCI, DRM, hwmon and NVIDIA files from new processes. The driver stays loaded, so Standard is instant with no reboot. The hidden card can power off (D3cold), so Eco saves power without unloading anything.
Needs:
a kernel built with CONFIG_BPF_LSM=y and booted with bpf in its LSM list. Updates shows the state and adds it to GRUB, systemd-boot, grubby or rpm-ostree. The first enable after that needs a reboot.
libbpf (package libbpf1 on Debian/Ubuntu). Without it Updates shows the install command.
kernel lockdown not set to confidentiality.
a clang with the bpf target to build the filter. Release binaries and the AppImage already contain it.
Optimized on eBPF blocks on battery and releases on AC. It does not block while a monitor is connected to a dGPU port or while the MUX is on the dGPU.
dGPU apps in Extra > GPU: an allow list by process name, for apps and Steam games that may still use the hidden card. ghelper --dgpu <command> starts any other program on the dGPU.
The card stays awake, and no power is saved, while an allowed app runs, while an app still holds the dGPU, or while runtime D3 is off.
╠══[ KNOWN LIMITATIONS ]══╣
Ultimate → Eco may require 2 reboots (MUX must change first, then Eco can apply)
MUX switch support varies by model — requires gpu_mux_mode sysfs attribute
Eco mode may require a reboot if the dGPU driver holds a DRM file descriptor
On boot, a systemd oneshot service applies pending GPU mode changes before the display manager starts
╠══[ RAW WMI MODE (EXPERIMENTAL) ]══╣
For 2020-2021 laptops without dgpu_disable sysfs, G-Helper supports raw ACPI/WMI calls
via the kernel’s debugfs interface. See docs/raw-wmi.md for details.
╠══[ UNDERVOLTING (AMD RYZEN) ]══╣
Curve Optimizer undervolting for AMD Ryzen CPUs via the ryzen_smu kernel driver. Requires the driver to be installed separately. The feature is hidden unless the driver is loaded and the CPU is supported. See docs/amd-undervolting.md for setup, supported CPUs, and details.
░▒▓█ ╔══[ DISCLAIMER ]══╗ █▓▒░
╔══[ TERMS OF USE ]══════════════════════════════════════════════╗
║ ║
║ G-Helper Linux interacts directly with ASUS firmware via ║
║ kernel sysfs attributes and ACPI/WMI methods. These are the ║
║ same interfaces used by ASUS Armoury Crate on Windows. ║
║ ║
║ BY USING THIS SOFTWARE, YOU ACKNOWLEDGE: ║
║ ║
║ 1. This software writes to hardware control registers that ║
║ affect GPU power state, fan speeds, power limits, and ║
║ MUX switch configuration. ║
║ ║
║ 2. Incorrect or interrupted writes (e.g., power loss during ║
║ a MUX switch) could leave hardware in an unexpected state. ║
║ In rare cases, a CMOS reset may be needed to recover. ║
║ ║
║ 3. Experimental features (marked as such) bypass normal ║
║ kernel safety checks and should only be enabled if you ║
║ understand the risks. ║
║ ║
║ 4. This software is provided AS-IS with no warranty. ║
║ The authors are not responsible for hardware damage. ║
║ ║
╚═════════════════════════════════════════════════════════════════╝
░▒▓█ ╔══[ SYSTEM REQUIREMENTS ]══╗ █▓▒░
╔══[ MINIMUM SPEC ]══════════════════════════════════════════════╗
║ ║
║ OS Ubuntu 24.04+ / Debian 13+ / Fedora 39+ / Arch ║
║ libc glibc 2.38+ (release binary and AppImage) ║
║ Desktop X11 or Wayland (X11 recommended for full xrandr) ║
║ Kernel 6.2+ recommended, 6.9+ for all features ║
║ Module asus-nb-wmi (loaded by default on ASUS laptops) ║
║ ║
╚═════════════════════════════════════════════════════════════════╝
On NixOS the same command stages a module in /etc/nixos and runs nixos-rebuild switch.
The binary and the AppImage also check their system files on every start and offer to install or repair them with one password prompt (state in the Updates window).
# Check for outdated NuGet packages
cd src && dotnet list package --outdated
./build.sh
sudo ./install/install-local.sh
# Before opening a PR (CI runs these too)
dotnet run -c Debug --project tests/GHelper.Linux.Tests
bash install/tests/test-ghelper-gpu-boot.sh
bash install/tests/test-gpu-block-helper.sh
bash install/tests/test-gpu-helper.sh
./scripts/i18n-check.sh
╠══[ MANUAL BUILD COMMANDS ]══╣
# Development (no AOT, fast incremental rebuilds)
./build.sh --fast && ./dist/ghelper
# GHELPER_DEV=1 shows a "Dev Windows" button in the main window to open any app window without the matching hardware
GHELPER_DEV=1 ./dist/ghelper
# Production (Native AOT)
./build.sh
# -> dist/ghelper
评论