Lights up keyboards that ship no working Linux driver — by speaking the vendor-neutral HID LampArray protocol (Microsoft "Dynamic Lighting", HID usage page
0x59) directly overhidraw.
lampctl was born from a real dead end: an ASUS TUF Gaming A16 (FA608UP) whose
keyboard backlight is dark on Linux because no driver implements it. It turns out the
keyboard is a perfectly standard LampArray device — so instead of waiting for a
vendor quirk, lampctl just talks the standard. The same code works on any LampArray
device, not just one laptop.
- 🎨 Live preview — your keyboard updates in real time as you scrub hue/brightness
- 🌈 Modes — static colour, rainbow cycle, breathing
- ⌨️ TUI and CLI — a polished ratatui interface, plus
lampctl set 00e5fffor scripts - 📦 Reusable library — the
lamparraycrate is a tiny, dependency-light HID LampArray implementation you can use on its own - 🪶 No vendor SDK, no daemon required — raw
hidraw, one static binary
cargo install lampctllampctl needs read/write access to the device's hidraw node. The repo's setup
script writes a udev rule matched to your device and adds you to the input group:
git clone https://github.com/mrp2003/lampctl && cd lampctl
./install.sh # detects your device; uses sudo for the udev ruleinstall.sh also (re)builds and installs the binary, so you can skip
cargo install if you go this route. Log out and back in (so the input group
takes effect), then run lampctl.
Set up device access by hand
Copy dist/99-lampctl.rules into /etc/udev/rules.d/
(adjust the VID:PID to match lampctl list), then:
sudo udevadm control --reload-rules && sudo udevadm trigger
sudo usermod -aG input "$USER" # log out and back in afterwardslampctl # launch the TUI
lampctl --demo # launch the TUI with no device (preview mode)
lampctl set 00e5ff # solid cyan
lampctl off # lights out
lampctl list # show detected LampArray devices (with VID:PID)A LampArray device exposes a handful of standard HID feature reports. lampctl:
- Discovers devices by scanning
hidrawreport descriptors for usage page0x59. - Sends
LampArrayControl(AutonomousMode = 0) to take control from the firmware. - Sends
LampRangeUpdateto colour every lamp.
That's the whole trick — no reverse-engineering, no proprietary commands.
| Crate | What it is |
|---|---|
lamparray |
Library: discover + drive HID LampArray devices |
lampctl |
Binary: the ratatui TUI + CLI |
Dual-licensed under either MIT or Apache-2.0, at your option.
