XFree86 Modeline
Encyclopedia
A modeline is a configuration line in xorg.conf
Xorg.conf
The file xorg.conf is a file used for configuring the X.Org Server. While typically located in /etc/X11/xorg.conf, its location may vary across operating systems....

 or the XFree86
XFree86
XFree86 is an implementation of the X Window System. It was originally written for Unix-like operating systems on IBM PC compatibles and is now available for many other operating systems and platforms. It is free and open source software under the XFree86 License version 1.1. It is developed by the...

 configuration file
Configuration file
In computing, configuration files, or config files configure the initial settings for some computer programs. They are used for user applications, server processes and operating system settings. The files are often written in ASCII and line-oriented, with lines terminated by a newline or carriage...

 (XF86Config) that provides information to the X server about a connected computer monitor or television
Television
Television is a telecommunication medium for transmitting and receiving moving images that can be monochrome or colored, with accompanying sound...

 and how to drive it at a specified display resolution
Display resolution
The display resolution of a digital television or display device is the number of distinct pixels in each dimension that can be displayed. It can be an ambiguous term especially as the displayed resolution is controlled by all different factors in cathode ray tube , flat panel or projection...

. The Modeline is based on the Generalized Timing Formula
Generalized Timing Formula
Generalized Timing Formula is a standard by VESA which defines exact parameters of the component video signal for analog VGA display interface....

 or the Coordinated Video Timings
Coordinated Video Timings
Coordinated Video Timings is a standard by VESA which defines the timings of the component video signal. Initially intended for use by computer monitors and video cards, the standard made its way into consumer televisions....

 standards produced by VESA
VESA
VESA is an international standards body for computer graphics founded in 1989 by NEC Home Electronics and eight other video display adapter manufacturers.VESA's initial goal was to produce a standard for 800×600 SVGA resolution video displays...

.

Modelines are now all but unused, but XFree86
XFree86
XFree86 is an implementation of the X Window System. It was originally written for Unix-like operating systems on IBM PC compatibles and is now available for many other operating systems and platforms. It is free and open source software under the XFree86 License version 1.1. It is developed by the...

 and the Xorg Server still allow them to be set should the EDID information be inadequate.

Syntax

Each modeline has ten parameters, beginning with a label for the resolution being specified. The second parameter specifies the rate of the pixel clock in megahertz. Then follow four numbers that together specify the x-resolution (width) and related parameters, and four numbers that specify the y-resolution (height).

Modeline syntax: pclk hdisp hsyncstart hsyncend htotal vdisp vsyncstart vsyncend vtotal [flags]
Flags (optional): +HSync, -HSync, +VSync, -VSync, Interlace, DoubleScan, CSync, +CSync, -CSync

Modeline "1600x1200" 155 1600 1656 1776 2048 1200 1202 1205 1263
# (Label) (clk) (x-resolution) (y-resolution)
# |
# (pixel clock in MHz)

Or, the modeline can be split into multiple lines for greater clarity

Modeline "1600x1200" 155 1600 1656 1776 2048
1200 1202 1205 1263

The horizontal and vertical frequencies can be calculated by:
Hfreq=pclk/htotal
Vfreq=pclk/(htotal*vtotal) (field rate) For interlace mode, frame rate=field rate/2, otherwise frame rate=field rate.

The numbers after the width and height are used to determine the front porch
Front Porch
Front Porch, Inc. provides services to Internet Service Providers. Front Porch technology enables an Internet Service Provider to insert its own messages to be presented to users as they use their web browsers, such as customer service notices or online advertising...

, sync pulse, and back porch timings. The resulting refresh rate
Refresh rate
The refresh rate is the number of times in a second that a display hardware draws the data...

 or frame rate of the display can be determined by dividing the pixel clock frequency by the product of the horizontal and vertical field lengths. In this case, the display is operating at 155,000,000/(2048*1263)=59.92 Hz
Hertz
The hertz is the SI unit of frequency defined as the number of cycles per second of a periodic phenomenon. One of its most common uses is the description of the sine wave, particularly those used in radio and audio applications....

.

Optionally, extra parameters for controlling the polarity of the horizontal and vertical sync pulses can be added. There are also options for interlaced and doublescan modes. In most situations they will not be required.

Obsolescence

Modelines may no longer be necessary in XFree86 versions 4 and higher, since for many monitors and HDTVs they are now calculated by the X server at startup based on two factors:
  • other, more generic and intuitive, settings in the server configuration file
  • monitor capabilities acquired via an EDID query


EDID is not always completely accurate, and for some situations such as older or unusual display hardware or many HDTVs, it will be necessary to create a modeline to get the setting right. The EDID information can be obtained by using the command "startx -- -logverbose 6" and looking at /var/log/XFree86.0.log.

See also

  • Raster scan
    Raster scan
    A raster scan, or raster scanning, is the rectangular pattern of image capture and reconstruction in television. By analogy, the term is used for raster graphics, the pattern of image storage and transmission used in most computer bitmap image systems...

  • Front porch
    Front Porch
    Front Porch, Inc. provides services to Internet Service Providers. Front Porch technology enables an Internet Service Provider to insert its own messages to be presented to users as they use their web browsers, such as customer service notices or online advertising...

  • Sync pulse
  • Back porch

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK