Skip to content

yunusemreyl/hp-rgb-lighting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⌨️ hp-rgb-lighting

Standalone Keyboard RGB Backlight & Control Driver for HP Laptops

A lightweight, standalone Linux kernel companion driver that enables rich keyboard RGB customization, brightness toggling, and Windows-key lock control.

GitHub Release License: GPL-2.0 Stars Issues


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.


✨ Features

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

🐧 Distro Compatibility

This driver has native support for major Linux distributions and their derivatives:

Arch Linux Ubuntu Debian Fedora RHEL openSUSE NixOS


🚀 Installation

1. Quick Install (All Distros)

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.sh

To clean up and uninstall:

sudo ./setup.sh uninstall

2. Tailored Installations

⚡ 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/

🎨 RGB Keyboard Colors

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/zone2

💡 Backlight Brightness

Quickly 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/brightness

🔒 Windows Key Lock (Gaming Mode)

Enable/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_lock

📜 License & Disclaimer

License: Distributed under the GPL-2.0-or-later License.

Disclaimer: USE AT YOUR OWN RISK. THE AUTHORS ACCEPT NO RESPONSIBILITY FOR ANY DAMAGES.

✨ Show Your Support

If this driver works for your laptop, please consider giving this repository a ⭐ to help others discover it!

About

A lightweight, standalone Linux kernel companion driver that enables rich keyboard RGB customization, brightness toggling, and Windows-key lock control.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors