Skip to content

Instantly share code, notes, and snippets.

@piratecarrot
Created February 17, 2024 10:51
Show Gist options
  • Save piratecarrot/0f7ce1e5f7da8fb4c92d24a5475cee75 to your computer and use it in GitHub Desktop.
Save piratecarrot/0f7ce1e5f7da8fb4c92d24a5475cee75 to your computer and use it in GitHub Desktop.
clevo_wmi (tuxedo-keyboard) keyboard LED udev rule and script on Arch Linux but probably works with others
# /etc/udev/rules.d/10-keyboard-leds.rules
ACTION=="add", SUBSYSTEM=="leds", DEVPATH=="/devices/platform/tuxedo_keyboard/leds/rgb:kbd_backlight_2", RUN+="/usr/local/bin/keyboard-leds.sh"

Clevo WMI (tuxedo-keyboard) udev rules for keyboard LEDS

I have a Metabox P950EP laptop which is apparently a rebranded Clevo, much the same as Tuxedo from Germany. I used the Arch AUR package https://aur.archlinux.org/packages/tuxedo-drivers-dkms

I then auto load the module, created a script. Be sure to make it executable

sudo chown root:root /usr/local/bin/keyboard-leds.sh sudo chmod 0744 /usr/local/bin/keyboard-leds.sh

Create the udev rule

Test with

sudo modprobe clevo_wmi

This should all hopefully work for other devices supported by the tuxedo-keyboard drivers. Probably lots of details I have left out, but hope this helps.

# /etc/modules-load.d/clevo_wmi.conf
clevo-wmi
#!/bin/sh
# /usr/local/bin/keyboard-leds.sh
BRIGHTNESS=100
echo $BRIGHTNESS | tee /sys/devices/platform/tuxedo_keyboard/leds/rgb:kbd_backlight/brightness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment