Skip to content

rootfs: Add udev rule for AYANEO 3 magic module controls - #536

Open
matmartinez wants to merge 2 commits into
ShadowBlip:mainfrom
matmartinez:ayaneo-modules-udev
Open

rootfs: Add udev rule for AYANEO 3 magic module controls#536
matmartinez wants to merge 2 commits into
ShadowBlip:mainfrom
matmartinez:ayaneo-modules-udev

Conversation

@matmartinez

Copy link
Copy Markdown

Prerequisite for the AYANEO magic-modules quick-bar plugin, as requested in #528: grants unprivileged access to the sysfs controls the plugin drives — eject/reset on the hid-ayaneo driver and controller_power on the mainline ayaneo-ec driver.

Notes:

  • udev can't set permissions on sysfs attributes via MODE/uaccess (device nodes only), hence the RUN+chmod form. The HID device rebinds on every controller power cycle, so the rule matches add|bind.
  • Went with 0666 since these are local physical controls with no data exposure and there's no cross-distro group to target; happy to switch to a group-write model if you prefer one.
  • Verified on an AYANEO 3 running Bazzite 44: with this rule the plugin performs the full eject → power-cut → reinsert → repower cycle unprivileged.

The plugin itself: https://github.com/matmartinez/ayaneo-3-bazzite-compat/tree/main/ogui-plugin — registry PR to OpenGamepadUI-plugins to follow once this lands. (While building it I also hit #535, which affects all quick-bar plugins in overlay mode.)

Grants unprivileged access to the sysfs controls used by the upcoming
AYANEO magic-modules plugin: eject/reset on the hid-ayaneo HID driver
and controller_power on the ayaneo-ec platform driver. Prerequisite for
the plugin store submission per ShadowBlip#528.
Comment thread rootfs/usr/lib/udev/rules.d/70-ayaneo-modules.rules Outdated
Comment thread rootfs/usr/lib/udev/rules.d/70-ayaneo-modules.rules Outdated
Comment thread rootfs/usr/lib/udev/rules.d/70-ayaneo-modules.rules Outdated
@matmartinez

Copy link
Copy Markdown
Author

Revised rule verified on hardware (AYANEO 3, Bazzite 44): all three attributes come up 0666 on a natural driver rebind (the TEST== existence matches fire correctly — they're stat-based, so the write-only attrs don't trip them), and an unprivileged user has write access. Also confirmed across a manual udevadm trigger for the ayaneo-ec add rule.

@matmartinez
matmartinez requested a review from pastaq August 26, 2026 02:11
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.

2 participants