Linux kernel driver for HP OMEN laptop RGB keyboard lighting. Controls 4-zone RGB lighting with brightness control.
Inspired by the original hp-omen-linux-module by James Churchill (@pelrun).
Tip
Need help or want to chat? Join our official Discord server for support, questions, or to show off your RGB setups:
➡️ Click here to join Discord
- 4-Zone RGB Control - Individual control over each keyboard zone
- All-Zone Control - Set all zones to the same color at once
- Brightness Control - Adjust brightness from 0-100%
- 10 Animation Modes - Complete animation system with CPU-efficient timer-based updates
- Omen Key Support - The Omen key is mapped to KEY_MSDOS for custom shortcuts
- Mute Button LED Control - Automatic LED sync with system mute state via HDA codec
- Real-time Updates - Changes apply immediately
- Hex Color Format - Use standard RGB hex values
- HP OMEN laptops with 4-zone RGB keyboard lighting
| Model Series | Status |
|---|---|
| Omen 16-u0000sl | Tested & working |
| Omen 16-wf1xxx | Tested & working |
| Omen 16-wf0xxx | Tested & working |
| Omen 14-fb0xxx | Tested & working |
# Arch Linux
sudo pacman -S linux-headers base-devel alsa-lib
# Fedora
sudo dnf install kernel-devel kernel-headers @development-tools dkms alsa-lib-devel
# Ubuntu/Debian
sudo apt install linux-headers-$(uname -r) build-essential libasound2t64Note: The ALSA libraries are required for the mute button LED control feature. The driver will still compile without them, but LED sync functionality will be disabled.
Important
We've noticed issues when using this driver at the same time with hp_wmi loaded. Since we implement the same things but in an improved way, there's no reason to keep both fighting each other for WMI events (which will cause issues)
sudo modprobe -r hp_wmi
echo "blacklist hp_wmi" | sudo tee /etc/modprobe.d/blacklist-hp.conf
#regenerate your initramfs (dependent on your distro)# Clone the repository
git clone https://github.com/alessandromrc/omen-rgb-keyboard.git
cd omen-rgb-keyboard
# Build and install
sudo make installThe module will be built and installed using DKMS, which will automatically rebuild it on kernel updates.
The driver is configured to load automatically on boot. If you need to set this up manually:
# Create modprobe configuration (for module options)
sudo cp omen_rgb_keyboard.conf /etc/modprobe.d/
# Create systemd module loading configuration
echo "omen_rgb_keyboard" | sudo tee /etc/modules-load.d/omen_rgb_keyboard.conf
# Create state directory
sudo mkdir -p /var/lib/omen-rgb-keyboardAlternatively, use the provided installation script:
sudo ./install.shBy default, controlling the RGB keyboard requires sudo privileges. To allow your user to control the RGB keyboard without sudo:
# Install udev rules and configure user permissions
sudo ./install-udev-rules.shThis script will:
- Install udev rules that grant access to users in the 'input' group
- Add your user to the 'input' group automatically
- Reload udev rules to apply changes immediately
Important: After running this script, you need to log out and log back in (or run newgrp input) for the group membership to take effect.
After installation, you can control the keyboard without sudo:
# No sudo needed!
echo "rainbow" | tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_mode
echo "5" | tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_speed# Load the module
sudo modprobe omen_rgb_keyboard
# Check if it loaded successfully
lsmod | grep omen_rgb_keyboardThe driver creates sysfs attributes in /sys/devices/platform/omen-rgb-keyboard/rgb_zones/:
# Set zone 0 to red
echo "FF0000" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/zone00
# Set zone 1 to green
echo "00FF00" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/zone01
# Set zone 2 to blue
echo "0000FF" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/zone02
# Set zone 3 to purple
echo "FF00FF" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/zone03# Set all zones to the same color
echo "FFFFFF" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/all# Set brightness to 50%
echo "50" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/brightness
# Set brightness to 100% (maximum)
echo "100" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/brightness
# Turn off lighting (0% brightness)
echo "0" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/brightnessThe mute button LED is automatically synchronized with your system's mute state (polls every 200ms). When you mute audio, the LED turns on; when unmuted, it turns off.
You can also manually control it:
# Manually turn mute button LED on (disables auto-sync)
echo "1" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/mute_led
# Manually turn mute button LED off
echo "0" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/mute_ledNote: Manual control disables automatic synchronization until the driver is reloaded.
# Check current brightness
cat /sys/devices/platform/omen-rgb-keyboard/rgb_zones/brightness
# Check current animation mode
cat /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_mode
# Check current animation speed
cat /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_speed
# Check current zone colors
cat /sys/devices/platform/omen-rgb-keyboard/rgb_zones/zone00
cat /sys/devices/platform/omen-rgb-keyboard/rgb_zones/zone01
# etc...Colors are specified in RGB hex format:
FF0000= Red00FF00= Green0000FF= BlueFFFFFF= White000000= Black (off)
Brightness is specified as a percentage (0-100):
0= Completely off50= 50% brightness100= Maximum brightness
The driver supports 10 different animation modes:
Basic Modes:
- static - No animation, static colors (default)
- breathing - Smooth breathing effect that fades in and out
- rainbow - Rainbow wave that cycles through all colors
- wave - Wave effect that moves across the zones
- pulse - Pulsing effect with varying intensity
Advanced Modes:
- chase - Lights follow each other in sequence across zones
- sparkle - Random sparkle effect with bright white flashes
- candle - Warm flickering candle effect with orange/red colors
- aurora - Aurora borealis effect with flowing green/blue waves
- disco - Disco strobe effect with bright multi-colored flashes
Animation speed is controlled by a value from 1-10:
1= Slowest animation5= Default speed10= Fastest animation
# Red gaming theme
echo "FF0000" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/all
echo "75" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/brightnessecho "FF0000" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/zone00 # Red
echo "FF8000" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/zone01 # Orange
echo "FFFF00" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/zone02 # Yellow
echo "00FF00" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/zone03 # Greenecho "FFFFFF" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/all
echo "25" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/brightness# Breathing red effect
echo "FF0000" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/all
echo "breathing" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_mode
echo "3" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_speed
# Rainbow wave
echo "rainbow" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_mode
echo "5" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_speed
# Chase effect
echo "00FF00" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/all
echo "chase" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_mode
echo "4" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_speed
# Sparkle effect
echo "FFFFFF" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/all
echo "sparkle" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_mode
echo "2" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_speed
# Aurora effect (uses its own colors)
echo "aurora" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_mode
echo "3" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_speed
# Disco strobe effect
echo "disco" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_mode
echo "6" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_speed
# Candle effect (uses its own warm colors)
echo "candle" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_mode
echo "4" | sudo tee /sys/devices/platform/omen-rgb-keyboard/rgb_zones/animation_speedThe driver intercepts the Omen key press and maps it to KEY_MSDOS, allowing you to bind custom shortcuts to it.
GNOME:
- Open Settings → Keyboard → Keyboard Shortcuts
- Click "+" to add a custom shortcut
- Press the Omen key when prompted
- Assign your desired action
KDE Plasma:
- System Settings → Shortcuts → Custom Shortcuts
- Edit → New → Global Shortcut → Command/URL
- Set the trigger to the Omen key
- Assign your command
i3/Sway: Add to your config file:
bindsym XF86DOS exec your-command-here
If you want to map the Omen key to a different key, edit src/wmi/omen_wmi.c:
static const struct key_entry hp_wmi_keymap[] = {
{ KE_KEY, OMEN_KEY_SCANCODE, { KEY_MSDOS } }, // Change KEY_MSDOS to your preferred key
{ KE_END, 0 }
};After changing, rebuild with sudo make install.
# Check if WMI is supported
sudo dmesg | grep -i wmi
# Check for errors
sudo dmesg | grep -i omen_rgb_keyboard# Verify the module loaded
lsmod | grep omen_rgb_keyboard
# Check sysfs path
ls -la /sys/devices/platform/omen-rgb-keyboard/rgb_zones/- Ensure you're using the correct hex format (6 characters, uppercase)
- Check that brightness is not set to 0
- Verify the module loaded without errors
- Driver Name:
omen-rgb-keyboard - WMI Interface: Uses HP's native WMI commands for maximum compatibility
- Buffer Layout: Matches HP's Windows implementation exactly
- Animation System: CPU-efficient timer-based updates with 20 FPS
- State Persistence: Saves settings to
/var/lib/omen-rgb-keyboard/state - Kernel Compatibility: Linux 5.0+
GPL-3.0
Feel free to submit issues and pull requests.
This driver is provided as-is, use at your own risk. The author is not responsible for any damage to your hardware.