If you happen to connect our Linux laptop or netbook to an external monitor, you're likely to get into resolution trouble. For smaller resolutions (<=1024x768), it's not a bigger deal but once you try higher and unusual resolutions, like 1440x900, things don't turn out that well. Here's how to switch to such resolutions under (Ubuntu) Linux. I'm connecting my laptop (Intel 845GM chipset) to an external monitor (1440x900 native).
Fire up terminal and run the following command; first calculate VESA CVT mode lines
$ cvt 1440 900Output:
# 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
Modeline "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
Now, lets see my card's supported resolutions out of the box.
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 4096 x 4096
VGA1 connected (normal left inverted right x axis y axis)
800x600 60.3 56.2
640x480 59.9 59.9
LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
TV1 disconnected (normal left inverted right x axis y axis)
In the above output, VGA1 is the external monitor and LVDS1 is the laptop's LCD panel. Now use the modeline information to create a new custom resolution and add it to VGA1
$ xrandr --newmode "1440x900" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsyncThe changes are temporary though. If you want it to make it permanent, add them to ~/.xprofile
$ xrandr --addmode VGA1 1440x900
Now go to System > Preferences > Monitors. The external monitor's list of resolutions should show 1440x900.
Some more info:
Connecting to external monitor has two options, mirror or extend. Choosing mirror gives the same output to both monitors. Extend, well, extends the display over both monitors. But it has a catch: for Compiz to extend over external monitor, the maximum possible horizontal resolution (see first line of xrandr output above, in my case 4096) should be at least double of sum of total horizontal resolution of two monitors.
In my case, if I try to extend my 1280x800 to an 1440x900 external monitor, its not gonna work as 2*(1280+1440)=5440 > 4096. So mirroring is the only option. However if you set the resolution while compiz is on, it's gonna be "confused". Here's the workaround:
1. Add the custom resolution as described above
2. Disable Compiz (System > Preference > Appearance > Visual Effects > None)
3. Change Resolution, and set the laptop's output to off
4. Enable Compiz again