Add DMI quirk for Acer Predator Triton 300 SE (PT316-51s)#17
Open
GbrFrn wants to merge 1 commit into
Open
Conversation
Board: Roadster_ADH. Probed on real hardware: * predator_v4 codepath delivers all 8 predator_sense attributes (fan_speed, battery_limiter, battery_calibration, usb_charging, backlight_timeout, boot_animation_sound, lcd_override, version) with working WMI reads. * Four-zoned RGB keyboard WMI calls return errors on this firmware, so four_zone_kb is intentionally not set in the quirk. Before this entry the user had to load the module with enable_all=1 as a workaround, which forced ACER_CAP_NITRO_SENSE_V4 and caused half the sysfs reads to fail because the daemon hit codepaths the firmware doesn't implement.
bd9d892 to
6ff42b1
Compare
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 a DMI quirk entry for the Acer Predator Triton 300 SE —
Predator PT316-51s, boardRoadster_ADH. Introduces a small dedicated quirk struct (quirk_acer_predator_pt316_51s) that combines.predator_v4 = 1with.four_zone_kb = 1, placed right after the PH18-71 entry.Why
Without a DMI match this model has no working configuration:
modprobe linuwu_sense) produces no sysfs directories at all —find_quirks()ends withquirks = &quirk_unknown, no caps get set, nopredator_sense/ornitro_sense/is created.enable_all=1in/etc/modprobe.d/. But the secondary cap block at lines ~4863-4872 OR-s in all ofPREDATOR_SENSE | NITRO_SENSE | NITRO_SENSE_V4whenever any of{enable_all, predator_v4, nitro_v4}is set as a module param. That routes sysfs intonitro_sense_v4_attr_group(which has.name = "nitro_sense"), so a Predator ends up exposing a directory misleadingly namednitro_sense/. Worse, it enables WMI codepaths the firmware doesn't fully implement and pollutes the cap mask.With this DMI quirk, the struct fields are set via
set_quirks()(not the module param), the secondary block stays inactive, and the cleanpredator_sense/directory is created alongsidefour_zoned_kb/with only the caps the firmware actually supports.Probed on real hardware
Tested with
/etc/modprobe.d/empty and module params at defaults. After this patch, on PT316-51s:All eight
predator_senseattrs read cleanly:Platform profile registered with
quiet balanced balanced-performance performance(firmware advertises bitmap 0x33; no ECO/low-power on this model). Selectingperformancecorrectly maps toACER_PREDATOR_V4_THERMAL_PROFILE_TURBO(0x05).RGB keyboard caveat
This laptop has a four-zoned RGB keyboard that does work in terms of writes —
echo "ff0000,00ff00,0000ff,ffffff,80" > /sys/.../four_zoned_kb/per_zone_modecorrectly changes the lights. However, the firmware's get-method has a bug: readingper_zone_modeback returns a malformed zone4 value (7 hex chars instead of 6), and on some module-load attemptsacer_keyboard_state_load()logsfailed to set keyboard rgb: 134283264 / Error setting KB statuswhile trying to restore the previously-saved state.I left
four_zone_kbenabled anyway because the writes work — users get RGB control even with that broken read. If you'd rather mask the broken read entirely, dropping.four_zone_kb = 1from the quirk is a one-line revert; let me know if you'd prefer that.Test plan
LLVM=1againstlinux-cachyos7.0.8 (clang 22.1.5) — clean compile, 2 pre-existing-Wbitwise-instead-of-logicalwarnings unrelated to this patch.predator_sense/andfour_zoned_kb/populated.predator_senseattrs readable.per_zone_modewrite accepted (verified withff0000,00ff00,0000ff,ffffff,80— RGB visibly changed; readback shows the firmware-side zone4 get-method bug noted above).Detected laptop type: PREDATORwithBase path: …/predator_sense,Four-zone keyboard: Yes, and 10/10 features detected.DMI strings for reference