Very Noisy

I'm Mark Kennedy. I'm part of the furniture at Eurogamer Network Ltd. and I do my best to lead the web development team there.

Pals

Categories

Speed up composited Metacity on GMA 500

6 February 2010

If you've got a netbook with Intel's useless GMA500 (Pouslbo) chipset, and you've managed to get the closed source Linux drivers working, you'll know that some things work well (libva accelerated video decoding) and some things not so well (2D acceleration). You can mitigate that last problem by using Metacity's composited mode which makes dragging windows around a hell of a lot smoother, and is preferable to trying to use a 3D window manager like Compiz, which is a bit flaky on this chipset.

You can activate composited mode using gconf-editor and activating the options /apps/metacity/general/compositing_manager. You also get some nice shadows around your windows, which I think is good for usability.

Unfortunately you'll now find alt+tab'ing to be un-usably slow (1-2 sec delay before the switcher appears) since in composited mode, Metacity uses little downsampled screenshots of all your apps instead of good, recognisable icons. I don't know about you, but at 100x100 (or whatever) I struggle to tell the difference between a web browser and a wordprocessor.

So I poked around the Metacity source and found that you could hack out this 'feature' trivially. Check out the trunk from the Metacity SVN repos and apply this patch (which also has some minor changes to the constants used for the shadowing since I thought the defaults were a bit heavy handed):

Index: src/compositor/compositor-xrender.c
===================================================================
--- src/compositor/compositor-xrender.c	(revision 4239)
+++ src/compositor/compositor-xrender.c	(working copy)
@@ -232,11 +232,11 @@
 #define SHADOW_LARGE_RADIUS 12.0
 
 #define SHADOW_SMALL_OFFSET_X (SHADOW_SMALL_RADIUS * -3 / 2)
-#define SHADOW_SMALL_OFFSET_Y (SHADOW_SMALL_RADIUS * -3 / 2)
+#define SHADOW_SMALL_OFFSET_Y (SHADOW_SMALL_RADIUS * -3 / 2 + 1)
 #define SHADOW_MEDIUM_OFFSET_X (SHADOW_MEDIUM_RADIUS * -3 / 2)
-#define SHADOW_MEDIUM_OFFSET_Y (SHADOW_MEDIUM_RADIUS * -5 / 4)
+#define SHADOW_MEDIUM_OFFSET_Y (SHADOW_MEDIUM_RADIUS * -5 / 4 + 1)
 #define SHADOW_LARGE_OFFSET_X -15
-#define SHADOW_LARGE_OFFSET_Y -15
+#define SHADOW_LARGE_OFFSET_Y -12
 
 #define SHADOW_OPACITY 0.66
  
@@ -2829,6 +2829,7 @@
 xrender_get_window_pixmap (MetaCompositor *compositor,
                            MetaWindow     *window)
 {
+    return None;
 #ifdef HAVE_COMPOSITE_EXTENSIONS
   MetaCompWindow *cw = NULL;
   MetaScreen *screen = meta_window_get_screen (window);

Related tags: compositing, GMA 500, linux, metacity, Poulsbo