Please note, that development has moved to SourceForge.
The goal of this page is to get Linux (*nix) users an ability to control their DDC/CI monitors from within operating system command line/gui interface. At the time of writing (2004-07-25) Samsung has produced number of monitors which does not contain any buttons on their face to adjust their parameters. The only way available for this is using MagicTune program, which is available for Windows platforms as free download at Samsung site. According to Google search Samsung as well as NEC/Mitsibishi use DDC/CI interface for controlling their monitors. So I guess, that the things I've observed is the DDC/CI communications using the I2C bus. In fact VESA offer DDC/CI protocol specification on it's page, but I don't have an access to them, so I can't fully verify the correctness of job was done. The data was just sniffed from the I2C DDC bus. On the other hand there is indirect references available: USB Monitor Control Class 1.0 specification for control codes and ACCESS.bus (tm) Specifications Version 3.0
There is no complete solution yet, the effort was made to made minimal application which can be used for testing. But at the moment of writing it features quering monitor capabilities and controls available using DDC/CI interface. Use it's on your own risk. I'm personally own Samsung SyncMaster 173T TFT monitor and has performed testing using it. Nicolas Boichat was kind enough to test it with Mitsubishi Diamond Pro 2060u CRT monitor. I've no information for other monitor types yet, but as seems it should work for modern Samsung TFTs and NEC/Mitsubishi displays.
This program is distributed under a GNU GPL.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
DDC/CI device seems is a client at I2C bus address 0x37 (0x6e for write transactions, 0x6f for read). 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.
My Samsung SM173T only offers DDC/CI on VGA interface, but does not on DVI. But it can adjust it settings in DVI mode via VGA interface (I've a dual head ATI Radeon 9200 card, both cables are connected to it).
At the moment this program needs I2C bus support in your kernel and I2C capable video card. I've used ATI Radeon 9200 card and the exact sequence to load appropriate modules was following:
modprobe i2c-dev && modprobe radeonfb
Your millage may vary, and probably radeonfb does not support your card (it does not if it's not ATI Radeon based). If so, try googling around looking for I2C support for your card. Some of the cards are supported by lm_sensors package, some by framebuffer modules.According to Nicolas page he has successfully used rivafb with Nvidia card.
Once loaded it's a good idea to scan I2C busses using i2cdetect program (launch it with no args to see the list of I2C busses). Your monitor should answer at least at address 0x50 (EDID reading) and 0x37 (DDC/CI). The 0x37 is mandatory for runnig program. If it does not answer - try other busses as well. My Radeon exposes 4 busses - crt, vga, dvi and monid. It's therefore answers at 0xa0 at vga and dvi (as expected) and at 0x37 at vga bus only. So, I've used it for testing.
Once done, you can try using program by typing something like this (this will query monitor capabilities and ):
ddcci-tool /dev/i2c-2 -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 - congrutulations, 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-2 -r 0x10This 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
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.
|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|
|0x14||Select Color Preset||ACCESS.bus|
|0x16||Red Video Gain||Both|
|0x18||Green Video Gain||Both|
|0x1a||Blue Video Gain||Both|
|0x1e||SAM: Auto Size Center||Sniffed|
|0x26||Horizontal Pincushion Balance||Both|
|0x2c||Horizontal Linearity Balance||Both|
|0x36||Vertical Pincushion Balance||Both|
|0x3c||Vertical Linearity Balance||Both|
|0x3e||SAM: Image Lock Fine||Sniffed|
|0x46||Top Corner Distortion Control||Both|
|0x48||Top Corner Distortion Balance||Both|
|0x4a||Bottom Corner Distortion Control||Both|
|0x4c||Bottom Corner Distortion Balance||Both|
|0x54||Color Curve Adjust||ACCESS.bus|
|0x5a||Auto Size Center Enable/Disable||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|
|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|
|0xca||On Screen Display||USB|
|0xcc||SAM: On Screen Display Language||Sniffed|
|0xd6||SAM: DPMS control||Sniffed (1 - on/4 - stby)|
|0xdc||SAM: MagicBright||Sniffed (1 - text/2 - internet/3 - entertain/4 - custom)|
|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|
(2004-08-18) ddcci-tool-0.03 sources.
(2004-08-23) ddcci-tool-0.04 sources and binary compiled at Fedora Core 2 x86 box. I'm recommending you to recompiling program on your own. In this version ddcci delay code was updated to improve stability.
If you found this program useful send your report to oleg at dot cs dot msu dot su
I'm interested in running program in this way: "ddcci-tool /dev/i2c-x -e -c -d". This should produce output containing your monitor EDID, caps and registers. Try running with different input sources. Ananlyze the output according to register names.
The good idea is to write kernel module (lm_sensors style) which will provide all necessary functionality for upper layers. Treat this application as a proof of concept.