Hi, I was looking into setting the keyboard backlight brightness automatically with brightnessctl but it doesn’t look like the LED is recognized by Linux. The arch wiki page on the subject says the LED should be available under /sys/class/leds, but I can only see the *lock keys LEDs, this is what I get:
Right now, the keyboard backlight is handled entirely by the embedded controller. It’s not accessible via sysfs, since there is no driver that enumerates LEDs hanging off the EC.
I’ve been (slowly ) working on a driver that exposes the backlight via the LED subsystem and the charge limit via a battery hook. While it works, it’s not really “production-quality” and not ready to be submitted upstream to the kernel.
@DHowett Any chance you could share your general approach even if you can’t share your code? I’m trying to do something similar by modifying a Chromebook keyboard brightness kernel driver, but I think I might be barking up the wrong tree.
I have work staged that will add multicolor LED classdev support for the left/right side lights and the power button light; however, the left/right side lights are not individually controllable on the AMD models, and the power light on the Framework Chromebook doesn’t support colors. I’ve yet to deal with any of that stuff.
Just started looking into this myself for my Framework 13, once I found that framework_tool can set the keyboard backlight in arbitrary percent increments, not just the 3 levels that fn+space gives us. After much poking, it seems like the kernel already has a driver for this, no? Looks like it supports both an ACPI method as well as talking to the ChromeOS EC firmware (which Framework forked for our laptops).
Looks like it does more or less the same thing framework_tool and the driver posted here does when using the EC method, but loading the driver for that is gated behind an OF/device-tree check (which will of course not pass on our laptops).
Curious if it’s possible to get that driver to recognize us as a place where it will work…