Difference between revisions of "Display Size"

From MythTV Official Wiki
Jump to: navigation, search
m (added 1080p setting example)
Line 32: Line 32:
# For 1920x1080 at 100dpi  (16:9)
# For 1920x1080 at 100dpi  (16:9)
#    DisplaySize  487 274
#    DisplaySize  487 274
# For 1920x1080 - 1080p 46" TV ~ 1030mm x 580mm
#    DisplaySize  1024 576
# For 1360x768 at 100dpi  (16:9)
# For 1360x768 at 100dpi  (16:9)
#    DisplaySize  345 195
#    DisplaySize  345 195

Revision as of 04:33, 5 February 2011

DisplaySize tells X11 and X11 widgets and applications how large your screen is physically, in millimeters. You can simply measure your monitor/TV with a ruler (but make sure that it's exactly 16:9 or 4:3, depending on your monitor), or calculate it (TODO insert geometry formula based on diagonal size in inch, 1 inch = 25,4 mm).

Together with the pixel size (e.g. 1280x1024 or 1920x1080), this allows to calculate the "dpi" (dots per inch) value, i.e. how many pixels there are on a physical screen area, which is important to know how large something will physically appear on the screen. Different values will cause text fonts in some programs (not MythTV) to be rendered at different sizes, as X will typically calculate the display pitch/dpi based on the video output resolution and the DisplaySize. Generally, configuring your display such that X thinks it's 100x100DPI will cause other applications to render at a size that's readable from your viewing position (i.e. for xterm's, browsers, ...).

MythTV requires that you configure X to report a DisplaySize whose aspect is the same as your TV or monitor's physical aspect ratio. Therefore, if you have a 16:9 widescreen TV, you should configure the DisplaySize such that the ratio of the first number to the second is 16 to 9 (i.e. "DisplaySize 16 9", "DisplaySize 32 18", "DisplaySize 160 90", "DisplaySize 320 180", "DisplaySize 1280 720", or whatever). For a "normal" standard-definition display, specify a 4:3 ratio. For a widescreen computer monitor, the ratio is most likely 16:10 (though it could be 16:9). You may find the ratio by simply measuring the width and height of the physical display. Note that this ratio is not necessarily related to the ratio of your X and Y resolutions (it will be only if your display has square pixels).

Note that some video drivers provide other means to specify the DPI that may override the settings you configure with DisplaySize (i.e. as do the NVIDIA drivers--see Specifying_DPI_for_NVIDIA_Cards for more information). Note, however, that if you do specify your display pitch using something other than DisplaySize, you'll have to ensure that the calculated DisplaySize has the appropriate aspect. Therefore, it makes the most sense to specify DisplaySize directly (and leave out other options, such as NVIDIA's DPI option).


X will normally attempt to probe the monitor during initialization in an attempt to find out its actual size using EDID, but some monitors respond with incorrect information, and most televisions don't respond to EDID queries at all, making it sometimes necessary to manually set this information in your X config file using the DisplaySize directive. If xdpyinfo reports that your display is using something other than 100x100 DPI, you can use the DisplaySize directive to fix it.

Each Monitor section in your X configuration file (/etc/X11/XF86Config or /etc/X11/xorg.conf) should contain a DisplaySize entry like below:

Script.png /etc/X11/xorg.conf

Section "Monitor"
    Identifier  "Television"
    VendorName  "Wombatronic Industries"
    ModelName   "Colormeister 5000"
    HorizSync   30 - 50
    VertRefresh 60

# For 2560x1600 at 100dpi  (16:10)
#    DisplaySize  650 406
# For 1920x1200 at 100dpi  (16:10)
#    DisplaySize  487 304
# For 1680x1050 at 100dpi  (16:10)
#    DisplaySize  426 266
# For 1440x900 at 100dpi  (16:10)
#    DisplaySize  365 228
# For 1280x768 at 100dpi  (16:10)
#    DisplaySize  325 195
# For 1920x1080 at 100dpi  (16:9)
#    DisplaySize  487 274
# For 1920x1080 - 1080p 46" TV ~ 1030mm x 580mm
#    DisplaySize  1024 576
# For 1360x768 at 100dpi  (16:9)
#    DisplaySize  345 195
# For 1280x720 at 100dpi  (16:9)
#    DisplaySize  325 182
# For 1600x1200 at 100dpi (4:3)
#    DisplaySize  406 304
# For 1400x1050 at 100dpi (4:3)
#    DisplaySize  355 266
# For 1280x960  at 100dpi (4:3)
#    DisplaySize  325 243
# For 1024x768 at 100dpi  (4:3)
#    DisplaySize  260 195
# For 800x600 at 100dpi  (4:3)
#    DisplaySize  203 153
# For 640x480 at 100dpi  (4:3)
#    DisplaySize  162 121


Uncomment (remove the pound symbol/hash at the beginning of the line) the DisplaySize line matches the resolution you're going to be using on that display. It is important that you choose a DisplaySize whose aspect matches that of your physical Display; otherwise, Myth will be unable to display video using the proper aspect ratio.

Calculating your own values

If you have non-square pixels on your device (i.e. if the ratio of your physical display's dimensions is different from the ratio of your X and Y resolution), and you would like to run X at about 100DPI (to size fonts appropriately in programs other than MythTV), you will need to set either vertical or horizontal pitch to 100DPI and calculate the other based on your physical display's dimensions. Generally, you should choose to use 100DPI vertical pitch.

So, for example, if you're using a 16:9 CRT TV using TV out at 800x600, to choose to use 100DPI vertical pitch, you should start with the size specified above ("DisplaySize 203 153"), but calculate the first value based on the TV's aspect ratio. To do so, divide 153 by 9 and multiply by 16 to get 272. Therefore, you would use the line

  1. For 800x600 at 100dpi (16:9)
   DisplaySize  272 153

Note, also, that a 4:3 monitor using 1280x1024 pixels (5:4) is using non-square pixels.

See also the FAQ for more details and for information about setting DPI when using NVIDIA drivers.

If your display is using a resolution not listed above, it's very easy to compute the values you need for DisplaySize. Use "DisplaySize x y" where

x = (horizontal resolution)*0.254


y = (vertical resolution)*0.254

both rounded to the nearest integer. Again, the physical display's aspect ratio should be considered for non-square pixels.

For 1024x768, this would be

x=1024*0.254, or x=260


y=768*0.254, or y=195

so you would use "DisplaySize 260 195".


The Mythbuntu distribution erroneously forces DPI to 100x100 in their gdm configuration. This causes all your hard work above to be ignored, so fix it by removing the "-dpi 100" argument from this file.


See also