Dual Head with Compiz and i965 on Ubuntu 9.04 Jaunty Jackalope

2 04 2009

It seems that the bug mentioned in my previous post hasn’t been fixed in the upcoming Ubuntu release. I have uploaded the fixed driver packages into my PPA, so after upgrading to Jaunty, you should put this into your /etc/apt/sources.list:

deb http://ppa.launchpad.net/fuzzbuntu/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/fuzzbuntu/ppa/ubuntu jaunty main

After updating and upgrading with apt-get, you should have Compiz working again. To avoid display problems on first boot of Jaunty, please make sure you disable desktop effects before you upgrade.





Dual Head with Compiz and i965 on Ubuntu Intrepid

17 02 2009

I have received my new ThinkPad T400 and installed Ubuntu Intrepid on it. Everything works fine straight out of the box, but Compiz refused to run a dual-head setup on the integrated Intel graphics. It reported the following:
Comparing resolution (3120x1050) to maximum 3D texture size (2048): Failed.
I’ve done a little research and found out that the graphics driver supports a maximum supported texture size of 2048×2048, which is false for the i965 chipset, which is natively capable of 8192×8192. The Mesa DRI driver caused the problem and needed a minimal patching, as described here, except that there is no need to patch xserver-xorg-video-intel on Intrepid. Here is a step-by-step guide for Ubuntu Intrepid:

  • apt-get source mesa-common-dev
  • sudo apt-get build-dep mesa-common-dev
  • sudo apt-get install fakeroot
  • cd mesa-7.2/src/mesa/drivers/dri/i965
  • Now edit the file brw_context.c according to this patch:
    diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_c!
    index 1601f6d..c06f5da 100644
    --- a/src/mesa/drivers/dri/i965/brw_context.c
    +++ b/src/mesa/drivers/dri/i965/brw_context.c
    @@ -138,10 +138,10 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
    /* Advertise the full hardware capabilities. The new memory
    * manager should cope much better with overload situations:
    */
    - ctx->Const.MaxTextureLevels = 12;
    + ctx->Const.MaxTextureLevels = 13;
    ctx->Const.Max3DTextureLevels = 9;
    ctx->Const.MaxCubeTextureLevels = 12;
    - ctx->Const.MaxTextureRectSize = (1<<11);
    + ctx->Const.MaxTextureRectSize = (1<<12);
  • Get back to the root of the mesa-7.2 directory
  • Edit debian/changelog. Just duplicate the last entry and modify its version number to a higher one, to make sure your package will not be overwritten.
  • Run dpkg-buildpackage -rfakeroot -uc -b in mesa-7.2 directory
  • cd .. – get one dir level up
  • In this directory you should see a bunch of *.deb files. Don’t install all of these! Pick onle those that you already have installed on your system. To find it out, run dpkg -l | grep mesa

You should be done by now. If you have problems, just leave a comment!