Per Olofsson: Xorg and widescreen
When I got myself a widescreen LCD monitor, it didn't quite work as
expected. The image showed up on the screen, but squeezed down to the
wrong format.
Fixing it was not trivial. Apparently, X uses the video mode supplied
by the monitor through EDID, but the video mode is wrong. Whether this
is because the monitor sends the wrong information, or because of a
limitation in the EDID format, I don't know.
Anyway, here's how I got it working. Note that I have an Intel
graphics card and I use the new "intel" video driver. It might not
work for your particular configuration.
First, I generated a modeline with the cvt command. CVT means
"Coordinated Video Timing", and it's some kind of VESA standard. Run
the cvt command with the horizontal and vertical resolution as
arguments:
$ cvt 1680 1050
# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
Now, put the modeline in the Monitor section of /etc/X11/xorg.conf
:
Section "Monitor"
Identifier "Generic Monitor"
# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
#
Option "Preferred Mode" "1680x1050_60.00"
EndSection
The Preferred Mode
option is needed so that the mode is actually
chosen. In my case, I have a laptop, so there's also a built-in
display, but the mode will not be used on it (the card knows the
supported resolutions somehow).
In order to be able to switch to a higher resolution when initially
using a lower one, the framebuffer needs to be initialized to be big
enough. This can be done in the Display subsection:
Section "Screen"
...
SubSection "Display"
Virtual 1680 1050
EndSubSection
EndSection
Here's an interesting thing: the old Modes directives are not needed
anymore. They are ignored by the intel driver. You only need one
generic Display subsection.
That's about it. The display should work automatically if it is
connected when X is started. If it is connected afterwards, you can
enable it with:
xrandr --output VGA --auto
It can be disabled with:
xrandr --output VGA --off
At least when running Gnome, the window manager automatically fits
everything to the right screen size. See the xrandr(1)
manual page
for more options.