D27908: [colorcorrection] Add linear brightness control for OLED display users

Jack Andersen noreply at phabricator.kde.org
Sat Mar 7 04:33:30 GMT 2020


jackoalan created this revision.
jackoalan added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
jackoalan requested review of this revision.

REVISION SUMMARY
  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 <https://github.com/pop-os/system76-oled/blob/master/src/main.rs> that listen for these brightness changes and generate scaled gamma curves for XRandR. Even simpler shell scripts <https://wiki.archlinux.org/index.php/Alienware_13#OLED_screen_brightness> 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.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D27908

AFFECTED FILES
  colorcorrection/colorcorrect_settings.kcfg
  colorcorrection/colorcorrectdbusinterface.cpp
  colorcorrection/colorcorrectdbusinterface.h
  colorcorrection/manager.cpp
  colorcorrection/manager.h
  org.kde.kwin.ColorCorrect.xml

To: jackoalan, #kwin
Cc: kwin, #kwin, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200307/faa20f01/attachment.html>


More information about the kwin mailing list