Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

linux-keyboard-rgb

Linux RGB keyboard backlight control utility. Currently supports Mechlands Vibe 75 V2.

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

LinuxRGB

LinuxRGB is a small Lazarus/FPC GUI utility for controlling the RGB backlight of the Mechlands Vibe 75 V2 keyboard under Linux.

It talks to the keyboard through the Linux hidraw interface and sends HID Feature Reports directly to the device — on stock firmware, with no QMK flashing required.

Existing solutions (OpenRGB / SonixQMK) support this keyboard only after reflashing it with QMK. LinuxRGB works with the original factory firmware, so there is no risk of bricking the keyboard.

Status

Experimental working prototype.

Tested on:

  • Mechlands Vibe 75 V2
  • USB device ID: 05AC:024F
  • USB interface: 3 (:1.3 in the sysfs path)
  • Linux hidraw

Other keyboards are not supported yet.

Features

  • Set a static RGB color
  • RGB input fields: R, G, B
  • Manual /dev/hidrawX device path input
  • Direct HID Feature Report communication through hidraw
  • Debug output of the sent packets in the application log

Running

You do not need Lazarus to run the program — only the compiled binary (available in Releases) and access to the keyboard's hidraw device.

Quick install

Put install.sh, the linuxrgb binary and linuxrgb.png in the same folder, then run:

bash
chmod +x install.sh
./install.sh

The script will:

  • make the binary executable,
  • install a udev rule so the keyboard is accessible without sudo (asks for your password once),
  • create a menu shortcut with an icon.

After that, launch LinuxRGB from your application menu.

Manual udev rule (optional)

If you prefer to set it up yourself instead of using the script:

bash
echo 'KERNEL=="hidraw*", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="024f", MODE="0666"' | sudo tee /etc/udev/rules.d/99-vibe75.rules
sudo udevadm control --reload
sudo udevadm trigger

Without this rule (or without sudo), the program cannot open the device and will report Wrong path.

Finding the correct hidraw device

The application needs the correct /dev/hidrawX path for interface 3.

List all hidraw nodes that belong to the keyboard:

bash
ls -l /sys/class/hidraw/*/device | grep -i 024F

The keyboard exposes several nodes with the same 05AC:024F ID. To find the right one, check the full path of each and pick the one containing :1.3:

bash
readlink -f /sys/class/hidraw/hidrawN/device

The node whose path ends in ...:1.3/... is interface 3 — enter its /dev/hidrawN into the Path field of the application.

Building from source

Requirements:

  • Lazarus / Free Pascal (with the BaseUnix unit, standard on Linux)

Open linuxrgb.lpi in Lazarus and build the project.

How it works

Controlling the color requires a fixed sequence of seven 64-byte HID Feature Reports sent in order, with short pauses in between. The protocol was reconstructed from a USB capture of the official Windows software:

Packet Bytes
1 04 02
2 04 18
3 04 13 ... 01 (byte at index 9)
4 01 R G B ... 05 03 ... AA 55 (color)
5 04 02
6 04 F0
7 04 F5 ... 09 (byte at index 9)

Byte 0 of each buffer is the report ID (0), so all bytes shift by +1 relative to the raw capture.

Roadmap

This started as a learning project, but it may grow over time. Possible future directions:

  • Support for more keyboards (each needs its own protocol, reconstructed from a USB capture)
  • Automatic device detection by VID/PID instead of manual path entry
  • Lighting effects (rainbow, breathing, reactive) in addition to static color
  • Cleaner separation between the generic hidraw engine and per-keyboard profiles

No promises on timing — contributions and captures from other keyboards are welcome.

License

Released under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.

Any derivative work must also remain free software under GPLv3.

Disclaimer

This is an independent, unofficial project. It is not affiliated with or endorsed by Mechlands.

A note from the author

I originally built this just for myself, since there was no Linux software for this keyboard on stock firmware. I decided to publish it in case it helps someone else. If anyone picks it up, improves it, or adds support for more keyboards — I'd only be glad.