Nekro-Sense is a heavily adapted fork of Linuwu-Sense that targets the Acer Predator Helios Neo PHN16-72. It adds native Linux support for platform power profiles, fans, keyboard RGB (four-zone), and the back-lid logo/lightbar. The project consists of a kernel module that exposes a clean sysfs API plus user-space CLI and GUI tools.
This README is the full, consolidated technical documentation (it replaces the standalone docs file).
The project’s purpose is to provide first‑class Linux support for hardware features that are otherwise gated behind OEM Windows utilities. It does that by using the same ACPI/WMI firmware interfaces the OEM tooling uses, but with a transparent, auditable implementation that runs with minimal overhead and no background services.
Key goals:
- Enable official‑like feature parity on Linux without proprietary services.
- Keep all firmware interaction explicit, minimal, and device‑gated.
- Provide a stable sysfs API and scriptable CLI to integrate with Linux workflows.
- Hardware scope: Acer Predator PHN16‑72 only. The driver now assumes WMID v2 and no longer includes legacy AMW0/WMID‑v1 paths or multi‑model DMI tables.
- OS scope: Primary development and testing on Arch Linux; other distros may work but are not guaranteed.
- Safety: The driver interacts with low-level firmware methods. Use at your own risk.
To achieve maximum GPU performance on the Acer Predator PHN16‑72 you must install the nvidia-open drivers and enable the nvidia-powerd service. The discrete NVIDIA GPU is locked to an 80W power limit by default; enabling nvidia-powerd raises the limit to ~140W for full performance.
Example (Arch Linux):
sudo pacman -S nvidia-open
sudo systemctl enable nvidia-powerd.service
sudo systemctl reboot- Four‑zone keyboard RGB (static per-zone + effects)
- Back‑lid logo/lightbar RGB with brightness and power
- Fan control (auto + manual CPU/GPU)
- Platform performance profiles via ACPI
platform_profile - Battery limiter (80% cap) and calibration hooks
- Optional USB charging toggle, LCD override, boot animation sound controls
Kernel module: src/nekro_sense.c
- Registers as an Acer WMI platform driver (PHN16‑72‑only path)
- Calls vendor WMI methods (WMID GUIDs) for Predator Sense v4 features
- Exposes sysfs groups for RGB, fans, battery, and platform profiles
- Uses a fixed PHN16‑72 quirk profile for feature gating
User space:
- CLI:
tools/nekroctl.py— validated read/write to sysfs - GTK GUI:
tools/nekroctl_gui.py— libadwaita frontend calling the CLI - Rust GUI:
tools/nekroctl-gui-rs— egui client for lightweight environments
- Extract ACPI tables (read‑only):
acpidump→acpixtract→iasl -d. - Identify the WMID dispatcher and GUIDs used for gaming/lighting features.
- Derive method semantics and payload layouts by tracing ASL.
- Validate with conservative getters before applying setters.
- Implement with strict size checks, gating by DMI, and defensive error handling.
- WMID GUID (lighting/game features):
7A4DDFE7-5B5D-40B4-8595-4408E0CC7F56 - Dispatcher:
WMBH - Keyboard (4‑zone):
- Set: Arg1
0x14(unified) with selector1 - Get: Arg1
0x15with selector1
- Set: Arg1
- Back‑logo/lightbar:
- Preferred set: Arg1
0x0C(RGB + brightness + enable) - Preferred get: Arg1
0x0D - Some firmware gates power via Arg1
0x14(selector2), so the driver drives both paths
- Preferred set: Arg1
Base path (typical):
/sys/module/nekro_sense/drivers/platform:acer-wmi/acer-wmi
Common groups:
-
predator_sense/fan_speed—CPU%,GPU%(0 = auto)battery_limiter—0/1battery_calibration—0/1usb_charging—0/10/20/30backlight_timeoutboot_animation_soundlcd_override
-
four_zoned_kb/per_zone_mode—RRGGBB,RRGGBB,RRGGBB,RRGGBB,brightnessfour_zone_mode—mode,speed,brightness,direction,R,G,B
-
back_logo/color—RRGGBB,brightness,enable
Platform profile (standard ACPI interface):
/sys/firmware/acpi/platform_profile
/sys/firmware/acpi/platform_profile_choices
-
Install kernel headers for your running kernel.
- Arch:
sudo pacman -S linux-headers - Debian/Ubuntu:
sudo apt install linux-headers-"$(uname -r)"
- Arch:
-
Build and install:
git clone https://github.com/FelipeFMA/nekro-sense.git
cd nekro-sense
make install- Remove:
make uninstallIf the kernel was built with Clang/LLVM, build the module with LLVM:
make LLVM=1
sudo make LLVM=1 installOr export:
export LLVM=1
export CC=clang
export LD=ld.lldValidated CLI helper: tools/nekroctl.py.
Examples:
# Battery limiter
sudo python3 tools/nekroctl.py battery get
sudo python3 tools/nekroctl.py battery on
sudo python3 tools/nekroctl.py battery off
# Fans
sudo python3 tools/nekroctl.py fan auto
sudo python3 tools/nekroctl.py fan set --cpu 35 --gpu 40
# Keyboard
sudo python3 tools/nekroctl.py rgb per-zone ff0000 00ff00 0000ff ffffff -b 60
sudo python3 tools/nekroctl.py rgb effect wave -s 2 -b 80 -d 2 -c ff00ff
# Back logo
sudo python3 tools/nekroctl.py logo set ff6600 -b 70 --ontools/nekroctl_gui.py — theme‑aware GUI that calls the CLI and uses sudo/pkexec for privileged writes.
Run:
python3 tools/nekroctl_gui.pytools/nekroctl-gui-rs/ — fast, lightweight GUI for TWMs.
cd tools/nekroctl-gui-rs
cargo build --release
./target/release/nekroctl-gui-rsThe module persists thermal/fan state and keyboard state across AC changes and reboots using files:
/etc/predator_state/etc/four_zone_kb_state
This is intentionally minimal and avoids daemons. See “Code improvement opportunities” below for safer alternatives.
At a high level, src/nekro_sense.c integrates three layers:
- WMI/ACPI transport layer — wraps vendor WMID calls, validates buffers, and surfaces errors in kernel logs.
- Feature controllers — fan control, thermal profile toggling, RGB control, battery limiter, and peripheral toggles.
- Sysfs API layer — exposes user‑friendly file interfaces that can be consumed by CLI/GUI tools.
Notable implementation details:
- Fan control:
acer_set_fan_speed()translates CPU/GPU percentages into firmware commands and sets fan behavior (auto/max/custom) before applying speeds. - Platform profile:
acer_predator_v4_platform_profile_*()maps between ACPIplatform_profileoptions and firmware profile IDs, with AC‑power gating for unsupported modes. - RGB keyboard: supports effect modes via a 16‑byte payload, and per‑zone static colors via a 4‑byte buffer per zone.
- Back logo: uses a dedicated setter/getter (
0x0C/0x0D) and a unified 0x14 fallback to ensure the power gate is honored. - Persistent state: saves and restores profile + fan + RGB state on AC events and module unload/load.
- Missing headers: ensure kernel headers match
uname -r. - Permission/build errors in src/: fix ownership and clean:
sudo chown -R "$USER":"$USER" /path/to/nekro-sense make clean
- Module conflicts: remove stock
acer_wmibefore install:sudo modprobe -r acer_wmi sudo modprobe -r wmi sudo make LLVM=1 install
- Optional per‑segment logo control via
0x06/0x07 - Packaging for major distributions
- Additional models via DMI‑gated contributions
- Keep the scope focused on PHN16‑72 unless you add clear DMI‑gated support for other models.
- Keep PRs small and explain the firmware evidence when adding new methods.
- Update user‑space tools and README when sysfs behavior changes.
GPLv3. No warranty. Use at your own risk.
- Linuwu‑Sense provided foundational ideas and patterns. Nekro‑Sense has diverged substantially to support PHN16‑72.