<table><tr><td style="">jackoalan created this revision.<br />jackoalan added a reviewer: KWin.<br />Herald added a project: KWin.<br />Herald added a subscriber: kwin.<br />jackoalan requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D27908">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>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.</p>
<p>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). <a href="https://github.com/pop-os/system76-oled/blob/master/src/main.rs" class="remarkup-link" target="_blank" rel="noreferrer">Manufacturers like System 76 have deployed services</a> that listen for these brightness changes and generate scaled gamma curves for XRandR. <a href="https://wiki.archlinux.org/index.php/Alienware_13#OLED_screen_brightness" class="remarkup-link" target="_blank" rel="noreferrer">Even simpler shell scripts</a> have been made to function in a similar manner.</p>
<p>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.</p>
<p>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.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27908">https://phabricator.kde.org/D27908</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>colorcorrection/colorcorrect_settings.kcfg<br />
colorcorrection/colorcorrectdbusinterface.cpp<br />
colorcorrection/colorcorrectdbusinterface.h<br />
colorcorrection/manager.cpp<br />
colorcorrection/manager.h<br />
org.kde.kwin.ColorCorrect.xml</div></div></div><br /><div><strong>To: </strong>jackoalan, KWin<br /><strong>Cc: </strong>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<br /></div>