Originally submitted as D27908
This adds a linear brightness coefficient to scale the night color gamma curves. Ideally, this type of change shouldn't be necessary and the OLED panel controller would use some form of ACPI interface to implement PWM dimming. However, I'm putting this out there as a proof-of-concept for consideration.
A number of laptop manufacturers have started incorporating OLED displays in their products, but they do not universally honor the usual ACPI brightness control (no backlight in these types of displays). Manufacturers like System 76 have deployed services that listen for these brightness changes and generate scaled gamma curves for XRandR. Even simpler shell scripts have been made to function in a similar manner.
These workarounds have been generally accepted by the community of OLED Linux users, but they all conflict with KWin's gamma and Night Color management. The final gamma curve evaluation should occur in a centralized manner, and KWin would be the best place for Plasma Desktop users.
The solution is to generate a brightness coefficient that evaluates to 1.0 by default and scales with the brightness as managed by powerdevil. A DBus interface allows configuration applets to set a list of output names to "opt-in" a subset of the user's screens. I am working on an experimental branch of KScreen to expose this configuration along with the other per-screen settings.