Linux Display Brightness/Backlight Interface Is Finally Being Overhauled

Red Hat’s Hans de Goede has been involved in many Linux desktop/laptop hardware improvements over the years for work that otherwise probably wouldn’t have been solved. One of the initiatives he has been focusing on recently that has long been a sore point for Linux laptops has been the userspace backlight/brightness interface. This week at the Linux Plumbers Conference there was a presentation on this effort that was long ripe for improvement.

Hans de Goede worked on resolving the current limitations with the /sys/class/backlight Userspace API and introduce a new, better-designed API. Hans originally talked about the issues with the backlight interface all the way back in 2014 that there can be multiple backlight devices associated with a single display, a value of 0 is undefined meaning for backlight brightness, none way to map backlight sysfs device to given display etc.

To fix the current issues, the plan in the works is to add new “display_brightness” and “display_brightness_max” properties to the DRM connector object. A value of 0 for maximum brightness would now be set because brightness control is not supported.

Those interested in learning more about the work being done to improve Linux backlight brightness control handling for displays can see Hans’ slide deck (PDF) of the LPC 2022. There are also the kernel fixes which he is working on to fix this mess.