Switching workspaces does not always redraw everything necessary

Bug #778083 reported by Sven Berkvens-Matthijsse
56
This bug affects 9 people
Affects Status Importance Assigned to Milestone
metacity (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

This bug may be related to metacity, but I am uncertain of that.

Since I upgraded to Natty, I've been having a problem when logging in with the Gnome desktop (the Unity desktop is not available for me because my graphics card has no available 3D driver). I've defined eight workspaces, arranged in a 4x2 fashion. When I switch workspaces, using CTRL-ALT-{left,right,up,down}-arrow, sometimes something (I suspect metacity) does not redraw everything that needs to be drawn. Especially window borders belonging to windows that are located on the previous workspace are sometimes left over on the new workspace, but only on top of windows located there, not on the background.

This is, however, not always the case, and I cannot seem to figure out when it does and does not happen. If I trigger a complete screen redraw, for example from a terminal by triggering the visual bell, then everything is restored to how it is supposed to look.

I've attached four images: one of the workspace at (1,2) (on which I'm filling in this bug report), one of the Gnome Terminal at (2,2) and one of the Gnome Terminal at (1,2). When I'm viewing workspace (1,2), then switch to (2,2) using CTRL-ALT-down-arrow, wait a second (keep on pressing CTRL and ALT) and then switch to (1,2) using CTRL-ALT-left-arrow, then I get (part of) the borders of the Gnome Terminal on (2,2) drawn onto the Gnome Terminal at (1,2).

As stated, I'm not sure which package is responsible (for all I know, perhaps the graphics driver is buggy and does not draw everything that it's told to, although I don't have any other drawing problems).

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: metacity 1:2.30.3-0ubuntu8
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
Architecture: i386
Date: Thu May 5 21:21:53 2011
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
SourcePackage: metacity
UpgradeStatus: Upgraded to natty on 2011-04-16 (18 days ago)

Revision history for this message
Sven Berkvens-Matthijsse (sven-launchpad) wrote :
Revision history for this message
RedSingularity (redsingularity) wrote :

I would like to assign this to the proper graphics driver set. What card are you using? You can find out in the terminal by typing:

lspci

Thanks.

Revision history for this message
Sven Berkvens-Matthijsse (sven-launchpad) wrote :

Hello RedSingularity,

My display controller from the lspci -v output is:

01:05.0 VGA compatible controller: ATI Technologies Inc RS482 [Radeon Xpress 200M] (prog-if 00 [VGA controller])
 Subsystem: Micro-Star International Co., Ltd. Device a422
 Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 17
 Memory at c0000000 (32-bit, prefetchable) [size=256M]
 I/O ports at 6800 [size=256]
 Memory at ff2f0000 (32-bit, non-prefetchable) [size=64K]
 Expansion ROM at ff2c0000 [disabled] [size=128K]
 Capabilities: [50] Power Management version 2
 Kernel driver in use: radeon
 Kernel modules: radeon, radeonfb

Hope this is sufficient information. If not, please ask for more!

With kind regards,
Sven

Revision history for this message
Sven Berkvens-Matthijsse (sven-launchpad) wrote :

A little more information: this also happens if I switch workspaces using the "Workspace Switcher" panel widget (not using the CTRL-ALT-arrow keys, just clicking on a workspace with the left mouse button). This does not draw the 4x2 workspace miniatures transient window, but still corrupts the new workspace by leaving old windows' borders.

Revision history for this message
Sven Berkvens-Matthijsse (sven-launchpad) wrote :

Hmmm, a little more use of the system reveals that sometimes also parts of the Gnome Panel get corrupted. This COULD possibly be related to tooltips being displayed there when switching workspaces, although I'll need to test this further. Also, sometimes, parts of my Gnome Terminal display the background image instead of its own contents; in this case, I am sure that that is related to a tooltip being displayed there before switching workspaces, as the dimensions and position of the see-through-background is exactly that of the tooltip.

Revision history for this message
Greg Edwards (gedwards) wrote :

This isn't specific to a particular graphics chipset. I see the behavior on a laptop with an Intel GMA4500:

00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) (prog-if 00 [VGA controller])
 Subsystem: Hewlett-Packard Company Device 30dd
 Flags: bus master, fast devsel, latency 0, IRQ 46
 Memory at d0000000 (64-bit, non-prefetchable) [size=4M]
 Memory at c0000000 (64-bit, prefetchable) [size=256M]
 I/O ports at 60f0 [size=8]
 Expansion ROM at <unassigned> [disabled]
 Capabilities: <access denied>
 Kernel driver in use: i915
 Kernel modules: i915

and also on a workstation with an nVidia Quadro FX 4800:

