cvt
Calculate VESA CVT mode lines
SYNOPSIS
cvt [ -s | -r ] width height [refresh]
cvt -i width height [refresh]
PARAMETERS
width
The desired horizontal resolution in pixels.
height
The desired vertical resolution in pixels.
refresh
The desired vertical refresh rate in Hertz (Hz). This parameter is optional; if omitted, cvt defaults to 60Hz.
-s
Calculates timings using the reduced blanking standard. This often results in a higher pixel clock and less overhead, generally preferred for modern LCD/LED displays.
-r
Calculates timings using the standard reduced blanking (CVT-RB) standard. This is the default behavior if refresh is 60Hz and no other options are specified.
-i
Calculates timings for an interlaced display mode. Interlaced modes draw odd and even scanlines in separate passes, which can result in perceived flicker on modern progressive scan displays.
DESCRIPTION
cvt is a utility that generates VESA CVT (Coordinated Video Timings) compatible modelines for use with the X Window System (Xorg). It takes the desired horizontal resolution, vertical resolution, and an optional vertical refresh rate as input. Based on these parameters, it calculates the necessary timing values, including pixel clock, horizontal and vertical sync, and blanking intervals. The output is a complete Modeline string, which can be directly used with Xorg's xrandr command or added to an xorg.conf configuration file.
This tool is invaluable for setting custom display modes that are not automatically detected or properly configured by a display's EDID information. It's particularly useful for older monitors, projectors, or specialized displays that require precise timing control to achieve optimal image quality or compatibility, ensuring the display operates at its preferred resolution and refresh rate.
CAVEATS
The modelines generated by cvt adhere to the VESA CVT standard, but they may not be universally compatible with all graphics cards or display devices. Factors like graphics driver limitations, monitor capabilities, or poor EDID information can prevent a generated mode from working correctly.
While cvt provides accurate timings, some displays might require minor adjustments to the calculated values for optimal performance or to eliminate artifacts like flickering or tearing. Interlaced modes (generated with -i) are generally not recommended for modern progressive scan displays due to potential flicker.
USAGE EXAMPLE
To generate a modeline for 1920x1080 resolution at 60Hz:$ cvt 1920 1080 60
This will output something similar to:# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
To apply this modeline using xrandr (replace DVI-I-1 with your actual output name, found via xrandr -q):$ xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
$ xrandr --addmode DVI-I-1 "1920x1080_60.00"
$ xrandr --output DVI-I-1 --mode "1920x1080_60.00"
For persistent changes, the Modeline can be added to /etc/X11/xorg.conf or a file in /etc/X11/xorg.conf.d/ within a Monitor or Screen section.
HISTORY
cvt was developed as part of the X.Org project and is typically included in the xorg-x11-utils package. It emerged as a more robust and standard-compliant alternative to older modeline generators like gtf(1). While gtf implemented the Generalized Timing Formula (GTF), cvt adopted the VESA Coordinated Video Timings (CVT) standard, which provides more consistent and widely supported timing calculations, especially crucial for the proliferation of LCD/LED panels that have specific timing requirements.