Skip to content

fix: recognize Turbo profile and enable manual fans on PHN16S-71 - #5

Open
Philippe-Augusto wants to merge 1 commit into
fladirm:mainfrom
Philippe-Augusto:fix/phn16s-71-profile-and-manual-fan
Open

fix: recognize Turbo profile and enable manual fans on PHN16S-71#5
Philippe-Augusto wants to merge 1 commit into
fladirm:mainfrom
Philippe-Augusto:fix/phn16s-71-profile-and-manual-fan

Conversation

@Philippe-Augusto

Copy link
Copy Markdown

Summary

Fixes two of the gaps reported in #1 on my own Predator PHN16S-71 (board FTYPE_ARX, BIOS V1.26). Both were tested live on the exact hardware from that report.

  • Profiles were entirely unavailable. The firmware reads back profile code 0x02, which wasn't in the known Acer profile table, so asense_profile_by_value() returned NULL, rgb->profile_available stayed false, and the gaming_profile sysfs group was never created. I confirmed 0x02 is Turbo by reading it on Linux immediately before a reboot into Windows, where PredatorSense opened with Turbo already the active mode (no profile write happened in between). Mapped it in kernel/asense_rgb.c, scoped to this exact model via dmi_match (same pattern as the existing asense_zoned_quirks/asense_reference_model quirks) rather than the shared table, since Acer's per-board WMI profile codes aren't guaranteed identical across the whole Predator lineup and only this one has been verified. Turbo is exposed read-only (ProfileChoice.selectable = false): writing it back through the same WMI SET method was rejected by the firmware with a remote I/O error on this hardware, so the GUI shows it as informational only instead of offering a control that reliably fails.

  • Manual fan mode was unavailable, only Auto/Maximum showed. discover_gaming_wmi_fan_interface gates Manual on a readable Acer-branded (acer/acer-wmi) hwmon device for CPU/GPU temperature — that's the thermal watchdog's safety precondition before allowing a user-set low speed. This board registers no such hwmon device at all. Added a narrow, exact-model fallback (TemperatureSource::AcpiThermalZones) that reads the same information from generic ACPI thermal zones the firmware already exposes (TCPU for CPU, SEN4 for GPU) — verified live against coretemp and nvidia-smi at the same instant, including a load spike where TCPU and acpitz/coretemp all jumped to 93°C together. Every other board keeps its existing hwmon-only behavior unchanged; this only activates when the exact product string matches and the branded hwmon device is absent.

Also worth a maintainer look, not fixed here (didn't want to scope-creep this PR):

  • The passive diagnostic report (asense probe) can show daemon: error(protocol/timeout) simply because the GUI already holds the single control-socket connection open — the daemon serves one client at a time (serve_client in src/daemon.rs), so a second client just hangs until the first disconnects. Every capture attached to Compatibility Report: Predator Helios Neo 16 (PHN16S-71) - RGB and Fan Control working, but RPM and Profiles are missing #1 hit this, which is why they all showed a blanket timeout instead of the real per-field state.
  • Before this fix, the passive diagnostic collector reported fans.control.modes.manual = true even though the real, safety-gated capability used by the GUI correctly said Manual wasn't available (this is what led me to it) — the probe should reflect what the GUI will actually allow, not just what the WMI transport structurally accepts.
  • Two small pre-existing profile-label bugs surfaced once Turbo made 6 choices render together: raw balanced-performance and performance both display as "Performance" for non-reference models (profile_from_raw_for_machine in src/app.rs), and the passive diagnostics decoder doesn't yet recognize "turbo" as a valid canonical choice string.
  • RPM tachometer readback: investigated two plausible leads (unused bits of the existing ASENSE_FAN_SPEED_GET reply, and the undocumented multi-bank embedded-controller query behind ASENSE_GAMING_SYS_INFO_GET, found by decompiling the live DSDT). Both ruled out by live comparison against an audible Auto/Maximum fan-speed change — neither value moves at all. Real tachometer data would need actual EC firmware disassembly to find, which felt out of scope for a compatibility fix.

Test plan

  • cargo test --release --no-default-features --lib — 162 passed, 0 failed (including the existing gaming_wmi_manual_requires_both_watchdog_temperatures safety test, unmodified)
  • cargo build --release --bin asensed --no-default-features and kernel module built clean via make in kernel/
  • Live-tested on the reporter's own PHN16S-71: Manual fan mode shows independent CPU/GPU sliders and applies successfully ("Settings verified"); Turbo now decodes correctly instead of "Unavailable" and shows as a disabled/informational button instead of one that fails
  • Confirmed zero behavior change for any board other than the exact Predator PHN16S-71 product string (both new code paths are gated behind an exact DMI product match before doing anything)

The Predator PHN16S-71 (board FTYPE_ARX) reads back firmware profile
code 0x02, which wasn't in the known Acer profile table, so the
gaming_profile sysfs group was never created and Profiles showed
Unavailable in the GUI. Confirmed via a Windows/PredatorSense
correlation (no profile write in between) that 0x02 is Turbo.

Added the mapping scoped to this exact model (dmi_match on the product
name, matching the existing per-model quirk pattern in this file),
since Acer's per-board WMI profile codes aren't guaranteed identical
across the Predator lineup and only this one has been verified. Turbo
is exposed read-only (ProfileChoice.selectable = false): attempting to
write it back through the same WMI SET method was rejected by the
firmware with a remote I/O error on this hardware, so the GUI shows it
as informational only instead of offering a control that reliably
fails.

Manual fan mode was unavailable because discover_gaming_wmi_fan_interface
gates it on a readable Acer-branded hwmon device for CPU/GPU
temperature (the thermal watchdog's safety precondition), and this
board registers none. Added a narrow, exact-model fallback
(TemperatureSource::AcpiThermalZones) that reads the same information
from generic ACPI thermal zones already exposed by the firmware
(TCPU for CPU, SEN4 for GPU), verified live against coretemp and
nvidia-smi. Every other board keeps its existing hwmon-only behavior
unchanged.

Both fixes tested live: Manual mode now offers independent CPU/GPU
percent sliders and applies successfully; Turbo now decodes correctly
instead of showing Unavailable, with no working button that could fail.

Related: fladirm#1

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant