Windows "lost" when switching from mirrored displays and back

Bug #733603 reported by scm
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz Core
Expired
Undecided
Unassigned
compiz (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: compiz

Originally reported as part of LP#732867 (relevant bits re-pasted).

This happens on Lucid 10.4.02 with gnome-control-center version 1:2.30.1-0ubuntu1 and compiz 1:0.8.4-0ubuntu15

For what it's worth, I have reproduced this issue on a Lenovo X200 and have users internally who can reproduce this issue on a Lenovo X201 and a T410 on several different types and sizes of external monitor (all attached via display port -> DVI converters).

- Windows "get lost" when display properties change.

Here's how to reproduce:

- Install Lucid Laptop on an X200
- Attach the laptop to a docking station connected by display port -> dvr to a 24" monitor
- Configure (system -> preferences -> monitor) displays to not be mirrored, show monitors in panel checked, drag the monitor to a different orientation, and increase the resolution in the monitor to something other than what the laptop has.
- Open a web browser, put it in the 24" display.
- Open a terminal and a gnome app (I used gnome mine) in the laptop display.
- Detach the laptop (without suspending) to simulate going to a meeting, etc. Note that you can not reproduce this by simply re-applying the configuration with mirroring on and off.

At this point the first bug (about windows getting messed up) occurs. Notice that, while the browser window is moved to the laptop display, the gnome mines and original terminal disappeared. If I open a new terminal and run ps, I can see they're still running, but they're not on any of my visible/accessible displays.

- Re-attach the laptop to the docking station

At this point, the second bug is reproduced. The monitor configuration has reverted to "mirrored displays." When I reset my preferences to what I want, the original browser window (as well as the preferences window) moves to the 24" monitor, but my gnome mines are still missing, as well as the original terminal (the new terminal I opened in the laptop while detached in order to check for the disappeared window's pids is moved to the new monitor).

To which I was asked to split into separate issues:

Evan Broder wrote:

"By default, GNOME runs with 4 virtual workspaces. For your first bug, I suspect that the windows you are "losing" are actually on a different virtual workspace. Try pressing Ctrl-Alt-Right arrow and see if your windows are there. Your window manager is responsible for reconfiguring windows when the monitor layout changes. This is a distinct bug from the other behavior you described, so it would be helpful if you could split that issue out to a different bug report. It should be filed against either the compiz package (if you have visual effects turned on) or the metacity package (if you have visual effects off)."

I had checked all the virtual desktops to no avail, and I just re-created the bug again, and still have nothing on the desktops. I will see if I can take some screenshots to demonstrate this appropriately. I suspect that something is "remembering" the additional virtual workspaces that were created when I turned off mirroring. What's odd is that I can't find it again when I turn mirroring back off.

It is also worth noting that if I log out, and log back in, I get back to my desired, unmirrored display (or if I reboot and log back in), though the login screen is still mirrored.

I will attach several screenshots that show the problem.

Tags: glucid lucid
Revision history for this message
scm (scm) wrote :
Revision history for this message
scm (scm) wrote :
Revision history for this message
scm (scm) wrote :
Revision history for this message
scm (scm) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

Thanks for the screenshots.

Just to confirm, you're saying that the process of the window on your built-in display is still running (according to ps) but it's not showing up in the task bar in the bottom panel?

Revision history for this message
Martin Pool (mbp) wrote :

I tested this on Natty with Unity (based on compiz). (See also bug 745112 about an external monitor at all on natty.)

I set up two side-by-side screens, using an external monitor connecting through the docking base and displayport.

I think undocked the laptop (without pressing the prepare-to-eject button), and removed it. I can see in the panel that the applications are still running but their windows are all off the screen. If I double click on say Chrome, which has multiple windows open, I get the exposé type view, but selecting one there does not bring it back on the screen.

By contrast if I turn the external monitor off in the control panel then all the windows are shuffled to fit on the current screen.

I would speculate that when the machine is undocked, something lower in the stack (X?) either doesn't notice this has happened, or doesn't send a xrandr reconfiguration event, or compiz doesn't respond to it in the same way it would handle a software-initiated reconfiguration.

Revision history for this message
Martin Pool (mbp) wrote :

I also tested pressing the hardware "prepare to eject" button near the eject lever on the base. That spins down my base's hdd, but it doesn't affect the displays: the external one keeps working until I physically remove the laptop.

After popping out the laptop, I see I can still move the mouse pointer above the top of the laptop's screen, which suggests to me it thinks the external display is still there, and that's why it has not moved the windows.

However, interestingly, if I close and restart the monitors control panel, it does notice that the external monitor has gone, and it then shuffles the windows onto the internal screen.

When I reconnect the external monitor, it goes back to side-by-side mode (not mirrored as scm experienced in lucid) and the windows that were on the big monitor go back to it.

So, without jumping to conclusions, I think the problem is that X does not notice the monitors were reconfigured when the machine is undocked. I'm pretty sure Windows does notice, so it is physically possible.

Revision history for this message
Martin Pool (mbp) wrote :

After undocking I see both monitors are now mentioned in the monitors indicator, which is further evidence X hasn't noticed it's gone.

Actually, my last comment about restoring the window positions when re-docking is not quite true. The ones that were on the external monitor are back where they should be, but now windows that were on the internal monitor have also moved there. I think that is a separate bug. So now we have

* bug 732867: after redocking monitors are mirrored instead of resuming their previous configuration (not reproducible on natty)
* bug 733603: X doesn't notice external monitor's gone when machine is undocked
* new bug? windows don't return to their positions when reconnecting an external monitor

Revision history for this message
Martin Pool (mbp) wrote :

I also tried pressing Fn-F9, which is another "undock" key (that I didn't know about until today), and it has the same effect as the hardware prepare-to-undock switchi.

Interestingly, James Jesudason says for him pressing that key mirrors the displays, but it doesn't for me.

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner. There have been many changes in Ubuntu since that time you reported the bug and your problem may have been fixed with some of the updates. Compiz, in particular, is in heavy development and this bug may have been fixed in the development version of Ubuntu (12.04) if not on your current version. If you are able, it would be of great help if you could confirm if the bug still exists by testing a livecd (available at ubuntu.com). When you test it and it is still an issue, kindly upload the updated logs by running apport-collect <bug #> and any other logs that are relevant for this particular issue. If you are unable to test the development version, please let us know if you are able to reproduce this issue on Ubuntu 11.10.

Thank you for your help and patience.

Changed in compiz (Ubuntu):
status: New → Incomplete
Changed in compiz-core:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Compiz Core because there has been no activity for 60 days.]

Changed in compiz-core:
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for compiz (Ubuntu) because there has been no activity for 60 days.]

Changed in compiz (Ubuntu):
status: Incomplete → Expired
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.