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