Linux DDC/CI Tool page
DDC/CI device is a client at I2C bus address 0x37. Data being sent/received is formatted in frame, each frame has a fixed prefix byte, followed by length of the payload, payload itself and checksum made of XORing submitted/received I2C message. The initial XOR value depends on operation attempted, it's equal to I2C address submitted on the wire and seems to be fixed value for read transaction. For details see ddcci-tool sources.
Usage
ddcci-tool /dev/i2c-X -e -c -d
This should produce output like this:
ddcci-tool version 0.03
Reading EDID : 0x50@/dev/i2c-2 Plug and Play ID: SAM00BA Input type: Analog
Using ddc/ci : 0x37@/dev/i2c-2
Capabilities: (type(LCD)vcp(04 05 10 12 60(1 3) B0(1 2) B6 C6 C8 C9 D6(1 4) DC(1 2 3 4) DF))
- Controls (valid/current/max):
- Control 0x04: +/0/1 [Reset Factory Defaults]
- Control 0x05: +/0/1 [SAM: Reset Brightness and Contrast]
- Control 0x06: +/0/1 [Reset Factory Geometry]
- Control 0x08: +/0/1 [Reset Factory Default Color]
- Control 0x0e: +/60/120 [SAM: Image Lock Coarse]
- Control 0x10: +/0/100 [Brightness]
- Control 0x12: +/50/100 [Contrast]
- Control 0x16: +/8/16 [Red Video Gain]
- Control 0x18: +/8/16 [Green Video Gain]
- Control 0x1a: +/8/16 [Blue Video Gain]
- Control 0x1e: +/0/2 [SAM: Auto Size Center]
- Control 0x20: +/50/100 [Horizontal Position]
- Control 0x30: +/25/54 [Vertical Position]
- Control 0x3e: +/39/50 [SAM: Image Lock Fine]
- Control 0x60: +/1/3 [Input Source Select]
- Control 0x62: +/0/100 [Audio Speaker Volume Adjust]
- Control 0x6c: +/140/255 [Red Video Black Level]
- Control 0x6e: +/127/255 [Green Video Black Level]
- Control 0x70: +/121/255 [Blue Video Black Level]
- Control 0xb0: +/0/2 [Settings]
- Control 0xb6: +/3/8 [???]
- Control 0xc6: +/1/1 [???]
- Control 0xc8: +/5/16 [???]
- Control 0xc9: +/1/0 [???]
- Control 0xca: +/2/2 [On Screen Display]
- Control 0xcc: +/2/11 [SAM: On Screen Display Language]
- Control 0xd6: +/1/4 [SAM: DPMS control (1 - on/4 - stby)]
- Control 0xdc: +/4/4 [SAM: MagicBright (1 - text/2 - internet/3 - entertain/4 - custom)]
- Control 0xdf: +/512/0 [VCP Version]
- Control 0xe0: +/0/2 [SAM: Color preset (0 - normal/1 - warm/2 - cool)]
- Control 0xe1: +/1/1 [SAM: Power control (0 - off/1 - on)]
- Control 0xe2: +/0/1 [???]
- Control 0xed: +/108/255 [SAM: Red Video Black Level]
- Control 0xee: +/101/255 [SAM: Green Video Black Level]
- Control 0xef: +/103/255 [SAM: Blue Video Black Level]
If you got this - congratulations, if not, try digging inside it. If it hangs - press Ctrl+C. At the moment I do not accept anything other than patches. ;-) The output is not decoded at the moment, but the meaning as follows - vcp section contains list of controls which can be adjusted. Some controls are descrete, i.e. they can be one of the value specified in the list which follows them. See Controls section below for decoding numbers. The caps string are depends on the mode in which monitor is being used at the time of running. I.e. the the output was produced, when I've switched my SM173T to digital (DVI) input, while analog (VGA) mode produces the following:
(type(LCD)vcp(04 05 06 08 0E 10 12 16 18 1A 1E 20 30 3E 60(1 3) B0(1 2) B6 C6 C8 C9 D6(1 4) DC(1 2 3 4) DF E0(0 1 2)))
(line brake inserted for readability).
Another program options are -d for querying all available controls (which includes also "hidden" controls), -r for reading specific control, -w for writing it. For example to query current brightness execute this command:
ddcci-tool /dev/i2c-X -r 0x10
This should produce output like this:
Reading 0x10(Brightness) Control 0x10: +/0/100 [Brightness]
The meaning is following - control number, validity (+ sign), current value, maximum value and symbolic name. To set brightness to 50 type this:
ddcci-tool /dev/i2c-2 -r 0x10 -w 50
Launch ddcci-tool with no args to see available options. At the moment of writing they're as follows
- ddcci-tool [-a adr] [-e] [-d] [-c] [-f] [-v] [-s] [-S] [-r ctrl] [-w value] dev dev: device, e.g. /dev/i2c-0 adr: base address of ddc/ci, eg 0x37 (def)
- -e : query EDID at 0x50 queries monitor EDID, which should be accessible at I2C address 0x50
- -c : query capability queries DDC/CI capabilities string
- -d : query ctrls 0 - 255 dumps controls 0-255, checking validity byte, use -f to override
- -r : query ctrl specifies control index to read or write (-w)
- -w : value to write to ctrl value for control to be writen for index specified with -r
- -f : force (avoid validity checks) avoid validity check
- -s : save settings Sends DDC/CI command to save adjustments made by -w
- -v : verbosity (specify more to increase) try -v and -vv (low level send/recv) for greater effect
- -S : send Samsung DDC/CI enable seems some of the Samsung monitors requires this for operating
SM173T Controls
At the moment program show symbolic control names according to Samsung SyncMaster 173T functionality and info gathered from USB & ACCESS.bus specs, so they could be incorrect for your monitor.
- Control Symbolic name Comments
- 0x00 Degauss ACCESS.bus
- 0x01 Degauss USB
- 0x02 Secondary Degauss ACCESS.bus
- 0x04 Reset Factory Defaults Both
- 0x05 SAM: Reset Brightness and Contrast Sniffed
- 0x06 Reset Factory Geometry Both
- 0x08 Reset Factory Default Color ACCESS.bus
- 0x0a Reset Factory Default Position ACCESS.bus
- 0x0c Reset Factory Default Size ACCESS.bus
- 0x0e SAM: Image Lock Coarse Sniffed
- 0x10 Brightness Both
- 0x12 Contrast Both
- 0x14 Select Color Preset ACCESS.bus
- 0x16 Red Video Gain Both
- 0x18 Green Video Gain Both
- 0x1a Blue Video Gain Both
- 0x1c Focus ACCESS.bus
- 0x1e SAM: Auto Size Center Sniffed
- 0x20 Horizontal Position Both
- 0x22 Horizontal Size Both
- 0x24 Horizontal Pincushion Both
- 0x26 Horizontal Pincushion Balance Both
- 0x28 Horizontal Misconvergence Both
- 0x2a Horizontal Linearity Both
- 0x2c Horizontal Linearity Balance Both
- 0x30 Vertical Position Both
- 0x32 Vertical Size Both
- 0x34 Vertical Pincushion Both
- 0x36 Vertical Pincushion Balance Both
- 0x38 Vertical Misconvergence Both
- 0x3a Vertical Linearity Both
- 0x3c Vertical Linearity Balance Both
- 0x3e SAM: Image Lock Fine Sniffed
- 0x40 Parallelogram Distortion Both
- 0x42 Trapezoidal Distortion Both
- 0x44 Tilt (Rotation) Both
- 0x46 Top Corner Distortion Control Both
- 0x48 Top Corner Distortion Balance Both
- 0x4a Bottom Corner Distortion Control Both
- 0x4c Bottom Corner Distortion Balance Both
- 0x50 Hue ACCESS.bus
- 0x52 Saturation ACCESS.bus
- 0x54 Color Curve Adjust ACCESS.bus
- 0x56 Horizontal Moire Both
- 0x58 Vertical Moire Both
- 0x5a Auto Size Center Enable/Disable ACCESS.bus
- 0x5c Landing Adjust ACCESS.bus
- 0x5e Input Level Select ACCESS.bus
- 0x60 Input Source Select Both
- 0x62 Audio Speaker Volume Adjust ACCESS.bus
- 0x64 Audio Microphone Volume Adjust ACCESS.bus
- 0x66 On Screen Display Enable/Disable ACCESS.bus
- 0x68 Language Select ACCESS.bus
- 0x6c Red Video Black Level Both
- 0x6e Green Video Black Level Both
- 0x70 Blue Video Black Level Both
- 0xa2 Auto Size Center USB
- 0xa4 Polarity Horizontal Synchronization USB
- 0xa6 Polarity Vertical Synchronization USB
- 0xa8 Synchronization Type USB
- 0xaa Screen Orientation USB
- 0xac Horizontal Frequency USB
- 0xae Vertical Frequency USB
- 0xb0 Settings Both
- 0xca On Screen Display USB
- 0xcc SAM: On Screen Display Language Sniffed
- 0xd4 Stereo Mode USB
- 0xd6 SAM: DPMS control Sniffed (1 - on/4 - stby)
- 0xdc SAM: MagicBright Sniffed (1 - text/2 - internet/3 - entertain/4 - custom)
- 0xdf VCP Version
- 0xe0 SAM: Color preset Sniffed (0 - normal/1 - warm/2 - cool)
- 0xe1 SAM: Power control Sniffed (0 - off/1 - on)
- 0xed SAM: Red Video Black Level Sniffed
- 0xee SAM: Green Video Black Level Sniffed
- 0xef SAM: Blue Video Black Level Sniffed
- 0xf5 SAM: VCP Enable Sniffed