framework-laptop-kmod icon indicating copy to clipboard operation
framework-laptop-kmod copied to clipboard

Framework 16 keyboard and power button LED brightness

Open xeniarose opened this issue 7 months ago • 0 comments

Keyboard LED

The Framework 16 uses an input modules system, and the stock keyboards run QMK, with the VIA HID protocol enabled. This means the brightness can be controlled using eg qmk_hid. Currently, framework-laptop-kmod will expose a keyboard backlight LED in the kernel that is fully nonfunctional on framework 16 (because the EC doesn't control it). I think that either the node should not be created at all when the hardware is detected to be framework 16, or the implementation should attempt to use the HID protocol for controlling the brightness. Some issues with this are

  1. The keyboard module is not guaranteed to be running the stock firmware. Custom firmware could mean the HID interface is not available
  2. If the kernel binds the HID interface, it might interfere with userspace. The interface is primarily designed to be used with the VIA web configuration tool, and I'm not sure there's precedent for pulling that into kernel space. My personal opinion is that it would be good though

Power/fingerprint button LED

Framework 16 also allows control of the power button LED via the EC. this is exposed in framework_tool --fp-brightness. Adding an LED node for this when it is present would be nice to have.

xeniarose avatar Jul 04 '24 08:07 xeniarose