Window depth order messed up

Bug #1614050 reported by dronus
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
metacity (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

# Test Case
Described in comment https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/1614050/comments/16

# Impact
Sometimes the window depth order is wrong, for example the desktop icons appear above all windows. Also sometimes windows disappear and the only way to bring them back to life is restarting Metacity. This can result in loss of work results for users who do not know how to deal with this bug.

# Fix
The Xenial fix is composed of two upstream commits, in gnome-3-18 branch:
- https://git.gnome.org/browse/metacity/commit/?id=d5f9e42e30c67d07
- https://git.gnome.org/browse/metacity/commit/?id=72488dc76ee24a3e

# Regression Potential
The patch has been in Yakkety for almost a month, and nobody complained.
[bdmurray] - That's not a description of what could go wrong, rather one of what hasn't gone wrong in Yakkety. Please add some possible regressions and what users testing this fix should look out for.

=============================================================================
Using the gome-flashback session with metacity is totally messed up since I updated from Ubuntu 14.04.3 to 16.04.1.

All the effects mentioned here do not appear when using compiz, so I guess Metacity is broken.

-Windows that should open in front (like Kupfer) appear behind the windows already open.

-Before nemo is run, the Ubuntu default desktop background image appear, it can't be changed by settings. I just guess this is due wrong ordering of the true background and some window used by Gnome for showing the selected background.

-If nemo is run to take over the desktop, the destkop icons appear in front of all windows.

I guess all those effects originate from a similiar reason. None of these problems where appearant at Ubuntu 14.04.

This is a total show stopper for using metacity on 16.04 as everyday applications like nemo and Kupfer can't be used.

Revision history for this message
dronus (paul-geisler) wrote :

Maybe this relates to the bug first described by #1538111. It seems unrelated (all windows closing sometimes) but someone found out that the windows are still open, yet hidden behind the dekstop background window.

So this matches almost the situation when the dekstop icons appear in front. I just don't encounter the hidden windows because I do not use a background image I guess (just set a solid color).

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote : Re: [Bug 1614050] [NEW] Window depth order messed up

On Wed, Aug 17, 2016 at 1:45 PM, dronus <email address hidden> wrote:

> All the effects mentioned here do not appear when using compiz, so I
> guess Metacity is broken.
>

Please post Metacity version.

-Windows that should open in front (like Kupfer) appear behind the
> windows already open.
>

If that happens with more apps then please post apps that is affected. Does
it happens always?

-Before nemo is run, the Ubuntu default desktop background image appear,
> it can't be changed by settings. I just guess this is due wrong ordering
> of the true background and some window used by Gnome for showing the
> selected background.
>

That is because in Ubuntu nautilus is responsible for background. What you
see is just login screen image used as background in Metacity. In older
Metacity releases you would see just gray screen...

You can enable background in gnome-flashback module:
gsettings set org.gnome.gnome-flashback desktop-background true

But still it might not work good enough. :(

-If nemo is run to take over the desktop, the destkop icons appear in
> front of all windows.
>

Does it include also panels? Or only "normal" windows?

Revision history for this message
dronus (paul-geisler) wrote :

Version is Metacity 3.18.5.

However, I can't reproduce the bug, which occured about 36 hours ago. The apt logs do not show any update for Metacity since. All effects mentioned are gone, Metacity behaves as of it's Ubuntu 14.04 pendant some days ago: Desktop icons are on the desktop, Kupfer opens in front of all windows.

This matches the behaviour of the other bug linked, which is also rarely triggered.

Maybe it was triggered by running nemo late (nemo wasn't started with the session as usual due to unknown reason).

I will use Metacity for daily routine now, we'll see if it happens again.

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Please post info about your video card and driver you use. I will try nemo when I will have some free time with hope I will be able to reproduce this...

Revision history for this message
dronus (paul-geisler) wrote :

I am using Ubuntu 16.04.1 stock intel driver on an integrated Intel Sandybridge Mobile GPU.

Revision history for this message
dronus (paul-geisler) wrote :

I finally was able to reproduce it. Turns out it happens only once after system startup, if I log out of the session and log in again, the bug is gone.

Steps to reproduce:
-Make sure no desktop file manager runs in the session (eg. remove it from the session / xdg autostart locations)
-Start a gnome-flashback no effects session (Metacity)
-Wait for the desktop (appears empty due to no file manager)
-Run the 'nemo' file manager, set to overtake the desktop too
-The file window appears, the desktop icons too, but the are in front of the window.
-Close the window, the desktop appears to be normal
-Open any other application, it appears behind the icons again.
-Log out from the session
-Start a gnome-flashback no effects session again
-all is fine now.

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Do you have virtual box? Can you reproduce it also there? I just tried and it looks like I can not reproduce it. :( Will try on laptop when I will have time to restart it.

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Dmitry, maybe you can reproduce?

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Can you apply this patch? Then reproduce bug and attach metacity-* log file from /tmp here?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in metacity (Ubuntu):
status: New → Confirmed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-compositor-log-debug-info.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
crc32 (crc32) wrote :

This bug effects me too. I'm on an Intel on board card. this is a show stopper for me too. Guess I'll have to use compiz now. :(

00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Can someone please apply patch, reproduce bug and post log file? Or should I create PPA for this?

I can not reproduce this bug... I hope that attached patch will help understand what is going on, if not - will try to create other patch until I will find what is causing this problem.

Revision history for this message
Wei Tsui (ghostplant) wrote :

I have to say that I have given up using metacity for nearly two months because I encountered this issue all the time since using it and cannot find a way to reproduce it intentionally. Instead, I am using macro:yakkety which is also based on GTK3 and it works well and stablely.

I can confirm that metacity:trusty doesn't has this issue but metacity:xenial has this issue.

And I can also confirm that metacity:xenial has this issue on virtualbox as well.

Revision history for this message
Wei Tsui (ghostplant) wrote :

I recommend Alberts to use nemo 3.18 on ubuntu 16.04 and keep using for several days because I think nemo background is more possible to cover all windows than nautilus background under the management of metacity.

Nemo 3.18 is only integrated with ubuntu 14.04. If it's hard to find a nemo repo for gnome desktop and compiled with ubuntu 16.04 libraries, here is one:

http://ppa.launchpad.net/ghostplant/flashback/ubuntu/pool/main/n/nemo/

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Ok, finally I am able to reproduce this bug. It looks like steps are very simple:
- kill kupfer and nautilus if running
- start kupfer
- start nautilus

So in my case nautilus must be started after kupfer to trigger this bug.

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

I hope that finally we can close this bug. :) Please test 1:3.18.7-0ubuntu0.1ppa1 version from my PPA:
https://launchpad.net/~albertsmuktupavels/+archive/ubuntu/metacity-3-18

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Can anyone confirm that version in my ppa does fix problem?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package metacity - 1:3.20.3-1ubuntu2

---------------
metacity (1:3.20.3-1ubuntu2) yakkety; urgency=medium

  * Backport upstream patch to fix stack order handling when windows
    are unmapped (no_remove_on_unmap.diff, LP: #1614050).

 -- Dmitry Shachnev <email address hidden> Tue, 04 Oct 2016 15:57:03 +0300

Changed in metacity (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Wei Tsui (ghostplant) wrote :

Hi, metacity in Ubuntu xenial should apply for this patch as well.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Cui Wei, can you please first confirm that it fixes your issue?

Revision history for this message
Wei Tsui (ghostplant) wrote :

I am not sure whether it is indeed fixed without a long-term testing procedure, but I could say that didn't encounter this issue again after using it for 4-5 days. So at least, the ppa version with this patch is no-doubt more stable that the current one in ubuntu mainstream repository.

Revision history for this message
Wei Tsui (ghostplant) wrote :

Hey, Alberts, what about the progress to port the fixed update to xenial source?

Another question is that, are you confirmed that the issue only happened in composite mode?

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

That is question for Dmitry. I think he was waiting for confirmation if this fix works.

No, I did not try to reproduce without compositor. But I think it is/was compositor problem.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Yes, I was waiting for confirmation. But I can do an upload this week anyway.

Revision history for this message
Wei Tsui (ghostplant) wrote :

I didn't find any messed up at the moment, and I suggest more persons to use and test on it.

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Uploaded the fix into Xenial SRU queue. Sorry for the delay.

description: updated
Revision history for this message
Wei Tsui (ghostplant) wrote :

Is the updated version 3.18.7-0ubuntu0.1 in xenial?

Revision history for this message
Wei Tsui (ghostplant) wrote :

Oops.. I am using 3.18.7-0ubuntu0.1 and I have this issue again. I don't know whether this version is the updated one you said.

Revision history for this message
Wei Tsui (ghostplant) wrote :

I still recommended what I had done when I had this issue (composite-manager is enabled):

I opened a gnome-terminal, clicked "Help -> About GNOME terminal", then I see an about dialog belonging in front of me, then I clicked "Close" button at the right-bottom of this dialog to close it, but both of the about-dialog and gnome-terminal-main-window disappear, and they were never displayable again unless restarting metacity.

After restarting metacity, gnome-terminal-main-window appeared again, then I tried to re-do the above steps but it was not reproducible this time ...

Revision history for this message
Wei Tsui (ghostplant) wrote :

If I use metacity with composite-manager disabled, mouse pointer mapping to object position messed up sometimes. For example, if I open a dialog, and I wanna click a button from that dialog, sometimes it's useless no matter how many times I clicked on it, the button seems not to be even pressed down. It is likely that I am clicking on another position because the OS is not busy and other programs work smoothly. After I restart metacity, it is not restarted successfully but fall back to login session which indicate my window manager crash down. I am sure this issue happened several months ago and it is another bug from metacity with composite-manager disabled, not related to metacity/+bug/1614050.

Revision history for this message
Wei Tsui (ghostplant) wrote :

I think metacity after 14.04 really goes into a bad state, is it possible to have a full refactor on it? I'll still choose to use marco-gtk3 temperarily.

Revision history for this message
Wei Tsui (ghostplant) wrote :

For comment #31, 'recommended' should be 'remembered'

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

You are using old/buggy version. Fix will be available in 1:3.18.7-0ubuntu0.2 version.

Please use/test version from my ppa. Your reported problem with GNOME Terminal is most likely same problem that should be fixed.

If you have other bugs, please report as separate bugs. Ideally with steps how to reproduce. What dialog? From what application? Is it server side decorated or client side? Button from were? In decorations (close, maximize...) or button in application window?

Revision history for this message
Wei Tsui (ghostplant) wrote :

Sure, waiting for your update in ppa.

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

What update?

https://launchpad.net/~albertsmuktupavels/+archive/ubuntu/metacity-3-18
1:3.18.7-0ubuntu0.1ppa1

Note that PPA version is 1:3.18.7-0ubuntu0.1ppa1, but you have 1:3.18.7-0ubuntu0.1 according to your comments.

Revision history for this message
Wei Tsui (ghostplant) wrote :

I didn't find 3.18.7-0ubuntu0.2 in your ppa, have you updated it?

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

1:3.18.7-0ubuntu0.2 is official upload waiting in queue:
https://launchpad.net/ubuntu/xenial/+queue?queue_state=1&queue_text=

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello dronus, or anyone else affected,

Accepted metacity into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/metacity/1:3.18.7-0ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

description: updated
Changed in metacity (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Dane Maslen (dane-maslen) wrote :

I have now installed the package from the -proposed repository. I was suffering the effects of the bug every day or two (and did not know what particular sequence of actions by me was triggering it), so I'll need a week or more to become reasonably confident that the bug is no longer affecting me. On the other hand if it is still affecting me, I'll probably now within a couple of days.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Can somebody who experienced this bug before and did not get it with the new version, mark this bug as verification-done?

Revision history for this message
Wei Tsui (ghostplant) wrote :

I keep using it till now and don't find anything wrong.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

OK, I think comment #41 and comment #43 are enough to mark it verification-done.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Wei Tsui (ghostplant) wrote :

Thanks,

when could this issue be to "fixed released"?

Revision history for this message
Dane Maslen (dane-maslen) wrote :

And just for the record I'll add that in the week or so since I installed the package from the -proposed repository I have had no recurrence of either of the two symptoms (wrong window displayed on top, all windows displayed behind desktop background) that I had previously been encountering every day or two.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Dane, thanks for confirmation!

Cui, when a member of SRU team reviews it, probably in the beginning of next week.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package metacity - 1:3.18.7-0ubuntu0.2

---------------
metacity (1:3.18.7-0ubuntu0.2) xenial; urgency=medium

  * Backport upstream commits to fix stack order handling when windows
    are unmapped (no_remove_on_unmap.diff, LP: #1614050).

 -- Dmitry Shachnev <email address hidden> Mon, 31 Oct 2016 15:49:42 +0300

Changed in metacity (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for metacity has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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