Skip to content

utajum/g-helper-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

94 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

G-Helper for Linux

Click on the screenshot to view full size.

 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—       β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— 
β–ˆβ–ˆβ•”β•β•β•β•β•       β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β•šβ•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•      β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘
 β•šβ•β•β•β•β•β•       β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•     β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•
                        β–ˆβ–ˆβ•—     β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•— 
                        β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β• 
                        β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ•”β•  
                        β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—  
                        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•— 
                        β•šβ•β•β•β•β•β•β•β•šβ•β•β•šβ•β•  β•šβ•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β• 
 β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘
         ╔══[ SYSTEM ]════════════════════════════════╗
         β•‘  >_ KERNEL: LINUX                          β•‘ 
         β•‘  >_ STATUS: ONLINE...                      β•‘
         β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•[ 0x1F4 ]════╝
           ╔══════════════════════════════════════╗
           β•‘  ASUS LAPTOP CONTROL FOR LINUX       β•‘
            β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

GitHub Release Total Binary Downloads Total AppImage Downloads License

β–‘β–’β–“β–ˆ ╔══[ WEBSITE ]══╗ β–ˆβ–“β–’β–‘

g-helper-linux.elevatech.xyz


β–‘β–’β–“β–ˆ ╔══[ 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 requests are welcome!


Buy Me A Coffee


β–‘β–’β–“β–ˆ ╔══[ 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)     β”‚
β”‚  Power limits              CPU PL1/PL2, Dynamic Boost, temps    β”‚
β”‚  Screen control            Refresh rate, Panel OD, MiniLED      β”‚
β”‚  Keyboard backlight        Brightness + RGB color               β”‚
β”‚  Display                   Brightness, gamma adjustment         β”‚
β”‚  CPU boost                 Enable/disable turbo boost            β”‚
β”‚  System tray               Background tray icon + context menu  β”‚
β”‚  Auto-start                XDG autostart .desktop integration   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β–‘β–’β–“β–ˆ ╔══[ GPU MODE SWITCHING ]══╗ β–ˆβ–“β–’β–‘

G-Helper manages the ASUS dGPU (discrete GPU) power state and MUX switch through four modes:

╔══[ 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    β•‘
β•‘                                                                 β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

╠══[ 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 β€” attempts to unload the dGPU driver (requires admin password)
  • After Reboot β€” saves the mode for next boot (dGPU driver is blocked from loading via modprobe rules)
  • Cancel β€” keeps the current mode

╠══[ 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

β–‘β–’β–“β–ˆ ╔══[ SYSTEM REQUIREMENTS ]══╗ β–ˆβ–“β–’β–‘

╔══[ MINIMUM SPEC ]══════════════════════════════════════════════╗
β•‘                                                                 β•‘
β•‘  OS       Ubuntu 22.04+ / Debian 12+ / Fedora 38+ / Arch      β•‘
β•‘  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)      β•‘
β•‘                                                                 β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
# verify kernel module
lsmod | grep asus
# expected: asus_nb_wmi, asus_wmi

╠══[ KERNEL FEATURE MATRIX ]══╣

Feature Min Kernel
Performance modes, fan speed, battery limit 5.17
Custom fan curves (8-point) 5.17
PPT power limits (PL1, PL2, FPPT) 6.2
GPU MUX switch 6.1
NVIDIA Dynamic Boost / Temp Target 6.2
MiniLED mode control 6.9

β–‘β–’β–“β–ˆ ╔══[ INSTALLATION ]══╗ β–ˆβ–“β–’β–‘

╠══[ ONE-LINER INSTALL ]══╣

curl -sL https://raw.githubusercontent.com/utajum/g-helper-linux/master/install/install.sh | sudo bash

╠══[ MANUAL DOWNLOAD ]══╣

curl -sL https://github.com/utajum/g-helper-linux/releases/latest/download/ghelper -o ghelper
chmod +x ghelper
./ghelper

╠══[ APPIMAGE ]══╣

curl -sL https://github.com/utajum/g-helper-linux/releases/latest/download/GHelper-x86_64.AppImage -o GHelper-x86_64.AppImage
chmod +x GHelper-x86_64.AppImage
./GHelper-x86_64.AppImage

╠══[ BUILD FROM SOURCE ]══╣

# Ubuntu/Debian
sudo apt install dotnet-sdk-8.0 clang zlib1g-dev

# Fedora
sudo dnf install dotnet-sdk-8.0 clang zlib-devel

# Arch
sudo pacman -S dotnet-sdk clang
./build.sh
sudo ./install/install-local.sh
╠══[ MANUAL BUILD COMMANDS ]══╣
# Development (JIT, fast iteration)
cd src && dotnet restore && dotnet run

# Production (Native AOT)
cd src && dotnet publish -c Release
# β†’ src/bin/Release/net8.0/linux-x64/publish/ghelper

β–‘β–’β–“β–ˆ ╔══[ INSTALL TARGETS ]══╗ β–ˆβ–“β–’β–‘

╔══[ DEPLOYED FILES ]════════════════════════════════════════════╗
β•‘                                                                 β•‘
β•‘  0xF0  Binary     /opt/ghelper/ghelper                         β•‘
β•‘  0xF1  Symlink    /usr/local/bin/ghelper                       β•‘
β•‘  0xF2  udev       /etc/udev/rules.d/90-ghelper.rules          β•‘
β•‘  0xF3  Desktop    /usr/share/applications/ghelper.desktop      β•‘
β•‘  0xF4  Autostart  ~/.config/autostart/ghelper.desktop          β•‘
β•‘                                                                 β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

install.sh downloads the release binary. install-local.sh uses the local build from dist/.

# reload udev after install (or reboot)
sudo udevadm control --reload-rules && sudo udevadm trigger
╠══[ MANUAL SETUP ]══╣
# udev rules
sudo cp install/90-ghelper.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger

# Desktop entry + autostart
sudo cp install/ghelper.desktop /usr/share/applications/
mkdir -p ~/.config/autostart
cp install/ghelper.desktop ~/.config/autostart/

β–‘β–’β–“β–ˆ ╔══[ CONFIGURATION ]══╗ β–ˆβ–“β–’β–‘

~/.config/ghelper/config.json

Same JSON key format as Windows G-Helper β€” fan curves and mode settings are compatible.


β–‘β–’β–“β–ˆ ╔══[ PROJECT STRUCTURE ]══╗ β–ˆβ–“β–’β–‘

g-helper-linux/
  build.sh                                # Build script (Native AOT)
  install/
    install.sh                            # Download + install (end users)
    install-local.sh                      # Install from local build (devs)
    90-ghelper.rules                      # udev rules
    ghelper.desktop                       # Desktop entry
  src/
    Program.cs                            # Entry point
    App.axaml / App.axaml.cs              # Avalonia app + tray icon
    GHelper.Linux.csproj                  # Project file (AOT config)
    Helpers/
      Logger.cs                           # Console logger
      AppConfig.cs                        # Configuration (JSON, AOT-safe)
    Mode/
      Modes.cs                            # Performance mode definitions
      ModeControl.cs                      # Mode change orchestrator
    Platform/
      Linux/
        SysfsHelper.cs                    # Core sysfs read/write utility
        LinuxAsusWmi.cs                   # asus-wmi sysfs + evdev events
        LinuxPowerManager.cs              # CPU boost, platform profile
        LinuxDisplayControl.cs            # Backlight, xrandr, gamma
        LinuxNvidiaGpuControl.cs          # nvidia-smi monitoring
        LinuxAmdGpuControl.cs             # amdgpu sysfs monitoring
        LinuxAudioControl.cs              # PulseAudio/PipeWire
        LinuxInputHandler.cs              # evdev event forwarding
        LinuxSystemIntegration.cs         # DMI sysfs, XDG autostart
    UI/
      Styles/
        GHelperTheme.axaml                # Dark theme
      Controls/
        FanCurveChart.cs                  # Interactive fan curve chart
      Views/
        MainWindow.axaml / .cs            # Main settings window
        FansWindow.axaml / .cs            # Fan curve editor + power limits
        ExtraWindow.axaml / .cs           # Display, power, system info
      Assets/
        *.png, *.ico                      # Image assets

β–‘β–’β–“β–ˆ ╔══[ ARCHITECTURE ]══╗ β–ˆβ–“β–’β–‘

Windows (G-Helper) Linux (this port)
\\.\ATKACPI DeviceIoControl /sys/devices/platform/asus-nb-wmi/ sysfs
DSTS (read) / DEVS (write) cat / echo > sysfs attributes
WMI Win32_* queries /sys/class/dmi/id/ sysfs
user32.dll EnumDisplaySettings xrandr CLI
NvAPIWrapper.Net nvidia-smi CLI + hwmon sysfs
atiadlxx.dll (AMD ADL) amdgpu hwmon sysfs
Task Scheduler autostart XDG ~/.config/autostart/*.desktop
WinForms UI Avalonia UI (cross-platform)

β–‘β–’β–“β–ˆ ╔══[ CREDITS ]══╗ β–ˆβ–“β–’β–‘


β–‘β–’β–“β–ˆ ╔══[ LICENSE ]══╗ β–ˆβ–“β–’β–‘

Same license as the original G-Helper project.


Buy Me A Coffee

  β–‘β–’β–“β–ˆ END OF TRANSMISSION β–ˆβ–“β–’β–‘
  > SESSION_END :: 0x00000000

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages