Skip to content

fix: allow ENEK5130 keyboard controls without legacy sysfs features - #248

Open
abduvaliy-hbai wants to merge 2 commits into
PXDiv:mainfrom
abduvaliy-hbai:fix/enek5130-feature-gates
Open

fix: allow ENEK5130 keyboard controls without legacy sysfs features#248
abduvaliy-hbai wants to merge 2 commits into
PXDiv:mainfrom
abduvaliy-hbai:fix/enek5130-feature-gates

Conversation

@abduvaliy-hbai

@abduvaliy-hbai abduvaliy-hbai commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What happened

PR #213 added the ENEK5130 HID backend and correctly exposed the dedicated
enek5130_hid_rgb capability. On laptops such as the Acer Nitro ANV16S-41,
the daemon detects the HID controller while the legacy Linuwu-Sense
four_zoned_kb sysfs directory is absent.

The remaining GUI, client, and daemon command gates still required the legacy
per_zone_mode or four_zone_mode capability. As a result:

  • the GUI hid both keyboard color panels;
  • after making the panels visible, their click handlers still returned early
    because has_four_zone_kb was false;
  • the client rejected color/effect requests before sending them; and
  • the daemon rejected direct requests before reaching the ENEK5130 backend.

The logs therefore showed enek5130_hid_rgb as available, but no HID feature
report could be triggered through DAMX.

Fix

  • Show the per-zone and effects controls when enek5130_hid_rgb is available.
  • Route both Apply button handlers and preset initialization through a shared
    RGB-capability check that accepts legacy sysfs or ENEK5130.
  • Allow the client to send both keyboard commands for ENEK5130 devices.
  • Allow the daemon command handlers and setters to route those commands to the
    existing ENEK5130 implementation.
  • Preserve the explicit ENEK capability instead of falsely advertising legacy
    sysfs features that do not exist.

Verification

  • python3 -m py_compile passes for all daemon Python files.

  • The Avalonia solution builds and publishes successfully with .NET 9.

  • The daemon packages successfully with PyInstaller.

  • Tested on Acer Nitro ANV16S-41 with ENEK5130 at /dev/hidraw8.

  • get_supported_features returned enek5130_hid_rgb with
    has_four_zone_kb: false.

  • A normal set_four_zone_mode socket request returned success: true and
    produced the expected daemon log:

    Set ENEK5130 HID RGB via /dev/hidraw8 report=a4 21 02 64 00 00 42 87 f5 0f 00 ret=11
    

This closes the integration gap left after #213: detection and HID transport
were already working, but the feature gates made them unreachable.

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