kbd · ASUS TUF FA608 键盘背光 CLI
ASUS TUF Gaming A16 FA608 keyboard backlight CLI.
纯 C 编译,运行时只依赖 libhidapi。
Single C binary — no runtime dependencies beyond libhidapi.
为什么需要 / Why
FA608 使用 ITE51368 键盘控制器,走 I2C HID (0B05:19B6)。
Linux 下该设备默认处于 Windows Dynamic Lighting 模式,所有 WMI/sysfs 背光指令均被忽略。
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 灯效。
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.
编译 / Build
sudo apt install libhidapi-dev # Debian/Ubuntu
make
sudo make install # → /usr/local/bin/kbd
用法 / 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
模式 / 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
安装 systemd 服务,开机自动执行 kbd init:
sudo cp kbd-init.service /etc/systemd/system/
sudo systemctl enable --now kbd-init.service
免 sudo / Udev rule
# /etc/udev/rules.d/99-kbd.rules
KERNEL=="hidraw*", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="19b6", MODE="0666"
许可 / License
MIT