A lightweight, animated daemon for ASUS VivoBook laptops with white-only, 4-stage keyboard backlights. It replaces standard system behavior with smooth, breathing-effect animations that change based on your power state.
- Smart Modes:
- Battery (🔋): Gentle "Cycle Wave" (
0→1→2→3→2→1→0) breathing effect. - AC Power (🔌): Snappy "Sync Pulse" (
Hold→FadeDown→FadeUp) blink effect.
- Battery (🔋): Gentle "Cycle Wave" (
- Natural Feel: Uses sine-easing (on 4-level hardware) to simulate smooth breathing by lingering longer at brightness extremes.
- Zero-Config Transitions: Automatically switches modes the moment you plug in or unplug your charger.
- Resource Efficient: Runs as a low-overhead
systemduser service; uses standardsysfsLED interfaces.
This has been tested and specifically tuned for the ASUS VivoBook X513EPNN on Ubuntu, but it will work on any ASUS laptop that exposes its keyboard backlight via:
/sys/class/leds/asus::kbd_backlight/
- OS: Linux (developed/tested on Ubuntu 24.04+).
- Access:
sysfswrites to/sys/class/leds/asus::kbd_backlight/brightness. - Dependencies:
bash(shell)python3(for real-time easing curve interpolation)systemd(service management)udev(power-state detection)
-
Clone or Download the repo
git clone https://github.com/smrt-nerd/vivobook-backlight.git cd vivobook-backlight -
Set Permissions Ensure all scripts are executable:
chmod +x kbd-backlight.sh kbd-backlight-power.sh install.sh uninstall.sh
-
Install Run the installer. It configures udev rules to allow your user to control the backlight without needing
sudoat runtime:./install.sh
All animation timings are defined in the Tunables section of kbd-backlight.sh:
# Battery mode wave speed
CYCLE_STEP_DELAY=0.6
# AC mode pulse speed
BLINK_HOLD_ON=1.8 # Time held at max brightness
BLINK_FADE_TOTAL=0.7 # Time taken to fade full-down or upAfter modifying these, simply restart the daemon:
systemctl --user restart kbd-backlight- Permissions:
90-asus-kbd-backlight.rulessets the backlight file's group ownership toinputand addsg+wpermissions on boot. - AC Detection:
91-asus-kbd-backlight-power.ruleslistens for AC power transitions (AC0events). - Daemon:
kbd-backlight.shruns as a user service. It listens forSIGUSR1from the power hook to instantly switch between the Cycle and Blink modes.
- Logs:
journalctl --user -u kbd-backlight -f - Stop:
systemctl --user stop kbd-backlight - Uninstall:
./uninstall.sh