Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[display] Add configurable dimming settings. Contributes to JB#31214
Depending on things like linearity of display backlight brightness control
and use of content adaptive backlight algorithms it might happen that
display dimming via reducing backlight level does not produce difference
that is clear enough to human eye.

MCE and lipstick already have logic in place for doing dimming by fading
graphics on the compositor level when backlight level difference between
display on and display dimmed states is too low.

Add low threshold for compositor side dimming and linearly increase the
compositor side dimming when backlight level difference is in between the
low and high thresholds.

Add settings for values used in evaluating dimming backlight level and
compositor side dimming thresholds.

By default use values that match behavior that was previously hard coded:
 * static dimmed backlight level = 3 % of the hw maximum
 * dynamic dimmed backlight level = 50 % of display on brightness
 * low compositor fading threshold = disabled
 * high compositor fading threshold = 10 % of the hw brightness range

Changes to defaults can be made by installing configuration files to
/etc/mce directory and/or while mce is running via mcetool options:

      --set-dimmed-brightness-static=<1...100>
      --set-dimmed-brightness-dynamic=<1...100>
      --set-compositor-dimming-threshold-hi=<0...100>
      --set-compositor-dimming-threshold-lo=<0...100>

The values of the settings persists over mce / device restarts.
  • Loading branch information
spiiroin committed Aug 9, 2015
1 parent 086c367 commit f92d7f5
Show file tree
Hide file tree
Showing 4 changed files with 473 additions and 37 deletions.
20 changes: 20 additions & 0 deletions builtin-gconf.c
Expand Up @@ -1161,6 +1161,26 @@ static const setting_t gconf_defaults[] =
.type = "i",
.def = "5", // Note: Legacy value, migrated at mce startup
},
{
.key = MCE_GCONF_DISPLAY_DIM_STATIC_BRIGHTNESS,
.type = "i",
.def = G_STRINGIFY(DEFAULT_DISPLAY_DIM_STATIC_BRIGHTNESS)
},
{
.key = MCE_GCONF_DISPLAY_DIM_DYNAMIC_BRIGHTNESS,
.type = "i",
.def = G_STRINGIFY(DEFAULT_DISPLAY_DIM_DYNAMIC_BRIGHTNESS)
},
{
.key = MCE_GCONF_DISPLAY_DIM_COMPOSITOR_LO,
.type = "i",
.def = G_STRINGIFY(DEFAULT_DISPLAY_DIM_COMPOSITOR_LO)
},
{
.key = MCE_GCONF_DISPLAY_DIM_COMPOSITOR_HI,
.type = "i",
.def = G_STRINGIFY(DEFAULT_DISPLAY_DIM_COMPOSITOR_HI)
},
{
.key = MCE_GCONF_DISPLAY_DIM_TIMEOUT_LIST,
.type = "ai",
Expand Down

0 comments on commit f92d7f5

Please sign in to comment.