import NVIDIA-FreeBSD-x86-185.18.36
[nvidia.git] / doc / html / appendix-e.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta name="generator" content=
5 "HTML Tidy for FreeBSD (vers 1 September 2005), see www.w3.org">
6 <meta http-equiv="Content-Type" content=
7 "text/html; charset=us-ascii">
8 <title>Appendix&nbsp;E.&nbsp;Dots Per Inch</title>
9 <meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
10 <link rel="start" href="index.html" title=
11 "NVIDIA Accelerated FreeBSD Graphics Driver README and Installation Guide">
12 <link rel="up" href="part-02.html" title=
13 "Part&nbsp;II.&nbsp;Appendices">
14 <link rel="prev" href="appendix-d.html" title=
15 "Appendix&nbsp;D.&nbsp;GLX Support">
16 <link rel="next" href="appendix-f.html" title=
17 "Appendix&nbsp;F.&nbsp;XvMC Support">
18 </head>
19 <body>
20 <div class="navheader">
21 <table width="100%" summary="Navigation header">
22 <tr>
23 <th colspan="3" align="center">Appendix&nbsp;E.&nbsp;Dots Per
24 Inch</th>
25 </tr>
26 <tr>
27 <td width="20%" align="left"><a accesskey="p" href=
28 "appendix-d.html">Prev</a>&nbsp;</td>
29 <th width="60%" align="center">Part&nbsp;II.&nbsp;Appendices</th>
30 <td width="20%" align="right">&nbsp;<a accesskey="n" href=
31 "appendix-f.html">Next</a></td>
32 </tr>
33 </table>
34 <hr></div>
35 <div class="appendix" lang="en">
36 <div class="titlepage">
37 <div>
38 <div>
39 <h2 class="title"><a name="dpi" id=
40 "dpi"></a>Appendix&nbsp;E.&nbsp;Dots Per Inch</h2>
41 </div>
42 </div>
43 </div>
44 <p>DPI (Dots Per Inch), also known as PPI (Pixels Per Inch), is a
45 property of an X screen that describes the physical size of pixels.
46 Some X applications, such as xterm, can use the DPI of an X screen
47 to determine how large (in pixels) to draw an object in order for
48 that object to be displayed at the desired physical size on the
49 display device.</p>
50 <p>The DPI of an X screen is computed by dividing the size of the X
51 screen in pixels by the size of the X screen in inches:</p>
52 <pre class="screen">
53     DPI = SizeInPixels / SizeInInches
54 </pre>
55 <p>Since the X screen stores its physical size in millimeters
56 rather than inches (1 inch = 25.4 millimeters):</p>
57 <pre class="screen">
58     DPI = (SizeInPixels * 25.4) / SizeInMillimeters
59 </pre>
60 <p>The NVIDIA X driver reports the size of the X screen in pixels
61 and in millimeters. On X.Org 6.9 or newer, when the XRandR
62 extension resizes the X screen in pixels, the NVIDIA X driver
63 computes a new size in millimeters for the X screen, to maintain a
64 constant DPI (see the "Physical Size" column of the `xrandr -q`
65 output as an example). This is done because a changing DPI can
66 cause interaction problems for some applications. To disable this
67 behavior, and instead keep the same millimeter size for the X
68 screen (and therefore have a changing DPI), set the ConstantDPI
69 option to FALSE (see <a href="appendix-b.html" title=
70 "Appendix&nbsp;B.&nbsp;X Config Options">Appendix&nbsp;B, <i>X
71 Config Options</i></a> for details).</p>
72 <p>You can query the DPI of your X screen by running:</p>
73 <pre class="screen">
74     % xdpyinfo | grep -B1 dot
75 </pre>
76 <p>which should generate output like this:</p>
77 <pre class="screen">
78     dimensions:    1280x1024 pixels (382x302 millimeters)
79     resolution:    85x86 dots per inch
80 </pre>
81 <p></p>
82 <p>The NVIDIA X driver performs several steps during X screen
83 initialization to determine the DPI of each X screen:</p>
84 <div class="itemizedlist">
85 <ul type="disc">
86 <li>
87 <p>If the display device provides an EDID, and the EDID contains
88 information about the physical size of the display device, that is
89 used to compute the DPI, along with the size in pixels of the first
90 mode to be used on the display device. If multiple display devices
91 are used by this X screen, then the NVIDIA X screen will choose
92 which display device to use. You can override this with the
93 "UseEdidDpi" X configuration option: you can specify a particular
94 display device to use; e.g.:</p>
95 <pre class="screen">
96     Option "UseEdidDpi" "DFP-1"
97 </pre>
98 <p>or disable EDID-computed DPI by setting this option to
99 false:</p>
100 <pre class="screen">
101     Option "UseEdidDpi" "FALSE"
102 </pre>
103 <p>EDID-based DPI computation is enabled by default when an EDID is
104 available.</p>
105 </li>
106 <li>
107 <p>If the "-dpi" commandline option to the X server is specified,
108 that is used to set the DPI (see `X -h` for details). This will
109 override the "UseEdidDpi" option.</p>
110 </li>
111 <li>
112 <p>If the "DPI" X configuration option is specified (see <a href=
113 "appendix-b.html" title=
114 "Appendix&nbsp;B.&nbsp;X Config Options">Appendix&nbsp;B, <i>X
115 Config Options</i></a> for details), that will be used to set the
116 DPI. This will override the "UseEdidDpi" option.</p>
117 </li>
118 <li>
119 <p>If none of the above are available, then the "DisplaySize" X
120 config file Monitor section information will be used to determine
121 the DPI, if provided; see the xorg.conf or XF86Config man pages for
122 details.</p>
123 </li>
124 <li>
125 <p>If none of the above are available, the DPI defaults to
126 75x75.</p>
127 </li>
128 </ul>
129 </div>
130 <p>You can find how the NVIDIA X driver determined the DPI by
131 looking in your X log file. There will be a line that looks
132 something like the following:</p>
133 <pre class="screen">
134     (--) NVIDIA(0): DPI set to (101, 101); computed from "UseEdidDpi" X config option
135 </pre>
136 <p></p>
137 <p>Note that the physical size of the X screen, as reported through
138 `xdpyinfo` is computed based on the DPI and the size of the X
139 screen in pixels.</p>
140 <p>The DPI of an X screen can be confusing when TwinView is
141 enabled: with TwinView, multiple display devices (possibly with
142 different DPIs) display portions of the same X screen, yet DPI can
143 only be advertised from the X server to the X application with X
144 screen granularity. Solutions for this include:</p>
145 <div class="itemizedlist">
146 <ul type="disc">
147 <li>
148 <p>Use separate X screens, rather than TwinView; see <a href=
149 "chapter-14.html" title=
150 "Chapter&nbsp;14.&nbsp;Configuring Multiple X Screens on One Card">Chapter&nbsp;14,
151 <i>Configuring Multiple X Screens on One Card</i></a> for
152 details.</p>
153 </li>
154 <li>
155 <p>Experiment with different DPI settings to find a DPI that is
156 suitable for both display devices.</p>
157 </li>
158 </ul>
159 </div>
160 </div>
161 <div class="navfooter">
162 <hr>
163 <table width="100%" summary="Navigation footer">
164 <tr>
165 <td width="40%" align="left"><a accesskey="p" href=
166 "appendix-d.html">Prev</a>&nbsp;</td>
167 <td width="20%" align="center"><a accesskey="u" href=
168 "part-02.html">Up</a></td>
169 <td width="40%" align="right">&nbsp;<a accesskey="n" href=
170 "appendix-f.html">Next</a></td>
171 </tr>
172 <tr>
173 <td width="40%" align="left" valign="top">Appendix&nbsp;D.&nbsp;GLX
174 Support&nbsp;</td>
175 <td width="20%" align="center"><a accesskey="h" href=
176 "index.html">Home</a></td>
177 <td width="40%" align="right" valign="top">
178 &nbsp;Appendix&nbsp;F.&nbsp;XvMC Support</td>
179 </tr>
180 </table>
181 </div>
182 </body>
183 </html>