{"id":19852697,"url":"https://github.com/shadowblip/ayaneo-platform","last_synced_at":"2026-02-09T05:18:12.977Z","repository":{"id":200775786,"uuid":"693944930","full_name":"ShadowBlip/ayaneo-platform","owner":"ShadowBlip","description":"Linux drivers for AYANEO x86 handhelds providing RGB control.","archived":false,"fork":false,"pushed_at":"2025-01-28T08:15:53.000Z","size":84,"stargazers_count":9,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-06T20:23:10.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShadowBlip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-20T02:56:49.000Z","updated_at":"2025-02-07T08:27:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"69b4eb72-3fb5-4492-bc3b-d5fe61f1f7c4","html_url":"https://github.com/ShadowBlip/ayaneo-platform","commit_stats":null,"previous_names":["shadowblip/ayaneo-platform"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowBlip%2Fayaneo-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowBlip%2Fayaneo-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowBlip%2Fayaneo-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowBlip%2Fayaneo-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShadowBlip","download_url":"https://codeload.github.com/ShadowBlip/ayaneo-platform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251966431,"owners_count":21672666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T14:04:03.620Z","updated_at":"2026-02-09T05:18:12.972Z","avatar_url":"https://github.com/ShadowBlip.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Platform driver for AYANEO x86 handhelds\n\nThis driver provides a sysfs interface for RGB control.\nAnd also a sysfs interface for bypass charge.\n\nSupported devices include:\n\n - AIR\n - AIR Pro\n - AIR Plus\n - AIR 1s\n - 2\n - 2S\n - GEEK\n - GEEK 1S\n - KUN\n - Slide\n\n## Build\n\nIf you only want to build and test the module (you need headers for your\nkernel):\n\n```shell\n$ git clone https://github.com/ShadowBlip/ayaneo-platform.git\n$ cd ayaneo-platform\n$ make\n```\n\nThen insert the module and check `dmesg`:\n```shell\n# insmod ayaneo-platform.ko\n```\n\n## Install\n\nYou'll need appropriate headers for your kernel and `dkms` package from your\ndistribution.\n\n```shell\n$ git clone https://github.com/ShadowBlip/ayaneo-platform.git\n$ cd ayaneo-platform\n$ make\n# make dkms\n```\n\n## Usage\n\n### RGB Control\n\nLED color and brightness can be controlled via sysfs.\n\nOn most systems this will be mounted at `/sys/class/leds/ayaneo:rgb:joystick_rings/` and provides the following files:\n\n#### `brightness`\n\nRead/write.\n\nGets or sets the overall brightness of the LEDs. Accepts a value between 0 and `max_brightness`.\n\nDefaults to 0.\n\n#### `max_brightness`\n\nRead only.\n\nGets the maximum brightness supported by the LEDs. On most systems this value is 255.\n\n#### `multi_index`\n\nRead only.\n\nGets the names of each of the channels supported by `multi_intensity`. On most systems this value will be \"red green blue\".\n\n#### `multi_intensity`\n\nRead/write.\n\nGets or sets the intensity of each of the channels. The expected value is list of numbers between 0 and 255 for each of the channels listed in `multi_index`.\n\nDefault is \"0 0 0\".\n\n#### `suspend_mode`\n\nRead/write.\n\nControls how the LEDs should behave during suspend. When reading, the currently selected option will be wrapped in square brackets `[ ]`.\n\n|Value|Description|\n|-|-|\n|oem|The LEDs retain OEM behavior.On most devices, they will breathe white during suspend and breathe red when charging.|\n|off|The LEDs are turned off during suspend. They do not respond to charging.|\n|keep|The LEDs retain their current color during suspend. They do not respond to charging.|\n\nDefault is \"oem\".\n\n#### Identifying and Setting Color Values\n\nThe current brightness and color can be retrieved as follows:\n```shell\n$ cat /sys/class/leds/ayaneo:rgb:joystick_rings/brightness\n0\n$ cat /sys/class/leds/ayaneo:rgb:joystick_rings/multi_intensity\n0 0 0\n```\n\nNew values can be set as follows:\n```shell\n$ echo \"255\" | sudo tee /sys/class/leds/ayaneo:rgb:joystick_rings/brightness\n255\n$ echo \"255 0 128\" | sudo tee /sys/class/leds/ayaneo:rgb:joystick_rings/multi_intensity\n255 0 128\n```\n\n### Power Supply Charge Behaviour\n\nPower Supply Charge Behaviour can be set to Auto or Inhibit Charge via sysfs.\n\nOn most systems this will be mounted/hooked at `/sys/class/power_supply/BAT*/` and provides the following files:\n\n#### charge_behaviour\n\nRead/write.\n\nEnables or disables the bypass charge. Accepts a value of \"auto\" and \"inhibit-charge\".\nWhen reading, the currently selected option will be wrapped in square brackets `[ ]`.\n\n|Value|Description|\n|-|-|\n|\"auto\"|Disables the bypass charge. The battery is normally charged.|\n|\"inhibit-charge\"|Enables the bypass charge. Battery charging will be stopped.|\n\nDefault is \"auto\"\n\n#### Identifying and Setting Control Values\n\nThe current charge type and end threshold can be retrieved as follows:\n```shell\n$ cat /sys/class/power_supply/BAT*/charge_type\n[auto] inhibit-charge\n```\n\nNew values can be set as follows:\n```shell\n$ echo \"inhibit-charge\" | sudo tee /sys/class/power_supply/BAT*/charge_type\ninhibit-charge\n```\n\n## Changing Startup Defaults\nThe platform driver is fully exposed over systemd udev. This can be used to write udev rules that set attributes at startup.\n\n### Udev Attributes Tree\n```shell\n$ udevadm info --attribute-walk /sys/class/leds/ayaneo:rgb:joystick_rings\n\n  looking at device '/devices/platform/ayaneo-platform/leds/ayaneo:rgb:joystick_rings':\n    KERNEL==\"ayaneo:rgb:joystick_rings\"\n    SUBSYSTEM==\"leds\"\n    DRIVER==\"\"\n    ATTR{brightness}==\"0\"\n    ATTR{max_brightness}==\"255\"\n    ATTR{multi_index}==\"red green blue\"\n    ATTR{multi_intensity}==\"0 0 0\"\n    ATTR{power/control}==\"auto\"\n    ATTR{power/runtime_active_time}==\"0\"\n    ATTR{power/runtime_status}==\"unsupported\"\n    ATTR{power/runtime_suspended_time}==\"0\"\n    ATTR{suspend_mode}==\"[oem] keep off\"\n    ATTR{trigger}==\"[none] usb-gadget usb-host rc-feedback kbd-scrolllock kbd-numlock kbd-capslo\u003e\n\n  looking at parent device '/devices/platform/ayaneo-platform':\n    KERNELS==\"ayaneo-platform\"\n    SUBSYSTEMS==\"platform\"\n    DRIVERS==\"ayaneo-platform\"\n    ATTRS{driver_override}==\"(null)\"\n    ATTRS{power/control}==\"auto\"\n    ATTRS{power/runtime_active_time}==\"0\"\n    ATTRS{power/runtime_status}==\"unsupported\"\n    ATTRS{power/runtime_suspended_time}==\"0\"\n\n  looking at parent device '/devices/platform':\n    KERNELS==\"platform\"\n    SUBSYSTEMS==\"\"\n    DRIVERS==\"\"\n    ATTRS{power/control}==\"auto\"\n    ATTRS{power/runtime_active_time}==\"0\"\n    ATTRS{power/runtime_status}==\"unsupported\"\n    ATTRS{power/runtime_suspended_time}==\"0\"\n```\n\n\n### Creating a rule\nYou can store a udev rule as `/etc/udev/rules.d/##-rule_name.rules`\n\nAll rules will start like this:\n`ACTION==\"add|change\", KERNEL==\"ayaneo:rgb:joystick_rings\", SUBSYSTEM==\"leds\"`\n\nTo define a default, add the attribute in the format `ATTR{name}=value`\nValid attributes are:\n```\nATTR{brightness}==\"[0-255]\"\nATTR{multi_intensity}==\"[0-255] [0-255] [0-255]\"\nATTR{suspend_mode}==\"[oem|keep|off]\"\n```\n\nAs en example, to set `suspend_mode`to `off`:\n`ACTION==\"add|change\", KERNEL==\"ayaneo:rgb:joystick_rings\", SUBSYSTEM==\"leds\", ATTR{suspend_mode}=\"off\"\n`\n\nto create the rule in one line:\n```shell\n$ echo 'ACTION==\"add|change\", KERNEL==\"ayaneo:rgb:joystick_rings\", SUBSYSTEM==\"leds\", ATTR{suspend_mode}=\"off\"' | sudo tee /etc/udev/rules.d/99-led_suspend_mode.rules\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowblip%2Fayaneo-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadowblip%2Fayaneo-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowblip%2Fayaneo-platform/lists"}