Windows switch monitor after resuming from sleep

Bug #1927948 reported by Alexander List
72
This bug affects 13 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Unknown
Unknown
Mutter
Unknown
Unknown
gnome-shell (Ubuntu)
Undecided
Unassigned
mutter (Ubuntu)
Undecided
Unassigned

Bug Description

What I expect:

Window layout/positioning is identical after resume from sleep.

What I observe:

After resume from sleep, windows appear on a different monitor than before.

I found this possibly relevant GNOME bug:

https://gitlab.gnome.org/GNOME/mutter/-/issues/1419

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: mutter 3.38.4-1ubuntu2
ProcVersionSignature: Ubuntu 5.11.0-16.17-generic 5.11.12
Uname: Linux 5.11.0-16-generic x86_64
ApportVersion: 2.20.11-0ubuntu65
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Mon May 10 13:40:28 2021
InstallationDate: Installed on 2019-12-02 (524 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
SourcePackage: mutter
UpgradeStatus: Upgraded to hirsute on 2021-05-05 (4 days ago)

Revision history for this message
Alexander List (alexlist) wrote :
Revision history for this message
Alexander List (alexlist) wrote :

I have a Dell XPS 13 7390 2-in-1 with two external monitors.

The first external monitor is connected via USB-C/Thunderbolt, the second one via DP from the first external monitor.

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

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

Changed in mutter (Ubuntu):
status: New → Confirmed
Revision history for this message
anastasios0513 (anastasios0513) wrote :

First time posting on this forum; apologize in advance if I am not doing this right.

I have the same problem. I have three monitors (1 4k, 2 1080p [1 16:10 and 1 16:9]). 1080p 16:10 monitor is set as primary display, but is Monitor 2 in the physical connections.

Stuff on primary monitor (16:10) stays put; stuff on the 4k monitor and the secondary 16:9 monitor move around.

$ sudo lshw -class display
  *-display
       description: VGA compatible controller
       product: Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:01:00.0
       version: e7
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=amdgpu latency=0
       resources: irq:209 memory:a0000000-afffffff memory:b0000000-b01fffff ioport:5000(size=256) memory:b0900000-b093ffff memory:c0000-dffff

Attachment:

1. output of dbus-send --session --print-reply --dest=org.gnome.Mutter.DisplayConfig /org/gnome/Mutter/DisplayConfig org.gnome.Mutter.DisplayConfig.GetCurrentState

2. output of ls /sys/class/drm/*/edid | xargs -i{} sh -c "echo {}; parse-edid < {}"

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Revision history for this message
Greg Fawcett (foxylad) wrote :

This is happening to me too. Fresh install of Debian 11, primary DP landscape, secondary HDMI portrait. Two effects:

1. A window on the right of the primary screen moves to the left of the primary screen. Another window on the left of the primary screen does not move. The moving window also resizes, although this contains Terminal and may be resizing to default row/column settings.

2. A maximised window on the secondary screen is moved down so there is a one-line gap at the top, despite still being maximised. Un-max/max removes the gap.

It seems to happen when screen is blanked. I have disabled screen locking so don't know if it happens when screen locked too.

Revision history for this message
Nicholas Klopfer-Webber (ottago) wrote :

Its a shame a new issue was created for this. The problem has been around for over 7 years and by creating a new ticket it looses just how many people this affects.

https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1295267

In my case, I have 3 monitors connected to a Dell Latitude laptop. One of the monitors seems to take longer to wake up than the others. As stated by others, this delay causes some windows to move from one to another. Chrome's windows are stable, but they implemented everything them selves so we can exclude them. Gnome terminals, Remmina windows, KeePassX all move around.
It is related to the slow monitor issue because Gnome terminals often get resized which indicates they have been migrated to another windows and squished to fit the smaller resolution.

Maybe a fix would be to allow a delay to be set between waking up the screen and when they appear so we don't trigger the shuffling of windows. However really the issue is they are not being restored back to their original position after monitor plug events.

Revision history for this message
Timur Tabi (timur-tabi) wrote :

Would it be possible to "lock" the monitor configuration so that even if Ubuntu does not detect all of the monitors, it doesn't care?

I understand that one laptops and some other systems, changes in the monitors are common. But I have a desktop PC with two monitors attached, and that does not change.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think the best place for continuing this discussion is with the developers at either:

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2092
https://gitlab.gnome.org/GNOME/mutter/-/issues/1419

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

Other bug subscribers

Remote bug watches

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