60:00.0 VGA compatible controller: nVidia Corporation GT200GL [Quadro FX 4800] (rev a1) (prog-if 00 [VGA controller])
 Subsystem: nVidia Corporation Device 0594
 Physical Slot: 2
 Flags: bus master, fast devsel, latency 0, IRQ 28
 Memory at f2000000 (32-bit, non-prefetchable) [size=16M]
 Memory at d0000000 (64-bit, prefetchable) [size=256M]
 Memory at f0000000 (64-bit, non-prefetchable) [size=32M]
 I/O ports at 2000 [size=128]
 Expansion ROM at <unassigned> [disabled]
 Capabilities: <access denied>
 Kernel driver in use: nvidia
 Kernel modules: nvidia-current, nouveau, nvidiafb

On both of these systems, I am running in "Ubuntu Classic" mode.

Revision history for this message
RedSingularity (redsingularity) wrote :

Ok. I assume you are using the 'metacity' window manager on both computers. Could you temporarily switch to compiz/emerald and see if the issue remains?

Revision history for this message
Sven Berkvens-Matthijsse (sven-launchpad) wrote :

I tried to do this as well, as I initially thought it might have something to do with metacity, but I can't seem to switch window managers: the Appearance setting program does not have the fourth tab that it used to have (Effects or something similar). Has this choice been moved to another settings program, or does the program simply not offer the choice if there is nothing to choose (as stated earlier, my system has a limited graphics driver).

I tried manually doing it from the command line by running "compiz --replace" but that basically got me one single workspace to work on (I probably need to configure more workspaces in the Compiz settings system), but then it crashed on me with a segmentation fault, leaving me window-manager-less. Because the input focus did not work any longer, I had to run "metacity --display :0" from a console terminal to get the session working again.

Revision history for this message
RedSingularity (redsingularity) wrote :

Alright. I am going to move this to the xserver package. If the maintainers want, they will move it to a more 'suited' package.

affects: ubuntu → xorg-server (Ubuntu)
Revision history for this message
Alin (alin-popa) wrote :

This is something that I saw on my configuration too and this is my graphics card conf:
ATI Technologies Inc Cedar PRO [Radeon HD 5450]
I'm also using Metacity (instead of Compiz).

Alin

Revision history for this message
Pauli Virtanen (pauli-virtanen) wrote :

I'm seeing the same thing, on Intel 945GME. Happens when using Metacity, but not when using Compiz.

Revision history for this message
Sven Berkvens-Matthijsse (sven-launchpad) wrote :

A question for the other people who are also affected by this problem: does the remaining-border-corruption ever happen to you on non-Gnome-Terminal windows? I've been experimenting with some other windows, such as a calculator or other small windows, and they never seem to have any residue left over on them. Only Gnome Terminals seem to suffer from this problem. Can any of you confirm or deny this?

Revision history for this message
Alin (alin-popa) wrote : Re: [Bug 778083] Re: Switching workspaces does not always redraw everything necessary

This is happening for me for other applications, not only gnome-terminal
(pidgin chat window is one of the examples).

Alin

On Mon, May 9, 2011 at 9:40 PM, Sven Berkvens-Matthijsse <
<email address hidden>> wrote:

> A question for the other people who are also affected by this problem:
> does the remaining-border-corruption ever happen to you on non-Gnome-
> Terminal windows? I've been experimenting with some other windows, such
> as a calculator or other small windows, and they never seem to have any
> residue left over on them. Only Gnome Terminals seem to suffer from this
> problem. Can any of you confirm or deny this?
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/778083
>
> Title:
> Switching workspaces does not always redraw everything necessary
>
> To unsubscribe from this bug, go to:
>
> https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/778083/+subscribe
>

Revision history for this message
Sven Berkvens-Matthijsse (sven-launchpad) wrote :

More corruption, not only window borders. I've attached an image where part of a pop-up-context-menu in Thunderbird is not being drawn.

Another thing: when the corruption happens in the Gnome Panel, as in the image that I've already attached in #5, it's the actual desktop background that gets displayed instead of the Gnome Panel. In the example image of #5, it looks black, but choosing another background reveals that it's the background that's being displayed instead of the Gnome Panel.

Revision history for this message
Sven Berkvens-Matthijsse (sven-launchpad) wrote :

I've more or less confirmed that metacity is at fault: I've copied /usr/bin/metacity from a Lucid machine to /tmp and ran "/tmp/metacity --replace". This causes the Lucid version of metacity to take over. I've not had any corruption with that version (it's a miracle that it works with Natty's libraries, taking into account that it's a year older, but it does!).

Revision history for this message
Alin (alin-popa) wrote :

