[Request for Comments] Linux Kernel Support for RGB lighting
So I started a long discussion on the LKML about the current state of RGB support in the Linux kernel: https://lore.kernel.org/all/7228f2c6-fbdd-4e19-b703-103b8535d77d@redhat.com/
The current proposal is that Kernel will not implement full fledged support for HID devices, but leave that up to userspace via hidraw (aka what OpenRGB is already doing).
However, especially in Notebooks, there might be RGB hardware that is not reachable by userspace, e.g. keyboard backlights that are only controlable via WMI. The current leds subsystem + userspace api is lacking here, as it is not at all fit for per-key rgb keyboards or special firmware controled lighting modes.
The proposal for this is currently to create a new subsystem, working title "rgbledstring", with it's own, new userspace api. For this api there are already floating 2 suggestions around (one by me and one by Hans), but Hans brought up to bring it up to the OpenRGB maintainers:
- Do you already have an idea how such an api would optimally look and work?
- What could the kernel do for easy integration in OpenRGB?
- Is there currently anything that is controlled by userspace, but is kinda hacky, and should better be done in kernelspace? (It's long ago I activly followed OpenRGB development, but I remember that in the past some unsafe i2c debug stuff had to be installed to control RGB on ram-sticks)
- One optional part of the proposal is that for some devices already implemented by userspace there might also be a basic, not feature complete, implementation in the kernel to have something work out-of-the box with no userspace software installed. The api would then have a disable-kernelspace-control switch, which msut be invoked by a userspace implementation first before it starts controlling the rgb.
Another question slightly offtopic: Dies OpenRGB have plan to integrate with UPower or does it have an own concept for power saveing control?