Monitor control by DDC

    What monitors can do DDC , I think, everyone knows. Traditionally, it is used by the X server to determine image parameters, and by admins, using ddcprobe, to study “what the X server did wrong” (ddcprobe shows the modes supported by the monitor according to the monitor itself).

    However, ddc is a two-way protocol. He not only tells the computer what the monitor can do, but also the monitor, what the computer wants from him.

    Windows users of Samsung monitors know their magic tune, which allows you to set the brightness / contrast of the (inconvenient) program. However, there is a more interesting method of working with a monitor: this is the ddccontrol utility.

    Using this utility you can:
    • Change the brightness, contrast, gamma of the image. Moreover, a change in brightness is carried out by changing the brightness of the backlight! (of course, if the monitor physically knows how to do it)
    • Programmatically switch presets (movie / text / user / game); this is much more convenient than poking the corresponding button on the monitor itself
    • Play with the undocumented capabilities of monitors, for example, call languages ​​and settings items blocked from the menu. On my monitor, for example, I managed to move the picture when working on DVI (usually this menu item is available only for VGA)
    • Lock the monitor buttons (I think this is not for all models, but it is definitely possible for the Samsung). All buttons are blocked except on / off, turning the monitor off / on resets this lock.
    • Turn the monitor on and off (completely, without the indicator blinking in standby)


    So, here are some examples of using the utility:


    First, load the desired module: modprobe i2c-dev

    Next, look for monitors. (There can be more than one, right?):ddccontrol -p
    Monitors found:
     - Device: dev: / dev / i2c-1
       Supported DDC / CI: Yes
       Monitor Name: Samsung SyncMaster 215TW (DVI)
       Input Type: Digital
      (Auto select)
     - Device: dev: / dev / i2c-2
       Supported DDC / CI: Yes
       Monitor Name: VESA standard monitor
       Input Type: Digital
    


    You can ignore the "VESA standart monitor", it is a full-fledged monitor that is simply not available in the ddccontrol database (this just means that you have to independently search for the necessary attributes in the registers). I will show all the examples on this “unknown” monitor.

    The main principle of DDC operation is that the monitor has registers (from 0 to 255) with known valid values. The meaning of these registers for each monitor is different, but some common set usually coincides.

    ddccprobe -d dev:/dev/i2c-2- displays all the registers of the monitor with a hint if the monitor is known by ddccprobe.
    (note the dev :) prefix.

    ddccontrol -r 0xdc -w 2 dev:/dev/i2c-2- setting the Internet mode. -r 0xdc - register where to write, -w - command to write and value to write. 0 - user mode, 5 - movie, etc.

    ddccontrol -r 0xf5 -w 1 dev:/dev/i2c-2- menu lock (-w 0 - unlock).

    And now a little undocumented features:

    ddccontrol -r 0xEE -w 55 dev:/dev/i2c-2- image shift
    ddccontrol -r 0xCC -w 0 dev:/dev/i2c-2- enable the language in the menu. 0 - Chinese 1 - Japanese, 2 - English ... 9 - Russian. It is curious, but it is impossible to set Chinese or Japanese through the menu itself ...

    As the comments suggest, turning the monitor off and on:

    ddccontrol dev:/dev/i2c-2 -r 0xe1 -w 0- turn it off
    ddccontrol dev:/dev/i2c-2 -r 0xe1 -w 1- turn it on

    I’ve been thinking about embedding this functionality in a video player for a long time (clicked the fullscreen - the movie turned on), but my hands do not reach ...

    PS This utility also has a muzzle - gddccontrol

    Also popular now: