Comment 21 for bug 438000

dhenry (tfc-duke) wrote :

Ok I see, calling "xrandr" will by default expand the virtual screen as if the external monitor is right of LVDS, even if we directly call "xrandr --output VGA1 --below LVDS".

I tried with LVDS1=1280x800 and VGA1=1280x1024 (native resolutions, chosen by default).
VGA1 at the right/left of LVDS1 will result in a frame buffer of 2560x1024 => greater than 2048 (i945's hardware limit), crash with compiz.
VGA1 below/above LVDS1 will result in a frame buffer of 1280x1824 => Fits in 2048x2048 and works with compiz.

Running "xrandr --output VGA1 --below LVDS" first creates a 2560x1024 frame buffer before creating the proper 1280x1824 frame buffer (seen in Xorg.0.log without compiz). Therefore, it will always crash with compiz enabled. However we can do it with metacity (compiz disabled), and then put back compiz (compiz.real --replace), it will work.

In Xorg.0.log, after running the command given below:
(II) intel(0): Allocate new frame buffer 2560x1024 stride 4096
(II) intel(0): Allocate new frame buffer 1280x1824 stride 2048

If you have higher native resolutions for LVDS and/or external monitor, there is currently no solution with compiz.


The problem is that "xrandr" and "gnome-display-properties" will systematically setup the external monitor next to the LVDS, without checking if it's possible. Those tools should not do this if hardware does not allow it. The problem is that those tools are not aware that compiz is running (which reduces the hardware limit to 2048x2048), and so try to create the too large frame buffer (which is legal without compiz).