Import from upstream.
[nvidia.git] / x11 / man / nvidia-settings.1
1 .\" Copyright (C) 2006 NVIDIA Corporation.
2 .\" WARNING: THIS FILE IS AUTO-GENERATED!  Edit doc/nvidia-settings.1.m4 instead.
3 .\" Define the .URL macro and then override it with the www.tmac package if it
4 .\" exists.
5 .de URL
6 \\$2 \(la \\$1 \(ra\\$3
7 ..
8 .if \n[.g] .mso www.tmac
9 .TH nvidia\-settings 1 2006-03-17 "nvidia\-settings 1.0"
10 .SH NAME
11 nvidia\-settings \- configure the NVIDIA graphics driver
12 .SH SYNOPSIS
13 .BI "nvidia\-settings [" "options" "]"
14 .br
15 .BI "nvidia\-settings [" "options" "] \-\-no\-config"
16 .br
17 .BI "nvidia\-settings [" "options" "] \-\-load\-config\-only"
18 .br
19 .BI "nvidia\-settings [" "options" "] {\-\-query=" attr " | \-\-assign=" attr = value "} ..."
20 .br
21 .BI "nvidia\-settings [" "options" "] \-\-glxinfo"
22 .PP
23 Options:
24 .BI "[-vh] [\-\-config=" configfile "] [\-c " ctrl-display "]"
25 .br
26 .I "         \fB[\-\-verbose=\fP{\fIerrors \fP|\fI warnings \fP|\fI all\fP}\fB]"
27 .PP
28 .I attr
29 has the form:
30 .ti +5
31 .IB DISPLAY / attribute_name [ display_devices ]
32 .SH DESCRIPTION
33 The
34 .B nvidia\-settings
35 utility is a tool for configuring the NVIDIA graphics driver.
36 It operates by communicating with the NVIDIA X driver, querying and updating state as appropriate.
37 This communication is done with the NV-CONTROL X extension.
38 .PP
39 Values such as brightness and gamma, XVideo attributes, temperature, and OpenGL settings can be queried and configured via
40 .B nvidia\-settings.
41 .PP
42 When
43 .B nvidia\-settings
44 starts, it reads the current settings from its configuration file and sends those settings to the X server.
45 Then, it displays a graphical user interface (GUI) for configuring the current settings.
46 When
47 .B nvidia\-settings
48 exits, it queries the current settings from the X server and saves them to the configuration file.
49 .SH OPTIONS
50 .TP
51 .B \-v, \-\-version
52 Print the
53 .B nvidia\-settings
54 version and exit.
55 .TP
56 .B \-h, \-\-help
57 Print usage information and exit.
58 .TP
59 .BI "\-\-config=" config
60 Use the configuration file
61 .I config
62 rather than the default
63 .I ~/.nvidia\-settings\-rc
64 .TP
65 .BI "\-c, \-\-ctrl\-display=" ctrl-display
66 Control the specified X display.
67 If this option is not given, then
68 .B nvidia\-settings
69 will control the display specifed by
70 .B \-\-display.
71 If that is not given, then the
72 .I $DISPLAY
73 environment variable is used.
74 .TP
75 .B \-n, \-\-no\-config
76 Do not load the configuration file.
77 This mode of operation is useful if
78 .B nvidia\-settings
79 has difficulties starting due to problems with applying settings in the configuration file.
80 .TP
81 .B \-l, \-\-load\-config\-only
82 Load the configuration file, send the values specified therein to the X server, and exit.
83 This mode of operation is useful to place in your .xinitrc file, for example.
84 .TP
85 .B \-r, \-\-rewrite\-config\-file
86 Write the current X server configuration to the configuration file, and exit without starting 
87 a grpahical user interface.See Examples section.
88 .TP
89 .BI "\-V, \-\-verbose=" verbosity
90 Controls how much information is printed.
91 By default, the verbosity is 
92 .B errors
93 and only error messages are printed.
94 .br
95
96 .I verbosity
97 can be one of the following values:
98 .ti +5
99 .B errors
100 - Print errors.
101 .ti +5
102 .B warnings
103 - Print errors and warnings.
104 .ti +5
105 .B all
106 - Print errors, warnings, and other information.
107 .TP
108 .BI "\-a, \-\-assign=" assign
109 The
110 .I assign
111 argument to the
112 .B \-\-assign
113 commandline option is of the form:
114 .nf
115
116         {DISPLAY}/{attribute name}[{display devices}]={value}
117
118 .fi
119 This assigns the attribute {attribute name} to the value {value} on the X Display {DISPLAY}.
120 {DISPLAY} follows the usual {host}:{display}.{screen} syntax of the DISPLAY environment variable and is optional; when it is not specified, then it is implied following the same rule as the
121 .B \-\-ctrl\-display
122 option.
123 If the X screen is not specified, then the assignment is made to all X screens.
124 Note that the '/' is only required when {DISPLAY} is present.
125 .sp
126 .br
127 {DISPLAY} can additionally include a target specification to direct an assignment to something other than an X screen.
128 A target specification is contained within brackets and consists of a target type name, a colon, and the target id.
129 The target type name can be one of
130 .B screen,
131 .B gpu,
132 or
133 .B framelock;
134 the target id is the index into the list of targets (for that target type).
135 The target specification can be used in {DISPLAY} wherever an X screen can be used, following the syntax {host}:{display}[{target_type}:{target_id}].
136 See the output of
137 .nf
138
139         nvidia-settings --query all
140
141 .fi
142 for information on which target types can be used with which attributes.
143 See the output of
144 .nf
145
146         nvidia-settings -q screens -q gpus -q framelocks
147
148 .fi
149 for lists of targets for each target type.
150 .br
151 .sp
152 The [{display devices}] portion is also optional; if it is not specified, then the attribute is assigned to all display devices.
153 .br
154 .sp
155 Some examples:
156 .nf
157
158         -a FSAA=5
159         -a localhost:0.0/DigitalVibrance[CRT-0]=0
160         --assign="SyncToVBlank=1"
161         -a [gpu:0]/DigitalVibrance[DFP-1]=63
162
163 .fi
164 .TP
165 .BI "\-q, \-\-query=" query
166 The
167 .I query
168 argument to the
169 .B \-\-query
170 commandline option is of the form:
171 .nf
172
173         {DISPLAY}/{attribute name}[{display devices}]
174
175 .fi
176 This queries the current value of the attribute {attribute name} on the X Display {DISPLAY}.
177 The syntax is the same as that for the
178 .B \-\-assign
179 option, without
180 .B ={value}.
181 Specify
182 .B \-q screens,
183 .B \-q gpus,
184 or
185 .B \-q framelocks
186 to query a list of X screens, GPUs, or Frame Lock devices, respectively, that are present on the X Display {DISPLAY}.
187 Specify
188 .B \-q all
189 to query all attributes.
190 .TP
191 .B \-g, \-\-glxinfo
192 Print GLX Information for the X display and exit.
193 .SH "USER GUIDE"
194 .SS Contents
195 1.      Layout of the nvidia\-settings GUI
196 .br
197 2.      How OpenGL Interacts with nvidia\-settings
198 .br
199 3.      Loading Settings Automatically
200 .br
201 4.      Commandline Interface
202 .br
203 5.      X Display Names in the Config File
204 .br
205 6.      Connecting to Remote X Servers
206 .br
207 7.      Licensing
208 .br
209 8.      TODO
210 .br
211 .SS 1. Layout of the nvidia\-settings GUI
212 The
213 .B nvidia\-settings
214 GUI is organized with a list of different categories on the left side.
215 Only one entry in the list can be selected at once, and the selected category controls which "page" is displayed on the right side of the
216 .B nvidia\-settings
217 GUI.
218 .PP
219 The category list is organized in a tree: each X screen contains the relevant subcategories beneath it.
220 Similarly, the Display Devices category for a screen contains all the enabled display devices beneath it.
221 Besides each X screen, the other top level category is "nvidia\-settings Configuration", which configures behavior of the
222 .B nvidia\-settings
223 application itself.
224 .PP
225 Along the bottom of the
226 .B nvidia\-settings
227 GUI, from left to right, is:
228 .TP
229 1)
230 a status bar which indicates the most recently altered option;
231 .TP
232 2)
233 a Help button that toggles the display of a help window which provides a detailed explanation of the available options in the current page; and
234 .TP
235 3)
236 a Quit button to exit
237 .B nvidia\-settings.
238 .PP
239 Most options throughout
240 .B nvidia\-settings
241 are applied immediately.
242 Notable exceptions are OpenGL options which are only read by OpenGL when an OpenGL application starts.
243 .PP
244 Details about the options on each page of
245 .B nvidia\-settings
246 are available in the help window.
247 .SS 2. How OpenGL Interacts with nvidia\-settings
248 .PP
249 When an OpenGL application starts, it downloads the current values from the X driver, and then reads the environment (see
250 .I APPENDIX E: OPENGL ENVIRONMENT VARIABLE SETTINGS
251 in the README).
252 Settings from the X server override OpenGL's default values, and settings from the environment override values from the X server.
253 .PP
254 For example, by default OpenGL uses the FSAA setting requested by the application (normally, applications do not request any FSAA).
255 An FSAA setting specified in
256 .B nvidia\-settings
257 would override the OpenGL application's request.
258 Similarly, the
259 .B __GL_FSAA_MODE
260 environment variable will override the application's FSAA setting, as well as any FSAA setting specified in
261 .B nvidia\-settings.
262 .PP
263 Note that an OpenGL application only retrieves settings from the X server when
264 it starts, so if you make a change to an OpenGL value in
265 .B nvidia\-settings,
266 it will only apply to OpenGL applications which are started after that point in time.
267 .SS 3. Loading Settings Automatically
268 The NVIDIA X driver does not preserve values set with
269 .B nvidia\-settings
270 between runs of the X server (or even between logging in and logging out of X, with
271 .BR xdm (1),
272 .B gdm,
273 or
274 .B kdm
275 ).
276 This is intentional, because different users may have different preferences, thus these settings are stored on a per-user basis in a configuration file stored in the user's home directory.
277 .PP
278 The configuration file is named
279 .IR ~/.nvidia\-settings\-rc .
280 You can specify a different configuration file name with the
281 .B \-\-config
282 commandline option.
283 .PP
284 After you have run
285 .B nvidia\-settings
286 once and have generated a configuration file, you can then run:
287 .sp
288 .ti +5
289 nvidia\-settings \-\-load\-config\-only
290 .sp
291 at any time in the future to upload these settings to the X server again.
292 For example, you might place the above command in your
293 .I ~/.xinitrc
294 file so that your settings are applied automatically when you log in to X.
295 .PP
296 Your
297 .I .xinitrc
298 file, which controls what X applications should be started when you log into X (or startx), might look something like this:
299 .nf
300
301      nvidia-settings --load-config-only &
302      xterm &
303      evilwm
304
305 .fi
306 or:
307 .nf
308
309      nvidia-settings --load-config-only &
310      gnome-session
311
312 .fi
313 If you do not already have an
314 .I ~/.xinitrc
315 file, then chances are that
316 .BR xinit (1)
317 is using a system-wide xinitrc file.
318 This system wide file is typically here:
319 .nf
320
321      /etc/X11/xinit/xinitrc
322
323 .fi
324 To use it, but also have
325 .B nvidia\-settings
326 upload your settings, you could create an
327 .I ~/.xinitrc
328 with the contents:
329 .nf
330
331      nvidia-settings --load-config-only &
332      . /etc/X11/xinit/xinitrc
333
334 .fi
335 System administrators may choose to place the
336 .B nvidia\-settings
337 load command directly in the system xinitrc script.
338 .PP
339 Please see the
340 .BR xinit (1)
341 man page for further details of configuring your
342 .I ~/.xinitrc
343 file.
344 .SS 4. Commandline Interface
345 .B nvidia\-settings
346 has a rich commandline interface: all attributes that can be manipulated with the GUI can also be queried and set from the command line.
347 The commandline syntax for querying and assigning attributes matches that of the 
348 .I .nvidia\-settings\-rc
349 configuration file.
350 .PP
351 The
352 .B \-\-query
353 option can be used to query the current value of attributes.
354 This will also report the valid values for the attribute.
355 You can run
356 .B nvidia\-settings \-\-query all
357 for a complete list of available attributes, what the current value is, what values are valid for the attribute, and through which target types (e.g., X screens, GPUs) the attributes can be addressed.
358 Additionally, individual attributes may be specified like this:
359 .nf
360
361         nvidia-settings --query CursorShadow
362
363 .fi
364 Attributes that may differ per display device (for example, DigitalVibrance can be set independently on each display device when in TwinView) can be appended with a "display device name" within brackets; e.g.:
365 .nf
366
367         nvidia-settings --query DigitalVibrance[CRT-0]
368
369 .fi
370 If an attribute is display device specific, but the query does not specify a display device, then the attribute value for all display devices will be queried.
371 .PP
372 An attribute name may be prepended with an X Display name and a forward slash
373 to indicate a different X Display; e.g.:
374 .nf
375
376         nvidia-settings --query localhost:0.0/DigitalVibrance[DFP-1]
377
378 .fi
379 An attribute name may also just be prepended with the screen number and a forward slash:
380 .nf
381
382         nvidia-settings --query 0/DigitalVibrance[DFP-1]
383
384 .fi
385 in which case the default X Display will be used, but you can indicate to which X screen to direct the query (if your X server has multiple X screens).
386 If no X screen is specified, then the attribute value will be queried for all X screens.
387 .PP
388 Attributes can be addressed through "target types".
389 A target type indicates the object that is queried when you query an attribute.
390 The default target type is an X screen, but other possible target types are GPUs and Frame Lock devices.
391 .PP
392 Target types give you different granularities with which to perform queries and assignments.
393 Since X screens can span multiple GPUs (in the case of Xinerama, or SLI), and multiple X screens can exist on the same GPU, it is sometimes useful to address attributes by GPU rather than X screen.
394 .PP
395 A target specification is contained within brackets and consists of a target type name, a colon, and the target id.
396 The target type name can be one of
397 .B screen,
398 .B gpu,
399 or
400 .B framelock;
401 the target id is the index into the list of targets (for that target type).
402 Target specifications can be used wherever an X screen is used in query and assignment commands; the target specification can be used either by itself on the left side of the forward slash, or as part of an X Display name.
403 .PP
404 For example, the following queries address X screen 0 on the localhost:
405 .nf
406
407         nvidia-settings --query 0/VideoRam
408         nvidia-settings --query localhost:0.0/VideoRam
409         nvidia-settings --query [screen:0]/VideoRam
410         nvidia-settings --query localhost:0[screen:0]/VideoRam
411
412 .fi
413 To address GPU 0 instead, you can use either of:
414 .nf
415
416         nvidia-settings --query [gpu:0]/VideoRam
417         nvidia-settings --query localhost:0[gpu:0]/VideoRam
418
419 .fi
420 See the output of
421 .nf
422
423         nvidia-settings --query all
424
425 .fi
426 for what targets types can be used with each attribute.
427 See the output of
428 .nf
429
430         nvidia-settings --query screens --query gpus --query framelocks
431
432 .fi
433 for lists of targets for each target type.
434 .PP
435 The
436 .B \-\-assign
437 option can be used to assign a new value to an attribute.
438 The valid values for an attribute are reported when the attribute is queried.
439 The syntax for
440 .B \-\-assign
441 is the same as
442 .B \-\-query,
443 with the additional requirement that assignments also have an equal sign and the new value.
444 For example:
445 .nf
446
447         nvidia-settings --assign FSAA=2
448         nvidia-settings --assign 0/DigitalVibrance[CRT-1]=9
449         nvidia-settings --assign [gpu:0]/DigitalVibrance=0
450 .fi
451 .PP
452 Multiple queries and assignments may be specified on the commandline for a single invocation of
453 .B nvidia\-settings.
454 .PP
455 If either the
456 .B \-\-query
457 or
458 .B \-\-assign
459 options are passed to
460 .B nvidia\-settings,
461 the GUI will not be presented, and
462 .B nvidia\-settings
463 will exit after processing the assignments and/or queries.
464 .SS 5. X Display Names in the Config File
465 In the Commandline Interface section above, it was noted that you can specify an attribute without any X Display qualifiers, with only an X screen qualifier, or with a full X Display name.
466 For example:
467 .nf
468
469         nvidia-settings --query FSAA
470         nvidia-settings --query 0/FSAA
471         nvidia-settings --query stravinsky.nvidia.com:0/FSAA
472
473 .fi
474 In the first two cases, the default X Display will be used, in the second case, the screen from the default X Display can be overridden, and in the third case, the entire default X Display can be overridden.
475 .PP
476 The same possibilities are available in the
477 .I ~/.nvidia\-settings-rc
478 configuration file.
479 .PP
480 For example, in a computer lab environment, you might log into any of multiple
481 workstations, and your home directory is NFS mounted to each workstation.
482 In such a situation, you might want your
483 .I ~/.nvidia\-settings-rc
484 file to be applicable to all the workstations.
485 Therefore, you would not want your config file to qualify each attribute with an X Display Name.
486 Leave the "Include X Display Names in the Config File" option unchecked on the
487 .B nvidia\-settings
488 Configuration page (this is the default).
489 .PP
490 There may be cases when you do want attributes in the config file to be qualified with the X Display name.
491 If you know what you are doing and want config file attributes to be qualified with an X Display, check the "Include X Display Names in the Config File" option on the
492 .B nvidia\-settings
493 Configuration page.
494 .PP
495 In the typical home user environment where your home directory is local to one computer and you are only configuring one X Display, then it does not matter whether each attribute setting is qualified with an X Display Name.
496 .SS 6. Connecting to Remote X Servers
497 .B nvidia\-settings
498 is an X client, but uses two separate X connections: one to display the GUI, and another to communicate the NV-CONTROL requests.
499 These two X connections do not need to be to the same X server.
500 For example, you might run
501 .B nvidia\-settings
502 on the computer stravinsky.nvidia.com, export the display to the computer bartok.nvidia.com, but be configuring the X server on the computer schoenberg.nvidia.com:
503 .nf
504
505         nvidia-settings --display=bartok.nvidia.com:0 \\
506             --ctrl-display=schoenberg.nvidia.com:0
507
508 .fi
509 If
510 .B \-\-ctrl-display
511 is not specified, then the X Display to control is what
512 .B \-\-display
513 indicates.
514 If
515 .B \-\-display
516 is also not specified, then the
517 .I $DISPLAY
518 environment variable is used.
519 .PP
520 Note, however, that you will need to have X permissions configured such that you can establish an X connection from the computer on which you are running
521 .B nvidia\-settings
522 (stravinsky.nvidia.com) to the computer where you are displaying the GUI (bartok.nvidia.com) and the computer whose X Display you are configuring (schoenberg.nvidia.com).
523 .PP
524 The simplest, most common, and least secure mechanism to do this is to use 'xhost' to allow access from the computer on which you are running
525 .B nvidia\-settings.
526 .nf
527
528         (issued from bartok.nvidia.com)
529         xhost +stravinsky.nvidia.com
530
531         (issued from schoenberg.nvidia.com)
532         xhost +stravinsky.nvidia.com
533
534 .fi
535 This will allow all X clients run on stravinsky.nvidia.com to connect and display on bartok.nvidia.com's X server and configure schoenberg.nvidia.com's X server.
536 .PP
537 Please see the
538 .BR xauth (1)
539 and
540 .BR xhost (1)
541 man pages, or refer to your system documentation on remote X applications and security.
542 You might also Google for terms such as "remote X security" or "remote X Windows", and see documents such as the Remote X Apps mini-HOWTO:
543 .sp
544 .ti +5
545 .URL http://www.tldp.org/HOWTO/Remote-X-Apps.html
546 .sp
547 Please also note that the remote X server to be controlled must be using the NVIDIA X driver.
548 .SS 7. Licensing
549 The source code to
550 .B nvidia\-settings
551 is released as GPL.
552 The most recent official version of the source code is available here:
553 .sp
554 .ti +5
555 .URL ftp://download.nvidia.com/XFree86/nvidia-settings/
556 .sp
557 Note that
558 .B nvidia\-settings
559 is simply an NV-CONTROL client.
560 It uses the NV-CONTROL X extension to communicate with the NVIDIA X server to query current settings and make changes to settings.
561 .PP
562 You can make additions directly to
563 .B nvidia\-settings,
564 or write your own NV-CONTROL client, using
565 .B nvidia\-settings
566 as an example.
567 .PP
568 Documentation on the NV-CONTROL extension and additional sample clients are available in the
569 .B nvidia\-settings
570 source tarball.
571 Patches can be submitted to linux-bugs@nvidia.com.
572 .SS 8. TODO
573 There are many things still to be added to
574 .B nvidia\-settings,
575 some of which include:
576 .TP
577 -
578 configurability of TwinView (NVIDIA is planning to implement this)
579 .TP
580 -
581 configurability of multiple X screens (NVIDIA is planning to implement this)
582 .TP
583 -
584 different toolkits?
585 The GUI for
586 .B nvidia\-settings
587 is cleanly abstracted from the backend of
588 .B nvidia\-settings
589 that parses the configuration file and commandline, communicates with the X server, etc.
590 If someone were so inclined, a different frontend GUI could be implemented.
591 .TP
592 -
593 write a design document explaining how
594 .B nvidia\-settings
595 is architected; presumably this would make it easier for people to become familiar with the code base.
596 .PP
597 If there are other things you would like to see added (or better yet, would like to add yourself), please contact linux-bugs@nvidia.com.
598 .SH FILES
599 .TP
600 .I ~/.nvidia\-settings\-rc
601 .SH EXAMPLES
602 .TP
603 .B nvidia\-settings
604 Starts the
605 .B nvidia\-settings
606 graphical interface.
607 .TP
608 .B nvidia\-settings \-\-load\-config\-only
609 Loads the settings stored in
610 .I ~/.nvidia\-settings\-rc
611 and exits.
612 .TP
613 .B nvidia\-settings \-\-rewrite\-config\-file
614 Writes the current X server configuration to 
615 .I ~/.nvidia\-settings\-rc
616 file and exits.
617 .TP
618 .B nvidia\-settings \-\-query FSAA
619 Query the value of the full-screen antialiasing setting.
620 .TP
621 .B nvidia\-settings \-\-assign RedGamma=2.0 \-\-assign BlueGamma=2.0 \-\-assign GreenGamma=2.0
622 Set the gamma of the screen to 2.0.
623 .SH AUTHOR
624 Aaron Plattner
625 .br
626 NVIDIA Corporation
627 .SH "SEE ALSO"
628 .BR nvidia\-xconfig (1)
629 .SH COPYRIGHT
630 Copyright \(co 2006 NVIDIA Corporation.