]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/vga
/sys/man/*/*: fix perms (sorry)
[plan9front.git] / sys / man / 8 / vga
1 .TH VGA 8
2 .SH NAME
3 vga \- configure a VGA card
4 .SH SYNOPSIS
5 .B aux/vga
6 [
7 .B -BcdilpvV
8 ]
9 [
10 .B -b
11 .I bios-string
12 ]
13 [
14 .B -m
15 .I monitor
16 ]
17 [
18 .B -x
19 .I file
20 ]
21 [
22 .I mode
23 [
24 .I size
25 ]
26 ]
27 .SH DESCRIPTION
28 .I Vga
29 configures a VGA controller for various display sizes and depths.
30 Using the monitor type specified in
31 .B /env/monitor
32 (default
33 .BR vga )
34 and the
35 .I mode
36 given as argument
37 (default
38 .BR 640x480x1 ), 
39 .I vga
40 uses the database of known VGA controllers and monitors in
41 .B /lib/vgadb
42 (see
43 .IR vgadb (6))
44 to configure
45 the display via the devices provided by
46 .IR vga (3).
47 The options are:
48 .TP
49 .BI -b " bios-string"
50 use the VGA database entry corresponding to
51 .I bios-string
52 (e.g. 
53 \fL0xC0045="Stealth 64 DRAM Vers. 2.02"\fR)
54 rather than looking for identifying strings in the BIOS
55 memory.
56 .TP
57 .B -B
58 dump the BIOS memory (in hex) to standard output and exit.
59 .TP
60 .B -c
61 disable the use of the hardware graphics cursor.
62 .TP
63 .B -d
64 include the color palette in whatever actions are performed,
65 usually printing the contents.
66 .TP
67 .B -i
68 when used with
69 .B -p
70 display the register values that will be loaded.
71 .TP
72 .B -l
73 load the desired mode.
74 .TP
75 .BI -m " monitor"
76 override the
77 .B /env/monitor
78 value.
79 .B /env/monitor
80 is usually set by including it in the
81 .B plan9.ini
82 file read by the PC boot program.
83 .TP
84 .B -p
85 print the current or expected register values at appropriate points depending on
86 other options.
87 .TP
88 .B -v
89 print a trace of the functions called.
90 .TP
91 .B -V
92 print a verbose trace of the functions called.
93 .TP
94 .BI -x " file"
95 use 
96 .I file
97 as the VGA database rather than
98 .BR /lib/vgadb .
99 .PP
100 .I Mode
101 is of the form
102 .IB X x Y x Z[,S][,#N]
103 , where
104 .IR X ,
105 .IR Y ,
106 and
107 .I Z
108 are numbers specifying the display height, width, and depth respectively.
109 .I S
110 is scaling mode, either
111 .I scalefull
112 or
113 .IR scaleaspect ;
114 not specifying it disables scaling altogether.
115 .I #N
116 is used to switch to a specific display using its index
117 .IR N .
118 .PP
119 The mode must appear in 
120 .B /lib/vgadb
121 as a value for one of the monitor entries.
122 The usual modes are
123 .BR 640x480x[18] ,
124 .BR 800x600x[18] ,
125 .BR 1024x768x[18][i] ,
126 .BR 1280x1024x[18][i] ,
127 .BR 1376x1024x8 ,
128 and
129 .BR 1600x1200x8 .
130 A trailing
131 .L i
132 indicates interlaced operation.
133 The default mode is
134 .BR 640x480x8 .
135 .I Size
136 is of the form
137 .I X x Y
138 and configures the display to have a virtual
139 screen of the given size.
140 The physical screen will pan to follow the mouse.
141 This is useful on displays with small screens,
142 such as laptops, but can be confusing.
143 .PP
144 Using the monitor name
145 .B vesa
146 instructs
147 .I vga
148 to use VESA BIOS calls to configure the display.
149 Also, if our VGA controller can't be found in
150 .IR vgadb ,
151 .I vga
152 will try the VESA calls.
153 There are no entries for the
154 .B vesa
155 monitor in 
156 .IR vgadb .
157 For a list of available VESA modes and connected displays, use
158 .IP
159 .EX
160 aux/vga -m vesa -p
161 .EE
162 .PP
163 Loading the special mode
164 .BR text :
165 .IP
166 .EX
167 aux/vga -l text
168 .EE
169 .PP
170 switches out of graphics mode back into text mode.
171 It uses the VESA BIOS.
172 .SH EXAMPLES
173 Change the display resolution:
174 .IP
175 .EX
176 aux/vga -l 1600x1200x8
177 .EE
178 .PP
179 Show connected and active displays:
180 .IP
181 .EX
182 aux/vga -m vesa -p | grep dsp
183 .EE
184 .PP
185 Switch to display
186 .I 4
187 and load a specific mode:
188 .IP
189 .EX
190 aux/vga -m vesa -l '1920x1080x16,#4'
191 .EE
192 .PP
193 Print the current VGA controller registers.
194 It is usually best to redirect the output of a
195 .B -p
196 command to a file to prevent confusion caused by using the VGA
197 controller while trying to dump its state:
198 .IP
199 .EX
200 aux/vga -p >/tmp/x
201 .EE
202 .PP
203 Force the VGA controller to a known state:
204 .IP
205 .EX
206 aux/vga -m vga -l
207 .EE
208 .PP
209 Print the current VGA controller state and what would be loaded
210 into it for a new resolution, but don't do the load:
211 .IP
212 .EX
213 aux/vga -ip 1376x1024x8 >/tmp/x
214 .EE
215 .PP
216 .SH FILES
217 .TF /env/monitor
218 .TP
219 .B /env/monitor
220 display type (default
221 .IR vga ).
222 .TP
223 .B /lib/vgadb
224 VGA configuration file.
225 .SH SOURCE
226 .B /sys/src/cmd/aux/vga
227 .SH SEE ALSO
228 .IR vga (3),
229 .IR vgadb (6),
230 .SH BUGS
231 .B Aux/vga
232 makes every effort possible to verify that the mode it is about
233 to load is valid and will bail out with an error message 
234 before setting any registers if it encounters a problem.
235 However, things can go wrong, especially when playing with a
236 new VGA controller or monitor setting.
237 It is useful in such cases to have
238 the above command for setting the controller to a known state
239 at your fingertips.
240 .PP
241 Scaling modes currently work with Intel and NVIDIA video
242 adapters only, using VESA. Intel doesn't support
243 .I scaleaspect
244 mode.
245 .PP
246 Display switching currently works with Intel video adapters
247 only, using VESA.