: ''A mode line may also refer to a line for the
Emacs
Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
and
Vim
Vim means enthusiasm and vigor. It may also refer to:
* Vim (cleaning product)
* Vim Comedy Company, a movie studio
* Vim Records
* Vimentin, a protein
* "Vim", a song by Machine Head on the album ''Through the Ashes of Empires''
* Vim (text ed ...
editors that provides information about the file and modes.''
A modeline is a configuration line in
xorg.conf or the
XFree86
XFree86 is an implementation of the X Window System. It was originally written for Unix-like operating systems on IBM PC compatibles and was available for many other operating systems and platforms. It is free and open source software under the XF ...
configuration file
In computing, configuration files (commonly known simply as config files) are files used to configure the parameters and initial settings for some computer programs. They are used for user applications, server processes and operating system ...
(XF86Config) that provides information to the
display server about a connected
computer monitor
A computer monitor is an output device that displays information in pictorial or textual form. A discrete monitor comprises a visual display, support electronics, power supply, housing, electrical connectors, and external user controls.
The ...
or
television
Television, sometimes shortened to TV, is a telecommunication Media (communication), medium for transmitting moving images and sound. The term can refer to a television set, or the medium of Transmission (telecommunications), television tra ...
and how to drive it at a specified
display resolution
The display resolution or display modes of a digital television, computer monitor 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 i ...
. The Modeline is based on the
Generalized Timing Formula Generalized Timing Formula is a standard by VESA which defines exact parameters of the component video signal for analogue VGA display interface.
The video parameters defined by the standard include horizontal blanking (retrace) and vertical b ...
or the
Coordinated Video Timings Coordinated Video Timings (CVT; ''VESA-2013-3 v1.2'') 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 televisi ...
standards produced by
VESA
VESA (), formally known as Video Electronics Standards Association, is an American technical standards organization for computer display standards. The organization was incorporated in California in July 1989To retrieve the information, sear ...
.
Modelines are now rarely used, but
XFree86
XFree86 is an implementation of the X Window System. It was originally written for Unix-like operating systems on IBM PC compatibles and was available for many other operating systems and platforms. It is free and open source software under the XF ...
and the
Xorg Server
X.Org Server is the free and open-source implementation of the X Window System display server stewarded by the X.Org Foundation.
Implementations of the client-side X Window System protocol exist in the form of ''X11 libraries'', which serv ...
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:
* Flags (optional):
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:
:
:
(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,
sync pulse, and
back porch timings. The resulting
refresh rate
The refresh rate (or "vertical refresh rate", "vertical scan rate", terminology originating with the cathode ray tubes) is the number of times per second that a raster-based display device displays a new image. This is independent from frame ra ...
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
Hz.
Optionally, extra parameters for controlling the polarity of the horizontal and vertical sync pulses can be added. There are also options for
interlaced
Interlaced video (also known as interlaced scan) is a technique for doubling the perceived frame rate of a video display without consuming extra bandwidth. The interlaced signal contains two fields of a video frame captured consecutively. Thi ...
and
double scan
A flicker fixer or scan doubler is a piece of computer hardware that de-interlaces an output video signal. The flicker fixer accomplishes this by adjusting the timing of the natively interlaced video signal to suit the needs of a progressive ...
modes. In most situations they will not be required.
Obsolescence
Modelines may no longer be necessary in XFree86 versions 4 and higher,
XFree86 Video Timings HOWTO: 2. Why This HOWTO Is Obsolete
/ref> since for many monitors and HDTV
High-definition television (HD or HDTV) describes a television system which provides a substantially higher image resolution than the previous generation of technologies. The term has been used since 1936; in more recent times, it refers to the ...
s 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 HDTV
High-definition television (HD or HDTV) describes a television system which provides a substantially higher image resolution than the previous generation of technologies. The term has been used since 1936; in more recent times, it refers to the ...
s, it will be necessary to create a modeline to get the setting right. The EDID information can be obtained by using the command "" and looking at /var/log/XFree86.0.log.
See also
* 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 s ...
* Sync pulse
References
External links
XFree86 Video Timings HOWTO
The XFree86 Modeline Generator
Modeline generator in C for download
Online Modeline generator (with Ruby source)
Colas XFree Modeline Generator
Online Modeline Tool
MythTV Wiki Working With Modelines
LCD/TV Modeline Database
{{XWinSys
X Window System