wayland: add support for controlling brightness devices exposed by powerdevil
This way, KWin can set the brightness on internal panels or external monitors with DDC/CI support, without being exposed to the mess that is actually setting the brightness that way.
Depends on libraries/plasma-wayland-protocols!78 (merged). Together with libkscreen!186 (merged) and powerdevil!374 (merged), the brightness slider still works, just as it does with everything on master, but it's routed through KWin.
With this and the other mentioned MRs,
- powerdevil uses the output management protocol to set an opaque 0-100% brightness setting per screen that KWin advertises brightness controls for
- powerdevil exposes the real underlying brightness devices (of internal panels with sysfs and external monitors with ddc/ci) for exclusively KWin to control. It doesn't do anything with the devices by itself
- for SDR mode, KWin sets the underlying brightness device of a given output to the appropriate value - which might be the opaque settings value, or something else (auto brightness, backlight control for HDR, whatever we come up with)
- for HDR mode, KWin sets the underlying brightness device to 100% (just in case it actually does something) and controls the actual brightness level in compositing
- for SDR mode when no brightness device is available, KWin also controls the actual brightness level in compositing. This is needed for some OLED displays (BUG: 413451)
closes #156 (closed), #206 (closed)
Edited by Xaver Hugl