Skip to content

Instantly share code, notes, and snippets.

@jeanlescure
Forked from llybin/asus_kbd_backlight.txt
Created April 23, 2025 02:42
Show Gist options
  • Save jeanlescure/2bbe697274f9ec8bbcdf2c33a5089bce to your computer and use it in GitHub Desktop.
Save jeanlescure/2bbe697274f9ec8bbcdf2c33a5089bce to your computer and use it in GitHub Desktop.
Asus TUF keyboard backlight
# Brightness
0 - Off
1 - Low
2 - Medium
3 - High
echo 1 > /sys/class/leds/asus::kbd_backlight/brightness
# State, when backlight is enabled
cat /sys/class/leds/asus::kbd_backlight/kbd_rgb_state_index
'cmd boot awake sleep keyboard'
cmd and keyboard - any digits, nothing changes for me
echo '1 1 1 0 1' > /sys/class/leds/asus::kbd_backlight/kbd_rgb_state
# Mode
cat /sys/class/leds/asus::kbd_backlight/kbd_rgb_mode_index
'cmd mode red green blue speed'
cmd - any digit, nothing changes for me
mode:
0 - Static
1 - Breathing
2 - Color Cycle
3 - Strobing
May vary on your laptop. Mine doesn't have a Strobing mode.
red,green,blue - 0-255
kcolorchooser --print | sed 's/#//' | awk '{printf "%d %d %d\n", strtonum("0x" substr($1,1,2)), strtonum("0x" substr($1,3,2)), strtonum("0x" substr($1,5,2))}'
speed:
0 - Slow
1 - Medium
2 - Fast
echo '1 2 255 255 255 0' > /sys/class/leds/asus::kbd_backlight/kbd_rgb_mode
You not able to read a current values, only to set it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment