ddccontrol support for PowerDevil

Review Request #123262 - Created April 5, 2015 and discarded

Kai Uwe Broulik

This allows PowerDevil to use the ddccontrol utility to manipulate brightness of external monitors through Display Data Channel.

It becomes the last link in the fallback chain; it first tries XRandR, then it tries the sysfs helper, and if all that fails it tries to use the ddccontrol utility.

dcccontrol unfortunately doesn't have machine-readable output so I have to take apart its probing output to get the device name and id of the backlight controls. Also it is pretty slow both initializing (kded startup, the helper saves the values and writes directly to the address returned by the initial probing) and setting brightness (that one doesn't block but it can take seconds until your monitor actually changes brightness)

It's working pretty nicely, I can adjust brightness of my desktop monitor through battery monitor and have it automatically dimmed after a timeout.


  • 3
  • 4
  • 1
  • 8
Description From Last Updated
Please do not use "using" inside a header file. That can lead to wierd compiling errors. Lamarque Souza Lamarque Souza
Hmmm I do care about if this worked. People usually complains when changing brightness does not work, see https://bugs.kde.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=CLOSED&component=powermanagement&component=powermanagement-daemon&component=powermanagement-kcm&list_id=1240974&query_format=advanced&short_desc=brightness%20work&short_desc_type=allwordssubstr Lamarque Souza Lamarque Souza
Calling init in the constructor is dangeours since it is performing lots of complex operations that are far from initializing ... Àlex Fiestas Àlex Fiestas
Lamarque Souza
Lamarque Souza
Àlex Fiestas
Àlex Fiestas
Kai Uwe Broulik
Review request changed

Status: Discarded