Skip to content

feat(predator): add PHN16-72 back logo/lightbar support - #20

Open
0PeterAdel wants to merge 2 commits into
PXDiv:mainfrom
0PeterAdel:feat/phn16-72-back-logo
Open

feat(predator): add PHN16-72 back logo/lightbar support#20
0PeterAdel wants to merge 2 commits into
PXDiv:mainfrom
0PeterAdel:feat/phn16-72-back-logo

Conversation

@0PeterAdel

@0PeterAdel 0PeterAdel commented Jul 5, 2026

Copy link
Copy Markdown

Summary

Adds hardware-backed RGB control for the rear Predator logo/lightbar on Acer Predator PHN16-72 systems.

The feature is model-gated through ACER_CAP_BACK_LOGO and exposes:

/sys/module/linuwu_sense/drivers/platform:acer-wmi/acer-wmi/back_logo/color

Sysfs interface

Accepted formats:

RRGGBB,brightness,enable
RRGGBB,brightness
  • RRGGBB: exactly six hexadecimal characters.

  • brightness: integer from 0 to 100.

  • enable: optional 0 or 1.

  • If enable is omitted, non-zero brightness enables the logo.

  • When enable=0, brightness is normalized to 0 to ensure firmware that ignores the enable flag still switches the logo off.

Example:

echo '00ffcc,100,1' | sudo tee /sys/module/linuwu_sense/drivers/platform:acer-wmi/acer-wmi/back_logo/color
cat /sys/module/linuwu_sense/drivers/platform:acer-wmi/acer-wmi/back_logo/color

Implementation

  • Adds the PHN16-72 back-logo quirk and capability flag.

  • Uses the dedicated back-logo WMI set/get methods with a unified-backlight fallback.

  • Strictly rejects malformed RGB, out-of-range brightness/enable values, and extra fields.

  • Creates and independently removes the back_logo sysfs group during probe/remove.

  • Adds root:linuwu_sense group access through tmpfiles (0660).

  • Documents the interface and usage in the README.

Hardware verification

Item | Value -- | -- Model | Acer Predator PHN16-72 System version | V1.16 Board | EQE_RTX BIOS | V1.16 OS | Omarchy (Arch Linux) Kernel | 7.1.9-arch1-2 Tested commit | c425e33

Test results

  • make W=1 completed successfully and produced a module matching the running kernel.

  • make install completed with exit code 0.

  • The module loaded and exposed back_logo/color on real PHN16-72 hardware.

  • Writing 00ffcc,100,1 changed the physical rear logo to cyan and read back exactly.

  • The two-field form ff00aa,40 inferred enable=1, changed the physical logo to magenta, and read back ff00aa,40,1.

  • Writing 00ffcc,100,0 physically switched the logo off and correctly read back the normalized state 00ffcc,0,0.

  • Invalid RGB, brightness above 100, enable outside 0/1, and unexpected extra fields were rejected while preserving the previous state.

  • Module unload removed the sysfs path cleanly; reload recreated it without a kernel Oops, call trace, or panic.

  • The okal user received direct read/write access through the linuwu_sense group.

  • Automatic module loading, sysfs creation, permissions, and service state all passed after a fresh reboot.

make W=1 emits one existing unrelated warning for the unused quirk_acer_nitro_anv16_41 variable; no back-logo-related build warning was emitted.

Visual evidence

Terminal evidence and real-hardware photos for cyan, disabled, and magenta states are provided in the follow-up PR comment.

Scope

The feature is gated behind the PHN16-72 quirk, so other models do not expose the new sysfs group unless they explicitly gain the capability.

Attribution

The PHN16-72 back-logo WMI protocol is adapted from Nekro-Sense.

## Summary

Adds hardware-backed RGB control for the rear Predator logo/lightbar on Acer Predator PHN16-72 systems.

The feature is model-gated through ACER_CAP_BACK_LOGO and exposes:

/sys/module/linuwu_sense/drivers/platform:acer-wmi/acer-wmi/back_logo/color

Sysfs interface

Accepted formats:

RRGGBB,brightness,enable
RRGGBB,brightness
  • RRGGBB: exactly six hexadecimal characters.
  • brightness: integer from 0 to 100.
  • enable: optional 0 or 1.
  • If enable is omitted, non-zero brightness enables the logo.
  • When enable=0, brightness is normalized to 0 to ensure firmware that ignores the enable flag still switches the logo off.

Example:

echo '00ffcc,100,1' | sudo tee /sys/module/linuwu_sense/drivers/platform:acer-wmi/acer-wmi/back_logo/color
cat /sys/module/linuwu_sense/drivers/platform:acer-wmi/acer-wmi/back_logo/color

Implementation

  • Adds the PHN16-72 back-logo quirk and capability flag.
  • Uses the dedicated back-logo WMI set/get methods with a unified-backlight fallback.
  • Strictly rejects malformed RGB, out-of-range brightness/enable values, and extra fields.
  • Creates and independently removes the back_logo sysfs group during probe/remove.
  • Adds root:linuwu_sense group access through tmpfiles (0660).
  • Documents the interface and usage in the README.

Hardware verification

Item Value
Model Acer Predator PHN16-72
System version V1.16
Board EQE_RTX
BIOS V1.16
OS Omarchy (Arch Linux)
Kernel 7.1.9-arch1-2
Tested commit c425e3372a54e97e56976765449a0009e6d8f73b

Test results

  • make W=1 completed successfully and produced a module matching the running kernel.
  • make install completed with exit code 0.
  • The module loaded and exposed back_logo/color on real PHN16-72 hardware.
  • Writing 00ffcc,100,1 changed the physical rear logo to cyan and read back exactly.
  • The two-field form ff00aa,40 inferred enable=1, changed the physical logo to magenta, and read back ff00aa,40,1.
  • Writing 00ffcc,100,0 physically switched the logo off and correctly read back the normalized state 00ffcc,0,0.
  • Invalid RGB, brightness above 100, enable outside 0/1, and unexpected extra fields were rejected while preserving the previous state.
  • Module unload removed the sysfs path cleanly; reload recreated it without a kernel Oops, call trace, or panic.
  • The okal user received direct read/write access through the linuwu_sense group.
  • Automatic module loading, sysfs creation, permissions, and service state all passed after a fresh reboot.

make W=1 emits one existing unrelated warning for the unused quirk_acer_nitro_anv16_41 variable; no back-logo-related build warning was emitted.

Visual evidence

Terminal evidence and real-hardware photos for cyan, disabled, and magenta states are provided in the follow-up PR comment.

Scope

The feature is gated behind the PHN16-72 quirk, so other models do not expose the new sysfs group unless they explicitly gain the capability.

Attribution

The PHN16-72 back-logo WMI protocol is adapted from Nekro-Sense.

0PeterAdel and others added 2 commits July 5, 2026 14:43
Merge the latest upstream main, validate sysfs input strictly, keep back_logo cleanup independent from four-zone keyboard support, and free WMI outputs on every path.

Document the sysfs API and grant the linuwu_sense group write access during installation.
@0PeterAdel

Copy link
Copy Markdown
Author

Hardware verification update

Retested the latest PR head (c425e3372a54e97e56976765449a0009e6d8f73b) on real Acer Predator PHN16-72 hardware running Omarchy with kernel 7.1.9-arch1-2.

Physical hardware results

Cyan — 00ffcc,100,1

04-pr20-cyan-back-logo

Disabled — 00ffcc,100,0 → normalized readback 00ffcc,0,0

07-pr20-back-logo-disabled

Magenta at 40% — two-field input ff00aa,40 → inferred ff00aa,40,1

09-pr20-magenta-40-percent
Terminal evidence

Build

01-pr20-build-pass

Runtime, sysfs, and permissions

02-pr20-runtime-sysfs-pass

Strict invalid-input rejection

05-pr20-invalid-input-rejection

Firmware-safe disable normalization

06-pr20-disable-pass

Safe unload/reload cycle

10-pr20-unload-reload-pass

Automatic loading after reboot

11-pr20-boot-persistence-pass

Result

  • Build and installation passed.
  • Valid writes changed the physical rear logo and read back correctly.
  • Invalid inputs were rejected without changing the previous state.
  • Disable, optional enable inference, group permissions, unload/reload cleanup, and boot persistence passed.
  • No kernel Oops, call trace, general-protection fault, or panic was logged during testing.

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