XFree86 Modeline
|
A Modeline is a configuration line in the XFree86 configuration file (XF86Config) that provides information to the X server about a connected computer monitor and how to drive it at a specified display resolution.
Modelines are no longer necessary in XFree86 versions 4 and higher, as 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
For obsolete, unusual, or insufficiently finely-tuned display hardware, however, manually setting modelines is still a potential solution.
An individual 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. Following are two groups of four numbers. The first group specifies the x-resolution (width) and related parameters, while the second specifies the y-resolution (height).
Modeline "1600x1200" 155 1600 1656 1776 2048 1200 1202 1205 1263
or alternately, the modeline can be split into more than one line for greater clarity
Modeline "1600x1200" 155 1600 1656 1776 2048 1200 1202 1205 1263
The numbers after the width and height are used to determine the front porch, sync pulse, and back porch timings. The resulting refresh 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.
Optionally, extra parameters for controlling horizontal and vertical synchronization can be added. There are also options for interlaced and doublescan modes. However, none of these are very common in modern configurations.
External links
- XFree86 Video Timings HOWTO (http://en.tldp.org/HOWTO/XFree86-Video-Timings-HOWTO/)
- The XFree86 Modeline Generator (http://xtiming.sourceforge.net/cgi-bin/xtiming.pl)