X11, modelines, and new monitors

I finally figured out the correct way, regardless of Linux distribution tools, on how to configure an unknown/new monitor. It turns out that Xorg will use I2C tools to query the monitor. Among other things, the monitor will report sync rates, size, age, name, etc. Most importantly, it will report all that is needed to write a new modeline in xorg.conf:

(II) MGA(0): Supported additional Video Mode: 
(II) MGA(0): clock: 146.2 MHz  Image Size:  473 x 296 mm 
(II) MGA(0): h_active: 1680  h_sync: 1784  h_sync_end 1960 h_blank_end 2240 h_border: 0 
(II) MGA(0): v_active: 1050  v_sync: 1053  v_sync_end 1059 v_blanking: 1089 v_border:  0 
(II) MGA(0): Ranges: V min: 56  V max: 75 Hz, H min: 30  H max: 83 kHz, PixClock  max 150 MHz 

We can take this information, and create the monitor and mode sections in the xorg.conf file:

Section "Monitor"
        Identifier      "Monitor[0]"
        UseModes        "Modes[0x]"
        ModelName       "E228WFP (ANALOG)"
        VendorName      "DELL"
        DisplaySize     473 296
        Option          "DPMS"
        HorizSync       30-83
        VertRefresh     56-75


Section "Modes"
  Identifier    "Modes[0x]"
  Modeline "1680x1050" 146.20 1680 1784 1960 2240 1050 1053 1059 1089

If you want to second-guess the monitor, you can always go to the XFree86 Modeline Generator to tweak it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.