Display Size

From MythTV Official Wiki
Revision as of 19:54, 8 March 2007 by Sphery (Talk | contribs)

Jump to: navigation, search

MythTV themes are designed so that their elements will be properly aligned at 100x100 DPI (dots per inch). Therefore, you must specify a DisplaySize that results in 100x100 DPI if your display isn't actually using 100 DPI. To make this very clear, it does not matter what resolution/size your display actually is--MythTV depends on the DPI being 100x100 in order to draw the UI correctly.

X will normally attempt to probe the monitor during initialization in an attempt to find out it's actual size using EDID, but some monitors respond with incorrect information, and 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.

Alter the "Monitor" declarations for each display you're going to be using for MythTV in your X configuration file (XF86Config or xorg.conf) to contain a DisplaySize entry like below:

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

# 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 1920x1080 at 100dpi  (16:9)
#    DisplaySize  487 274
# For 1280x720 at 100dpi  (16:9)
#    DisplaySize  325 182
# 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.

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), 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".