Sven's solution worked for me also, I didn't noticed weird corruptions after
replacing the metacity with an older one (10.10). Beside of that, I
encounter a pretty similar problem when playing with the tooltip on the
'workspaces' preferences in the bottom right corner of the desktop (see the
attached screenshot) - a small purple area remain unrefreshed in the place
where the tooltip was raised. Anyone else experience this strange thing ?
Sorry if this is not really related to this defect, but this appeared to be
fine when replacing the metacity binary.

Alin

On Tue, May 10, 2011 at 12:46 AM, Sven Berkvens-Matthijsse <
<email address hidden>> wrote:

> I've more or less confirmed that metacity is at fault: I've copied
> /usr/bin/metacity from a Lucid machine to /tmp and ran "/tmp/metacity
> --replace". This causes the Lucid version of metacity to take over. I've
> not had any corruption with that version (it's a miracle that it works
> with Natty's libraries, taking into account that it's a year older, but
> it does!).
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/778083
>
> Title:
> Switching workspaces does not always redraw everything necessary
>
> To unsubscribe from this bug, go to:
>
> https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/778083/+subscribe
>

Changed in xorg-server (Ubuntu):
status: New → Incomplete
status: Incomplete → New
status: New → Confirmed
Revision history for this message
Sven Berkvens-Matthijsse (sven-launchpad) wrote :

Alin,

Yes, the tooltips also corrupt my display as you describe. I've described this (although without a screenshot) in comment #5.

With kind regards,
Sven

Revision history for this message
Alin (alin-popa) wrote :

Hi guys,

Anyone got a workaround for this thing ? Maybe some patched metacity or smth will be great.

Thanks,
Alin

Revision history for this message
Dave Wolfe (dave-wolfeworks) wrote :

I've seen this corruption problem when switching workspaces since upgrading to 11.04 from 10.10. It's worst for gnome-terminals, i.e. going from Thunderbird (after reading mail or even just selecting various folders) and then switching to a workspace with at least one gnome-terminal window. Sometimes it redraws the window contents correctly, sometimes it has part or all of the overlaying Thunderbird image in the g-term contents, sometimes just the window border is corrupted, sometimes it flashes the correct window contents then redraws the previous workspace contents, etc.

I have been able to make the problem go away by unchecking the auto-focus feature (System/Preferences/Windows/Select windows when the mouse moves over them). PITA but no more than selecting a blank workspace between each workspace change.

What's it going to take to get the importance of this bug set to high and assigned to someone to get it fixed?

Revision history for this message
Sven Berkvens-Matthijsse (sven-launchpad) wrote :

Hi Dave,

I agree with you that it has been very quiet in this bug report lately, even though the problem still exists and must be affecting more people than those who have found this bug report.

Anyway, a temporary solution, as stated in #15 and #16, is to copy an older Ubuntu's metacity and run that instead of the one that you're having trouble with.

--
Sven

Revision history for this message
Sven Berkvens-Matthijsse (sven-launchpad) wrote :

According to various observations in this bug report (especially #15 and #16), I believe this is not an X server bug but a bug in Metacity.

affects: xorg-server (Ubuntu) → metacity (Ubuntu)
Revision history for this message
Paulus (paulmd-ya) wrote :

Hi.

The solution in Bug #802747 looks very promising. At least looks like it fixed the glitches for me.

Revision history for this message
Dave Wolfe (dave-wolfeworks) wrote :

Hi Paulus,

Thanks for the data point, but my failure to redraw doesn't seem to be related to #802747: /apps/metacity/general/capture_before_unmap is set to false but if I change the preferences setting to select windows on mouseover, capture_before_unmap remains false but terminal windows fail to redraw properly, so that's not the whole problem, if it's even related at all.

Revision history for this message
Jussi Rintanen (jrintanen-jr) wrote :

Me too: I believe that the bug is related to the option of selecting windows when the mouse is over the window. I have two computers, an old Dell D610 laptop with an Intel graphics card, and an equally old Dell Dimension 5150 with an old ATI Radeon, both having some windows not redrawn when switching workspaces. If I have windows selected when clicking them, then the problem disappears and windows are redrawn properly.

Revision history for this message
computermacgyver (computermacgyver) wrote :

This bug affects my installation of Natty as well when running in the No-effects version session. It happens with many programs, not just gnome-terminal.

Enabling composting in metacity or using compiz fixes the issue, but adds visual candy that I dislike and seems to also cause occasional GPU hangs (already filed in another bug report). So I do think this is a metacity issue; however, I have the same behavior when using Openbox as my window manager in gnome, which may or may not be related.

Revision history for this message
dino99 (9d9) wrote :

This version has expired

Changed in metacity (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.