A lightweight, standalone Linux kernel companion driver that enables rich keyboard RGB customization, brightness toggling, and Windows-key lock control.
Important
No Driver Conflicts!
This driver works completely standalone and coexists perfectly alongside the stock kernel hp-wmi driver or any patched WMI driver. It does not claim any WMI GUID, avoiding driver registration conflicts entirely.
| Feature | Description | Interface |
|---|---|---|
| 🎨 Multi-Zone RGB | Set custom Hex colors individually for up to 8 zones (zone0 to zone7). |
sysfs platform device |
| 💡 Brightness Toggle | A simple power interface to quickly enable or disable the keyboard backlight. | sysfs platform device |
| 🔒 Windows Key Lock | Enable or disable the Windows Key lock (Gaming Mode) on supported keyboard profiles. | sysfs platform device |
This driver has native support for major Linux distributions and their derivatives:
The helper script setup.sh auto-detects your distro, installs the required compiler toolchain + kernel headers, and sets up DKMS for automatic rebuilds on kernel updates.
# Clone the repository
git clone https://github.com/yunusemreyl/hp-rgb-lighting
cd hp-rgb-lighting
# Install the driver
sudo ./setup.shTo clean up and uninstall:
sudo ./setup.sh uninstall⚡ Optimized Kernels (CachyOS, Arch Clang, etc.) 🛠️ Manual DKMS Install 🏔️ Arch Linux (AUR) ❄️ NixOS Flake ⚙️ Usage All driver controls are located under the platform device directory: cd /sys/devices/platform/hp-rgb-lighting/
Control custom colors for up to 8 zones (zone0 to zone7) using HEX values.
# Read current color of Zone 0
cat /sys/devices/platform/hp-rgb-lighting/zone0
# Set Zone 0 to Red (FF0000)
echo "FF0000" | sudo tee /sys/devices/platform/hp-rgb-lighting/zone0
# Set Zone 1 to Green (00FF00)
echo "00FF00" | sudo tee /sys/devices/platform/hp-rgb-lighting/zone1
# Set Zone 2 to Blue (0000FF)
echo "0000FF" | sudo tee /sys/devices/platform/hp-rgb-lighting/zone2Quickly toggle the keyboard backlight state.
# Get current backlight state (1 = ON, 0 = OFF)
cat /sys/devices/platform/hp-rgb-lighting/brightness
# Turn backlight OFF
echo 0 | sudo tee /sys/devices/platform/hp-rgb-lighting/brightness
# Turn backlight ON
echo 1 | sudo tee /sys/devices/platform/hp-rgb-lighting/brightnessEnable/disable gaming lock for the Windows Key.
# Check current lock state (1 = LOCKED, 0 = UNLOCKED)
cat /sys/devices/platform/hp-rgb-lighting/win_lock
# Lock Windows Key (Disable it)
echo 1 | sudo tee /sys/devices/platform/hp-rgb-lighting/win_lock
# Unlock Windows Key (Enable it)
echo 0 | sudo tee /sys/devices/platform/hp-rgb-lighting/win_lockLicense: Distributed under the GPL-2.0-or-later License.
Disclaimer: USE AT YOUR OWN RISK. THE AUTHORS ACCEPT NO RESPONSIBILITY FOR ANY DAMAGES.
If this driver works for your laptop, please consider giving this repository a ⭐ to help others discover it!