Home/Hardware Tinkering/TufA15
TufA15
Making an ASUS TUF A15 behave: a keyboard that flashes colours as you type shortcuts, and a now-retired power daemon that froze the whole system when the lid closed.
- When
- 2025
- Built with
- C, Bash, systemd, sysfs
The TUF A15 is my other laptop, known on my network as ASUSZRN. It has an NVIDIA GPU and an RGB keyboard, and on Linux neither does quite what I wanted out of the box. These two projects were my answer. One is still in use; the other has been retired.
TufKeyboardEffects
A script that listens to the keyboard and answers on the keyboard's own backlight. Backspace flashes red, copy flashes yellow, paste flashes green, undo is orange, save is white. It reads key events directly and writes colours to the ASUS backlight through sysfs, so it works under Wayland too.
A second script does one red blink on its own, for hooking up to anything that should signal an error.
lucid_suspend deprecated
This was version 4.0 of the Central Operations Register Engine, the small always-running core I've had on my machines since the Stargate days. On the TUF it was a C program with three threads.
- Power. It watched the charger. On mains it handed the GPU to NVIDIA's own power daemon; on battery it switched to LACT, a GPU control daemon, instead.
- Lid. Closing the lid put the GPU to sleep and then sent a stop signal to every service on the system except a short list it needed to stay reachable, such as SSH. Opening the lid resumed them all. The machine stayed on, but nothing on it ran.
- Display. On battery it paused my desktop's heads-up display and let it run only in short slices.
Hence the name. The laptop wasn't really asleep, so it woke instantly and stayed on the network, but almost nothing on it was running while it waited.