|
| 1 | +<html> |
| 2 | + <head> |
| 3 | + <title> |
| 4 | + Apple Cinema Display Brightness Control |
| 5 | + </title></head> |
| 6 | + <body> |
| 7 | + <h3 id="usage">Usage</h3> |
| 8 | + <code>./acdcontrol [--silent|-s] [--brief|-b] [--help|-h] [--about|-a] |
| 9 | + [--detect|-d] [--list-all|-l] |
| 10 | + <hid device(s)> [<brightness>] |
| 11 | + </code><br /> |
| 12 | + <h4>Parameters</h4> |
| 13 | + <dl> |
| 14 | + <dt class="option">--silent,-s</dt> |
| 15 | + <dd> Suppress non-functional program output</dd> |
| 16 | + |
| 17 | + <dt id="opt-brief" class="option">--brief,-b</dt> |
| 18 | + <dd>Print brightness value only when in query mode, |
| 19 | + otherwise ignored. </dd> |
| 20 | + |
| 21 | + <dt class="option">--help,-h</dt> |
| 22 | + <dd>Show short help message and quit.</dd> |
| 23 | + |
| 24 | + <dt class="option">--about,-a</dt> |
| 25 | + <dd>Show information about the program, some credits |
| 26 | + and thanks.</dd> |
| 27 | + |
| 28 | + <dt class="option">--detect,-d</dt> |
| 29 | + <dd>Run program in the detection mode. In this mode |
| 30 | + no writes are performed to device so you can use any |
| 31 | + number of files if you are not sure that your monitor(s) |
| 32 | + are supported.</dd> |
| 33 | + <dt class="option">--list-all,-l</dt> |
| 34 | + <dd>Lists all "officially" supported monitors and quits. |
| 35 | + If you do not see the device, this does not mean that it won't work |
| 36 | + it simply means that I did not tested it on such a device. I'll appreiciate |
| 37 | + if you submit your information in the <a href="http://sourceforge.net/forum/forum.php?thread_id=1215781&forum_id=431570">forum</a> for any display that works</dd> |
| 38 | + |
| 39 | + <dt class="param">hid device</dt> |
| 40 | + <dd>device that represents your Apple Cinema display. It should be one |
| 41 | + of <code class="filename">/dev/usb/hiddev<b>X</b></code> or |
| 42 | + <code class="filename">/dev/hiddev<b>X</b></code>. |
| 43 | + <h4>Note</h4> |
| 44 | + You must have write permissions to this device in order to control |
| 45 | + the display being <em>user</em>, |
| 46 | + not <em>root</em>. If you have no such permissions, you can either grant |
| 47 | + read/write permission to <em>world</em>:<br /> |
| 48 | + <kbd>chmod a+rw /dev/usb/hiddev<b>X</b></kbd><br /> |
| 49 | + or change an ownership:<br /> |
| 50 | + <kbd>chown <<em>your user name</em>>:users /dev/usb/hiddev<b>X</b></kbd><br /> |
| 51 | + under <em>root</em>. Or ask your Linux guru friend to do so ;) |
| 52 | + |
| 53 | + <h4>Note</h4> |
| 54 | + It should be safe to run the program on other device than Apple Cinema/Studio display as |
| 55 | + the program checks whether the device is Apple display and warns about it. |
| 56 | + </dd> |
| 57 | + <dt class="param">brightness</dt> |
| 58 | + <dd>When this option is specified, the operation is <strong>set brightness</strong>, |
| 59 | + otherwise, current brightness is retrieved. If brightness starts with '+' or '-', |
| 60 | + the current brightness is increased or decreased by that value. (<b>Note:</b> You have to place <code>--</code> before the negative value!) <br /> |
| 61 | + Brightness is a parameter ranged [0-255]. <br /> |
| 62 | + Note, that not every value toggles the backlight power; different Apple Display |
| 63 | + models have different granularity. I use Apple Cinema 20" (clear plastic) and I'm |
| 64 | + feeling comfortable with the value of 160. I set 0, however, to see films in the |
| 65 | + darkness. See also: <a href="#opt-brief">--brief</a> |
| 66 | + option and <a href="#limitations">Known Limitations</a> section.</dd> |
| 67 | + </dl> |
| 68 | + |
| 69 | + <h3 id="examples">Examples</h3> |
| 70 | + In the following examples I assume that your HID device is /dev/hiddev0. You may |
| 71 | + have it as /dev/hiddevX or /dev/usb/hiddevX. |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + <dl> |
| 76 | + <dt><code>acdcontrol</code><br /> |
| 77 | + <code>acdcontrol --help</code></dt> |
| 78 | + <dd>Show long help message.</dd> |
| 79 | + |
| 80 | + <dt><code>acdcontrol --detect /dev/hiddev*</code></dt> |
| 81 | + <dd>Perform detection, which HID device is actually your display to be controlled.</dd> |
| 82 | + |
| 83 | + <dt><code>acdcontrol /dev/hiddev0</code></dt> |
| 84 | + <dd>Read current brightness parameter</dd> |
| 85 | + |
| 86 | + <code>acdcontrol /dev/hiddev0 160</code> |
| 87 | + <dd>Set brightness to 160. Note, that brightness setting depends on your model. |
| 88 | + Generally, this parameter may get values in the range [0-255].</dd> |
| 89 | + |
| 90 | + <dt><code>acdcontrol /dev/hiddev0 +10</code></dt> |
| 91 | + <dd>Increment current brightness by 10.</dd> |
| 92 | + |
| 93 | + <dt><code>acdcontrol /dev/hiddev0 -- -10</code></dt> |
| 94 | + <dd>Decrement current brightness by 10. Please,note <code>--</code>!</dd> |
| 95 | + <h3 id="limitations">Known Limitations</h3> |
| 96 | + <ul> |
| 97 | + <li>Currently, the display detection process is not fully automated as you need to specify an |
| 98 | + <abbr TITLE="Human Interface Device">HID</abbr> device(s) file name(s). |
| 99 | + </li> |
| 100 | + <li>First time (after boot up) brightness is retrieved <em>incorrectly</em> (zero value), |
| 101 | + however, after it is set, the return value is correct. It shouldn't concern |
| 102 | + you much as Cinema/Studio Display stores actual brightness settings between |
| 103 | + the sessions. |
| 104 | + </li> |
| 105 | + </ul> |
| 106 | + |
| 107 | + </body> |
| 108 | + |
| 109 | + |
| 110 | +</html> |
0 commit comments