Skip to content

Instantly share code, notes, and snippets.

@llybin
Last active December 6, 2025 07:04
Show Gist options
  • Select an option

  • Save llybin/4740e423d8281d839ef013b6cc93db7f to your computer and use it in GitHub Desktop.

Select an option

Save llybin/4740e423d8281d839ef013b6cc93db7f 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.
@llybin
Copy link
Author

llybin commented Feb 16, 2024

@llybin
Copy link
Author

llybin commented Jan 27, 2025

"CMD is actually the save command. Whenever you pass a 0, your changes are set but will not persist (not saved to firmware). Passing 1 to CMD saves the changes to the firmware. They will persist on reboot."

"Additionally, valid animation modes are actually from 0 to 11. Where modes 9 and 10 are equal."

Thank you, @meganukebmp llybin/AsusTUFLinuxKeyboard#2

@GaneshSapate
Copy link

echo '1 1 1 0 1' > /sys/class/leds/asus::kbd_backlight/kbd_rgb_state

for above command u need root access

use terminal as root and then run below command
echo '1 1 1 1 1' > /sys/class/leds/asus::kbd_backlight/kbd_rgb_state

then

echo '1 1 1 0 1' > /sys/class/leds/asus::kbd_backlight/kbd_rgb_state

this resolved my issue

@jgarcias-cr
Copy link

The solutions exposed here didn't help me at all, because they are for laptop computers apparently, as well as the software provided here in github. I bought a Asus TUF gaming K1 keyboard with backlit capabilities for my desktop computer, and the available drivers to download are only for Windows and Mac.
However, Ubuntu Desktop already has drivers to manage backlit features but doesn't have the software to handle it. I found it at https://openrgb.org/releases.html and installed it with:
sudo apt install ./openrgb_1.0rc2_amd64_bookworm_0fca93e.deb
It works fantastically!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment