feat(predator): add PHN16-72 back logo/lightbar support - #20
Open
0PeterAdel wants to merge 2 commits into
Open
Conversation
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.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









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_LOGOand exposes:Sysfs interface
Accepted formats:
RRGGBB: exactly six hexadecimal characters.brightness: integer from0to100.enable: optional0or1.If
enableis omitted, non-zero brightness enables the logo.When
enable=0, brightness is normalized to0to ensure firmware that ignores the enable flag still switches the logo off.Example:
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_logosysfs group during probe/remove.Adds
root:linuwu_sensegroup 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 | c425e33Test results
make W=1completed successfully and produced a module matching the running kernel.make installcompleted with exit code0.The module loaded and exposed
back_logo/coloron real PHN16-72 hardware.Writing
00ffcc,100,1changed the physical rear logo to cyan and read back exactly.The two-field form
ff00aa,40inferredenable=1, changed the physical logo to magenta, and read backff00aa,40,1.Writing
00ffcc,100,0physically switched the logo off and correctly read back the normalized state00ffcc,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
okaluser received direct read/write access through thelinuwu_sensegroup.Automatic module loading, sysfs creation, permissions, and service state all passed after a fresh reboot.
make W=1emits one existing unrelated warning for the unusedquirk_acer_nitro_anv16_41variable; 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.
## SummaryAdds 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_LOGOand exposes:Sysfs interface
Accepted formats:
RRGGBB: exactly six hexadecimal characters.brightness: integer from0to100.enable: optional0or1.enableis omitted, non-zero brightness enables the logo.enable=0, brightness is normalized to0to ensure firmware that ignores the enable flag still switches the logo off.Example:
Implementation
back_logosysfs group during probe/remove.root:linuwu_sensegroup access through tmpfiles (0660).Hardware verification
7.1.9-arch1-2c425e3372a54e97e56976765449a0009e6d8f73bTest results
make W=1completed successfully and produced a module matching the running kernel.make installcompleted with exit code0.back_logo/coloron real PHN16-72 hardware.00ffcc,100,1changed the physical rear logo to cyan and read back exactly.ff00aa,40inferredenable=1, changed the physical logo to magenta, and read backff00aa,40,1.00ffcc,100,0physically switched the logo off and correctly read back the normalized state00ffcc,0,0.okaluser received direct read/write access through thelinuwu_sensegroup.make W=1emits one existing unrelated warning for the unusedquirk_acer_nitro_anv16_41variable; 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.