|== Display and Monitor Sections ==
|The LiveCD relies on the monitor correctly reporting its capabilities. The [http://wiki.linuxfromscratch.org/livecd/browser/tags/6.2-3/etc/X11/xorg.conf?rev=1730 xorg.conf] file on the CD doesn't specify any synchronization frequency limits and resolutions, in hope that Xorg picks up sensible defaults. However, unpatched Xorg doesn't do this. There were bug reports such as "I get 2048x1536@60Hz instead of nice 1600x1200@75Hz" and "my LCD monitor gets confused".
|Here is what actually happens.
| * The monitor says to Xorg: "I support 30-61 kHz Vsync and 56-75 Hz Hsync, and the maximum supported pixel clock is 80 MHz".
| * Xorg picks up the 1280x960 mode (102 MHz pixel clock, 60 kHz Hsync, 60 Hz Vsync). This mode fits into synchronization ranges, and the pixel clock limitation is ignored because there are really no separate pixels on analog monitors (they just see continuous signal), and overcoming this limit cannot damage anything.
| * The monitor (in fact a LCD) is confused, because it supports only resolutions up to 1024x768.
|So the problem is that Xorg treats pixel clock limitation as an advice that can be ignored. Thus, the LiveCD patches Xorg (hw/xfree86/common/xf86Mode.c) so that an attempt to exceed the DDC-probed pixel clock limit is treated as an error (that rejects the mode), not as a warning.
|The other problem is that Xorg (even with patched hw/xfree86/common/xf86Mode.c file) sometimes picks up a mode with refresh rate less than 60 Hz from its builtin database. This problem is solved on the LiveCD by removing all such modes from the database (hw/xfree86/common/extramodes, hw/xfree86/common/vesamodes).
|With the patch, Xorg picks up the 1024x768 mode (80 MHz pixel clock, 60 kHz Hsync, 75 Hz Vsync) by default on this monitor. This is still not ideal for LCD (60 Hz Hsync would provide a sharper image), but better than the "signal out of range" message on the monitor.
|The full patch is available from [http://wiki.linuxfromscratch.org/livecd/browser/tags/6.2-3/packages/Xorg-modular/xorg_server-X11R7.0_1.0.1-dotclock-1.patch?rev=1423&format=raw the LiveCD repository]
| * This patch is not supposed to help with problems where the user gets only 640x480 resolution at 60 Hz. This type of problems is caused by the monitor not providing its synchronization frequency limits via DDC, in which case Xorg assumes failsafe defaults. The solution to this problem is to provide the explicit synchronization frequency limits in the "Monitor" section of xorg.conf via the !HorizSync and !VertRefresh keywords.
| * This patch seems to apply, but in fact '''does not work''' with Xorg-7.1. The reason is that the condition of unknown pixel clock limit is encoded differently in Xorg-7.1 and previous versions. Xorg-7.1 encodes that as "the limit is 0 MHz" (thus, every mode triggers a warning which becomes an error with this patch), while previous versions just use a "sufficiently high" limit (something like 2.5 GHz, so the warning is not triggered). Thus, patched Xorg-7.1 will be completely unable to drive monitors that don't tell their pixel clock limit via DDC.
| * Because of the two issues mentioned above, and since it is always possible for the user to insert the "Resolution" line into xorg.conf on his system, this patch is not recommended for use outside of the LFS LiveCD.