Skip to content

daemon: Only write DDC brightness after reading and comparing first

Jakob Petsovits requested to merge work/jpetso/frugal-writes into master

Anecdotal evidence suggests that repeated writes to the NVRAM of some monitors will reduce its lifespan. This has recently been confirmed by vdu_controls developer Michael Hamilton: https://github.com/digitaltrails/vdu_controls/blob/master/README.md#does-adjusting-a-vdu-affect-its-lifespan-or-health

One way to reduce NVRAM writes is to avoid writing brightness if the current hardware brightness is already the same as the requested value. This commit implements such a check in DDCutilDisplay.

Some monitors may already have a similar check implemented in firmware, however, others may not. Checking first is the safe thing to do, and mirrors what recent vdu_controls releases have been doing.

Merge request reports

Loading