Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ccc1258806 | |||
| ab8e24d9b0 | |||
| 08ce81d15a | |||
| 5bf9f66298 | |||
| 306e799dfe | |||
| 1f79d15a22 | |||
| 08ac427431 | |||
| 5c107fee24 |
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 楼湘缘
|
||||
Copyright (c) 2026 edgevoid
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,67 +1,115 @@
|
||||
# kbd · ASUS TUF FA608 键盘背光 CLI
|
||||
# kbd
|
||||
|
||||
ASUS TUF Gaming A16 FA608 keyboard backlight CLI.
|
||||
> ASUS TUF Gaming A16 FA608 键盘背光命令行工具
|
||||
>
|
||||
> Keyboard backlight CLI for ASUS TUF Gaming A16 FA608 laptops.
|
||||
|
||||
纯 C 编译,运行时只依赖 `libhidapi`。
|
||||
Single C binary — no runtime dependencies beyond `libhidapi`.
|
||||
[](LICENSE)
|
||||
[](https://gitee.com/louxian-yuan/fa608-kbd/releases)
|
||||
|
||||
## 为什么需要 / Why
|
||||
纯 C 编写,单二进制 14KB。运行时仅依赖 `libhidapi-hidraw0`。
|
||||
|
||||
FA608 使用 **ITE51368 键盘控制器,走 I2C HID** (`0B05:19B6`)。
|
||||
Linux 下该设备默认处于 *Windows Dynamic Lighting* 模式,所有 WMI/sysfs 背光指令均被忽略。
|
||||
Single C binary (14KB). One runtime dependency: `libhidapi-hidraw0`.
|
||||
|
||||
The FA608 uses an **ITE51368 keyboard controller over I2C HID** (`0B05:19B6`).
|
||||
On Linux this device defaults to *Windows Dynamic Lighting* mode after boot,
|
||||
which ignores all WMI/sysfs backlight commands.
|
||||
---
|
||||
|
||||
本工具发送 HID feature report `[0x46, 0x01]` 将其切换至 *Embedded Controller* 模式,
|
||||
随后通过标准 `asus::kbd_backlight` sysfs 接口控制亮度与 RGB 灯效。
|
||||
## 特性 / Features
|
||||
|
||||
This tool sends the HID feature report `[0x46, 0x01]` to switch it to
|
||||
*Embedded Controller* mode, then controls brightness and RGB effects
|
||||
through the standard `asus::kbd_backlight` sysfs interface.
|
||||
- 🎨 **RGB 灯效** — 12 种模式:静态、呼吸、彩虹、脉冲、彗星等
|
||||
- ☀️ **亮度调节** — 4 级亮度(0-3),支持 toggle 切换
|
||||
- ⚡ **开机即用** — systemd 服务开机自动初始化,无需手动 `kbd init`
|
||||
- 📦 **Deb 包分发** — `dpkg -i` 一键安装,依赖自动补齐
|
||||
- 🪶 **轻量** — 14KB 二进制,零 bloat
|
||||
- 🔧 **免 sudo** — 安装后普通用户直接使用
|
||||
|
||||
## 编译 / Build
|
||||
## 演示 / Demo
|
||||
|
||||
```bash
|
||||
$ kbd color ff6600 # 静态橙色
|
||||
$ kbd breathe 00ff00 2 # 绿色呼吸
|
||||
$ kbd rainbow 1 # 彩虹循环
|
||||
$ kbd toggle # 关 → 开
|
||||
```
|
||||
|
||||
## 安装 / Installation
|
||||
|
||||
### Deb 包(推荐)
|
||||
|
||||
```bash
|
||||
sudo dpkg -i fa608-kbd_1.0.0_amd64.deb
|
||||
```
|
||||
|
||||
安装后 systemd 服务自动启用,重启无需任何操作。
|
||||
|
||||
### 源码编译
|
||||
|
||||
```bash
|
||||
sudo apt install libhidapi-dev # Debian/Ubuntu
|
||||
git clone https://gitee.com/louxian-yuan/fa608-kbd.git
|
||||
cd fa608-kbd
|
||||
make
|
||||
sudo make install # → /usr/local/bin/kbd
|
||||
sudo make install
|
||||
```
|
||||
|
||||
## 用法 / Usage
|
||||
|
||||
```
|
||||
kbd init 模式切换 / switch to EC mode
|
||||
kbd on|off|toggle 亮度开关 / brightness
|
||||
kbd 0-3 亮度等级 / brightness level
|
||||
kbd color ff6600 静态橙色 / static orange
|
||||
kbd color ffffff 静态白色 / static white
|
||||
kbd breathe 00ff00 2 绿色呼吸(速度 0-2)/ green breathing
|
||||
kbd rainbow 1 彩虹循环(速度 0-2)/ rainbow cycle
|
||||
kbd mode 10 ff8800 2 自定义模式 10 脉冲 / pulse
|
||||
kbd on|off|toggle 亮度开关
|
||||
kbd 0-3 亮度等级
|
||||
kbd color RRGGBB 静态颜色
|
||||
kbd breathe RRGGBB [speed] 呼吸灯效
|
||||
kbd rainbow [speed] 彩虹循环
|
||||
kbd mode N RRGGBB [speed] 自定义模式
|
||||
kbd init 切换 EC 模式(systemd 已自动处理)
|
||||
```
|
||||
|
||||
模式 / Modes: 0=静态/Static, 1=呼吸/Breathe, 2=彩虹循环/RainbowCycle,
|
||||
3=彩虹波/RainbowWave, 4=星空/Star, 5=雨滴/Rain, 6=高亮/Highlight,
|
||||
7=激光/Laser, 8=涟漪/Ripple, 10=脉冲/Pulse, 11=彗星/Comet
|
||||
参数说明:
|
||||
|
||||
## 开机自启 / Auto-start
|
||||
| 参数 | 取值 | 说明 |
|
||||
|------|------|------|
|
||||
| `RRGGBB` | 6 位十六进制 | RGB 颜色,如 `ff6600` |
|
||||
| `speed` | 0-2 | 速度:0=慢, 1=中, 2=快 |
|
||||
| `N` | 0-12(除 9) | 灯效模式(见下表) |
|
||||
|
||||
安装 systemd 服务,开机自动执行 `kbd init`:
|
||||
## 灯效模式 / LED Modes
|
||||
|
||||
```bash
|
||||
sudo cp kbd-init.service /etc/systemd/system/
|
||||
sudo systemctl enable --now kbd-init.service
|
||||
```
|
||||
| 值 | 模式 | Mode |
|
||||
|:--:|------|------|
|
||||
| 0 | 静态 | Static |
|
||||
| 1 | 呼吸 | Breathe |
|
||||
| 2 | 彩虹循环 | Rainbow Cycle |
|
||||
| 3 | 彩虹波 | Rainbow Wave |
|
||||
| 4 | 星空 | Star |
|
||||
| 5 | 雨滴 | Rain |
|
||||
| 6 | 高亮 | Highlight |
|
||||
| 7 | 激光 | Laser |
|
||||
| 8 | 涟漪 | Ripple |
|
||||
| 10 | 脉冲 | Pulse |
|
||||
| 11 | 彗星 | Comet |
|
||||
|
||||
## 免 sudo / Udev rule
|
||||
> 模式 9 无效(硬件不支持),≥12 自动降级为 Pulse。
|
||||
|
||||
```bash
|
||||
# /etc/udev/rules.d/99-kbd.rules
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="19b6", MODE="0666"
|
||||
```
|
||||
## 为什么需要 / Why This Exists
|
||||
|
||||
FA608 使用 **ITE51368** 键盘控制器,通过 I2C HID (`0B05:19B6`) 连接。
|
||||
Linux 下该设备默认处于 **Windows Dynamic Lighting** 模式,
|
||||
此时所有 WMI 和 sysfs 背光指令均被硬件忽略。
|
||||
|
||||
本工具在启动时向设备发送一条 HID Feature Report (`0x46 0x01`),
|
||||
将其切换至 **Embedded Controller** 模式。
|
||||
此后 `asus::kbd_backlight` sysfs 接口即可正常控制亮度与 RGB。
|
||||
|
||||
The FA608 uses an ITE51368 keyboard controller over I2C HID.
|
||||
On Linux it defaults to Windows Dynamic Lighting mode, which
|
||||
silently ignores all backlight commands. This tool sends a single
|
||||
HID feature report to switch it to Embedded Controller mode,
|
||||
after which the standard kernel interface works correctly.
|
||||
|
||||
## 致谢 / Credits
|
||||
|
||||
感谢 [DaniilBaida/asus-tuf-a16-linux](https://github.com/DaniilBaida/asus-tuf-a16-linux)
|
||||
提供了 ITE51368 切换 EC 模式的 HID Feature Report 思路。
|
||||
|
||||
## 许可 / License
|
||||
|
||||
MIT
|
||||
MIT © 2026 edgevoid
|
||||
|
||||
Vendored
+1
-1
@@ -5,4 +5,4 @@ fa608-kbd (1.0.0) unstable; urgency=medium
|
||||
* Brightness + RGB effect control via sysfs.
|
||||
* systemd service for boot-time init.
|
||||
|
||||
-- 楼湘缘 <2216918339@qq.com> Sat, 27 Jun 2026 15:50:00 +0800
|
||||
-- edgevoid <2216918339@qq.com> Sat, 27 Jun 2026 15:50:00 +0800
|
||||
|
||||
Vendored
+2
-2
@@ -1,10 +1,10 @@
|
||||
Source: fa608-kbd
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: 楼湘缘 <2216918339@qq.com>
|
||||
Maintainer: edgevoid <2216918339@qq.com>
|
||||
Build-Depends: debhelper-compat (= 13), libhidapi-dev, pkg-config
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://gitee.com/louxian-yuan/fa608-kbd
|
||||
Homepage: https://gitee.com/edgevoid/fa608-kbd
|
||||
|
||||
Package: fa608-kbd
|
||||
Architecture: amd64
|
||||
|
||||
Vendored
+2
-2
@@ -1,9 +1,9 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: fa608-kbd
|
||||
Source: https://gitee.com/louxian-yuan/fa608-kbd
|
||||
Source: https://gitee.com/edgevoid/fa608-kbd
|
||||
|
||||
Files: *
|
||||
Copyright: 2026 楼湘缘
|
||||
Copyright: 2026 edgevoid
|
||||
License: MIT
|
||||
|
||||
License: MIT
|
||||
|
||||
Reference in New Issue
Block a user