1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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 E. 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 II. Appendices">
14 <link rel="prev" href="appendix-d.html" title=
15 "Appendix D. GLX Support">
16 <link rel="next" href="appendix-f.html" title=
17 "Appendix F. XvMC Support">
20 <div class="navheader">
21 <table width="100%" summary="Navigation header">
23 <th colspan="3" align="center">Appendix E. Dots Per
27 <td width="20%" align="left"><a accesskey="p" href=
28 "appendix-d.html">Prev</a> </td>
29 <th width="60%" align="center">Part II. Appendices</th>
30 <td width="20%" align="right"> <a accesskey="n" href=
31 "appendix-f.html">Next</a></td>
35 <div class="appendix" lang="en">
36 <div class="titlepage">
39 <h2 class="title"><a name="dpi" id=
40 "dpi"></a>Appendix E. Dots Per Inch</h2>
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
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>
53 DPI = SizeInPixels / SizeInInches
55 <p>Since the X screen stores its physical size in millimeters
56 rather than inches (1 inch = 25.4 millimeters):</p>
58 DPI = (SizeInPixels * 25.4) / SizeInMillimeters
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 B. X Config Options">Appendix 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>
74 % xdpyinfo | grep -B1 dot
76 <p>which should generate output like this:</p>
78 dimensions: 1280x1024 pixels (382x302 millimeters)
79 resolution: 85x86 dots per inch
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">
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>
96 Option "UseEdidDpi" "DFP-1"
98 <p>or disable EDID-computed DPI by setting this option to
101 Option "UseEdidDpi" "FALSE"
103 <p>EDID-based DPI computation is enabled by default when an EDID is
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>
112 <p>If the "DPI" X configuration option is specified (see <a href=
113 "appendix-b.html" title=
114 "Appendix B. X Config Options">Appendix 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>
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
125 <p>If none of the above are available, the DPI defaults to
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>
134 (--) NVIDIA(0): DPI set to (101, 101); computed from "UseEdidDpi" X config option
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">
148 <p>Use separate X screens, rather than TwinView; see <a href=
149 "chapter-14.html" title=
150 "Chapter 14. Configuring Multiple X Screens on One Card">Chapter 14,
151 <i>Configuring Multiple X Screens on One Card</i></a> for
155 <p>Experiment with different DPI settings to find a DPI that is
156 suitable for both display devices.</p>
161 <div class="navfooter">
163 <table width="100%" summary="Navigation footer">
165 <td width="40%" align="left"><a accesskey="p" href=
166 "appendix-d.html">Prev</a> </td>
167 <td width="20%" align="center"><a accesskey="u" href=
168 "part-02.html">Up</a></td>
169 <td width="40%" align="right"> <a accesskey="n" href=
170 "appendix-f.html">Next</a></td>
173 <td width="40%" align="left" valign="top">Appendix D. GLX
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 Appendix F. XvMC Support</td>