After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658036 - Flicker upon session start
Flicker upon session start
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
trunk
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2011-09-02 08:27 UTC by Mardy
Modified: 2014-06-03 21:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mardy 2011-09-02 08:27:49 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)
Comment 1 Didier Roche 2011-09-06 07:24:54 UTC
Note that this is with compositing enabled (/apps/metacity/general/compositing_manager set to True)
Comment 2 Gerry Boland 2011-09-13 15:39:06 UTC
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");
Comment 3 Didier Roche 2011-09-14 05:49:04 UTC
@Gerry: I confirm this works very well and remove all artefacts at startup (as the screen isn't redrawn then). Thanks!
Comment 4 Alberts Muktupāvels 2014-06-03 21:10:50 UTC
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.