TIP Getting modelines
From Gentoo Linux Wiki
| Terminals / Shells • Network • X Window System • Portage • System • Filesystems • Kernel • Other |
Contents |
[edit] Introduction
Getting modelines can be done by calculating them yourself or using a online calculator like this one. But still, you have to get all this information about your monitor. You wonder, why can't the monitor itself just supply them? Well, it can. You can get it by using the EDID information.
If you don't care about the information on the how and why, skip to Quick Reference
[edit] What are Modelines?
A Modeline is a configuration line in the x-server configuration file (xorg.conf) that provides information to the X server about a connected computer monitor or television and how to drive it at a specified display resolution. Modelines may no longer be necessary in XFree86 versions 4 and higher as the x-server can now probe for correct values. To possible however to limit probing use a modeline.
[edit] EDID?
Extended Display Identification Data is a VESA standard data format that contains basic information about a monitor and its capabilities, including vendor information, maximum image size, color characteristics, factory pre-set timings, frequency range limits, and character strings for the monitor name and serial number.
The information is stored in the display and is used to communicate with the system through a Display Data Channel (DDC ), which sites between the monitor and the PC graphics adapter. The system uses this information for configuration purposes, so the monitor and system can work together.
The latest version of EDID can be used in CRT displays, LCD displays, and future display types because EDID offers general descriptions of almost all display parameters.
[edit] Installing read-edid
We can use the program read-edid for this. It's in portage, so we are lucky
emerge -va read-edid
And we are done. Next, let's find read-edid the information we want.
(note for AMD64 users, read-edid will not work in this environment)
[edit] Getting the information
We use the program get-edid for this. Just run it :)
# get-edid (some information)
This isn't very helpful though. We need to run it through the program parse-edid to get some useful information.
# get-edid | parse-edid
[...]
parse-edid: EDID checksum passed.
# EDID version 1 revision 2
Section "Monitor"
# Block type: 2:0 3:fd
# Block type: 2:0 3:fc
Identifier "CPD-E220E"
VendorName "SNY"
ModelName "CPD-E220E"
# Block type: 2:0 3:fd
HorizSync 30-85
VertRefresh 48-120
# Max dot clock (video bandwidth) 200 MHz
# Block type: 2:0 3:fc
# Block type: 2:0 3:ff
# DPMS capabilities: Active off:yes Suspend:no Standby:no
Mode "1024x768" # vfreq 84.997Hz, hfreq 68.677kHz
DotClock 94.500000
HTimings 1024 1072 1168 1376
VTimings 768 769 772 808
Flags "+HSync" "+VSync"
EndMode
# Block type: 2:0 3:fd
# Block type: 2:0 3:fc
# Block type: 2:0 3:ff
EndSection
And there you go... ready to copy n paste in your xorg.conf file.
[edit] Quick Reference
# emerge read-edid # get-edid | parse-edid
[edit] Calculate Using gtf
Detect Modelines using gtf horiz_res vert_res refresh_rate.
Values produced are added in xorg.conf in:
Section "Monitor" Modeline "1280x800_60.00" 83.46 1280 1344 1480 1680 800 801 804 828 -HSync +Vsync
