GNOME Bugzilla – Bug 658036
Flicker upon session start
Last modified: 2014-06-03 21:10:50 UTC
Originally reported at: https://bugs.launchpad.net/bugs/820553 The screen flickers upon session start (seems I get a filled rectangle for every element that's about to get drawn). Attaching a clip of it happening in VirtualBox, but it also happens on two actual systems (Intel HD 2000 and 3000). (attachment is in launchpad)
Note that this is with compositing enabled (/apps/metacity/general/compositing_manager set to True)
The actual flickering comes the debug mode controlled by"show_redraw" which runs this piece of code in compositor-xrender.c: if (DISPLAY_COMPOSITOR (display)->show_redraw) { Picture overlay; dump_xserver_region ("paint_all", display, region); /* Make a random colour overlay */ overlay = solid_picture (display, screen, TRUE, 1, /* 0.3, alpha */ ((double) (rand () % 100)) / 100.0, ((double) (rand () % 100)) / 100.0, ((double) (rand () % 100)) / 100.0); XRenderComposite (xdisplay, PictOpOver, overlay, None, info->root_picture, 0, 0, 0, 0, 0, 0, screen_width, screen_height); XRenderFreePicture (xdisplay, overlay); XFlush (xdisplay); usleep (100 * 1000); } DISPLAY_COMPOSITOR (display)->show_redraw seems to not be initialised at Metacity start. This patch sets it to false on start, fixing the issue: diff -Naur metacity-2.34.1.old//src/compositor/compositor-xrender.c metacity-2.34.1//src/compositor/compositor-xrender.c --- metacity-2.34.1.old//src/compositor/compositor-xrender.c 2011-09-13 16:47:30.401946870 +0200 +++ metacity-2.34.1//src/compositor/compositor-xrender.c 2011-09-13 16:50:54.559380264 +0200 @@ -3090,6 +3090,8 @@ xrc->atom_net_wm_window_type_toolbar = atoms[12]; xrc->atom_net_wm_window_type_dropdown_menu = atoms[13]; xrc->atom_net_wm_window_type_tooltip = atoms[14]; + xrc->show_redraw = FALSE; + xrc->debug = FALSE; #ifdef USE_IDLE_REPAINT meta_verbose ("Using idle repaint\n");
@Gerry: I confirm this works very well and remove all artefacts at startup (as the screen isn't redrawn then). Thanks!
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.