What monitors can do
DDC , I think everyone knows. Traditionally, it is used by the X server to define image parameters, and by admins using ddcprobe to study "what the X server did wrong" (ddcprobe shows the monitor supported modes 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 the monitor: this is the ddccontrol utility.
')
C using this utility, you can:
- Change the brightness, contrast, gamma of the image. Moreover, the brightness change by changing the brightness of the backlight! (of course, if the monitor is physically able to do it)
- Programmatically switch presets (movie / text / user / game); it is much more convenient than poking the corresponding button on the monitor itself
- Play with the undocumented features of monitors, for example, call blocked languages ​​and settings items 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 for Samsung it is definitely possible). All buttons are locked except for on / off, turning off / on the monitor this lock resets.
- Turn the monitor on and off (completely, without the lamp blinking in standby)
So, here are some examples of using the utility:
First,
modprobe i2c-dev
required module:
modprobe i2c-dev
Next, we are looking for monitors. (There may be more than one thing, right?):
ddccontrol -p
Found monitors:
- Device: dev: / dev / i2c-1
DDC / CI supported: Yes
Monitor Name: Samsung SyncMaster 215TW (DVI)
Input Type: Digital
(Automatic selection)
- Device: dev: / dev / i2c-2
DDC / CI supported: Yes
Monitor Name: VESA standard monitor
Input Type: Digital
You can ignore VESA standart monitor, this is a full-fledged monitor, which is simply not available in the ddccontrol database (this means only that you have to independently search for the necessary attributes in the registers). I will show all the examples on this, “unknown” monitor.
The basic principle of operation for DDC 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 a certain common set usually coincides.
ddccprobe -d dev:/dev/i2c-2
- displays all monitor registers with a hint if the monitor is known to ddccprobe.
(note dev prefix :).
ddccontrol -r 0xdc -w 2 dev:/dev/i2c-2
— set the Internet mode. -r 0xdc is the register where to write, -w is the command to write and the value to write. 0 - user mode, 5 - movie, etc.
ddccontrol -r 0xf5 -w 1 dev:/dev/i2c-2
- locks the menu (-w 0 - unlocks).
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 language in the menu. 0 - Chinese 1 - Japanese, 2 - English ... 9 - Russian. Curiously, it’s impossible to set Chinese or Japanese through the menu itself ...
As suggested in the comments, turning the monitor off and on:
ddccontrol dev:/dev/i2c-2 -r 0xe1 -w 0
- turn off
ddccontrol dev:/dev/i2c-2 -r 0xe1 -w 1
— enable
I have been thinking about embedding this functionality in a video player for a long time (I pressed fullscreen - the movie turned on), but my hands do not reach ...
PS This utility has a gooey snout - gddccontrol