Command line tool

The command line tool is useful for debugging purpose, and to create automatic scripts.

Note

We won't present everything you can do with ddccontrol, if you want more information, type:

# ddccontrol -h

Usage example

This example explains how to list all available controls and then change the brightness parameter.

List available controls

To list available controls, type:

# ddccontrol -p

This probes for available monitors, then takes the first probed monitor and lists controls supported by it. This should give you an output like this (this example uses a Samsung Syncmaster 173P and a nVidia GeForce FX 5700):

ddccontrol version 0.1
Copyright 2004 Oleg I. Vdovikin (oleg-at-cs.msu.su)
Copyright 2004 Nicolas Boichat (nicolas-at-boichat.ch)
This program comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of this program under the terms of the GNU General Public License.

Device : pci:01:00.0-0
Error while reading write message answer: Bad message
Reading EDID 0x50 failed.
Device : pci:01:00.0-1
Device : pci:01:00.0-2
Detected monitors :
 - Device : pci:01:00.0-1
   DDC/CI supported : Yes
   Monitor Name : Samsung SyncMaster 173P (DVI)
   Input type : Digital
  (Automatically selected)
 - Device : pci:01:00.0-2
   DDC/CI supported : Yes
   Monitor Name : NEC Multisync 2080UX+
   Input type : Analog
Reading EDID and initializing DDC/CI at bus pci:01:00.0-1...
Device : pci:01:00.0-1

EDID readings:
   Plug and Play ID: SAM00E2 [Samsung SyncMaster 173P (DVI)]
   Input type: Digital

= Samsung SyncMaster 173P (DVI)
> Color settings
   > Brightness and Contrast
      > id=brightness, name=Brightness, address=0x10, delay=-1ms, type=0
        supported, value=55, maximum=100
      > id=contrast, name=Contrast, address=0x12, delay=-1ms, type=0
        supported, value=60, maximum=100
      > id=magicbright, name=Magic Bright Mode, address=0xdc, delay=-1ms, type=2
        Possible values:
         > id=text - name=Text, value=1
         > id=internet - name=Internet, value=2
         > id=entertain - name=Entertain, value=3
         > id=custom - name=Custom, value=4
        supported, value=4, maximum=4
> Others
   > Restore defaults
      > id=defaults, name=Restore Factory Defaults, address=0x4, delay=-1ms, type=1
        Possible values:
         > id=default - name=Restore Factory Defaults, value=1
        supported, value=0, maximum=1
      > id=defaultluma, name=Restore Brightness and Contrast, address=0x5, delay=-1ms, type=1
        Possible values:
         > id=default - name=Restore Brightness and Contrast, value=1
        supported, value=0, maximum=1
      > id=settings, name=Settings, address=0xb0, delay=-1ms, type=1
        Possible values:
         > id=store - name=Save Current Settings, value=1
         > id=restorefactory - name=Restore Factory Settings, value=2
        supported, value=0, maximum=2
   > Input settings
      > id=inputsource, name=Input Source Select, address=0x60, delay=-1ms, type=2
        Possible values:
         > id=analog - name=Analog, value=1
         > id=digital - name=Digital, value=3
        supported, value=3, maximum=3
   > Power control
      > id=dpms, name=DPMS Control, address=0xd6, delay=-1ms, type=2
        Possible values:
         > id=on - name=On, value=1
         > id=standby - name=Standby, value=4
        supported, value=1, maximum=4

Change the brightness

The lines concerning brightness in the available controls list are:

      > id=brightness, name=Brightness, address=0x10, delay=-1ms, type=0
        supported, value=55, maximum=100

The important elements are address (here: 0x10), current value (55) and maximum value (100).

To change the brightness value to 70/100, type:

ddccontrol -p -r 0x10 -w 70
The last lines of the output should be:
Writing 0x10, 0x46(70)...
Control 0x10: +/70/100 [Brightness]

SourceForge.net Logo