Understanding Modelines:
A modeline is a specific format of timing parameters that the X Window System uses to describe video modes. The cvt command simplifies the creation of these parameters based on the VESA Coordinated Video Timing standard.
Modeline Format:
The output of cvt is a modeline in the following format:
Modeline "name" pixel_clock hdisp hsyncstart hsyncend htotal vdisp vsyncstart vsyncend vtotal [flags]
Where:
- name: A descriptive name for the mode, typically containing resolution and refresh rate
- pixel_clock: The pixel clock frequency in MHz
- hdisp, hsyncstart, hsyncend, htotal: Horizontal timing parameters
- vdisp, vsyncstart, vsyncend, vtotal: Vertical timing parameters
- flags: Additional flags like +hsync, -hsync, +vsync, -vsync to indicate sync polarity
Practical Usage:
The cvt command is commonly used for:
- Setting custom resolutions that are not automatically detected
- Adding support for new monitors or unusual display modes
- Creating resolutions optimized for specific displays
- Troubleshooting display issues where standard modes don't work correctly
Using with xrandr:
The typical workflow is:
- Generate the modeline with cvt
- Use xrandr --newmode to create the mode
- Use xrandr --addmode to associate the mode with a specific output
- Use xrandr --output to activate the mode
The -r (Reduced Blanking) Option:
Reduced blanking is a technique that reduces the time spent in the blanking interval between frames, which is particularly useful for:
- LCD displays that don't require as much blanking time as CRTs
- Achieving higher refresh rates
- Reducing bandwidth requirements
- Power saving on some displays
Limitations:
- The cvt command only generates standard VESA CVT modelines
- Some displays may not support all modelines even if they claim to support the resolution
- For older CRT monitors or very specific timing requirements, the gtf command may be more appropriate
- Some hardware may have limitations on pixel clocks or total resolution