Windows switch monitor after resuming from sleep

Bug #1927948 reported by Alexander List
102
This bug affects 18 people
Affects Status Importance Assigned to Milestone
GNOME Shell
New
Unknown
Mutter
Fix Released
Unknown
gnome-shell (Ubuntu)
Confirmed
Medium
Unassigned
mutter (Ubuntu)
Confirmed
Medium
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

Changed in gnome-shell (Ubuntu):
status: Confirmed → Won't Fix
Changed in mutter (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

See also bug 1778983.

tags: added: jammy
removed: hirsute
Changed in gnome-shell (Ubuntu):
status: Won't Fix → Confirmed
Changed in mutter (Ubuntu):
status: Won't Fix → Confirmed
Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
Changed in mutter (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Mark Edmunds (markedmunds1907) wrote :
Download full text (3.3 KiB)

I believe I too am affected by this problem.

I have three monitors attached to my system all on the same GTX950 (GM206) adapter and after waking up from sleep the active windows move around and most annoyingly the system often struggles to 'find' all three monitors again - even though it shoes them in the display settings dialog.

Sometimes it will only see two. Sometimes finds them all but mirrors two. Meaning I have to turn monitors on and off until they play ball which can take some time for the system to recognise them all again.

The system works fine if I reboot it but on sleep it goes wrong.

Doing a xrandr shows this:

xrandr
Screen 0: minimum 8 x 8, current 7680 x 2160, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 596mm x 335mm
   3840x2160 30.00*+ 29.97 25.00 23.98
   2560x1600 59.97
   2560x1440 59.95
   1920x1080 60.00 59.94 50.00 29.97 23.98 60.00 50.04
   1680x1050 59.95
   1440x900 59.89
   1440x576 50.00
   1440x480 59.94
   1280x1024 75.02 60.02
   1280x960 60.00
   1280x720 60.00 59.94 50.00
   1152x864 75.00
   1024x768 75.03 70.07 60.00
   800x600 75.00 72.19 60.32 56.25
   720x576 50.00
   720x480 59.94
   640x480 75.00 72.81 59.94 59.93
DP-0 connected 3840x2160+3840+0 (normal left inverted right x axis y axis) 596mm x 335mm
   3840x2160 29.98*+
   2560x1600 59.97
   2560x1440 59.95
   1920x1080 60.00 59.94 50.00
   1680x1050 59.95
   1440x900 59.89
   1440x576 50.00
   1440x480 59.94
   1280x1024 60.02
   1280x960 60.00
   1280x800 59.81
   1280x720 60.00 59.94 50.00
   1024x768 60.00
   800x600 60.32 56.25
   720x576 50.00
   720x480 59.94
   640x480 59.94
   640x350 70.10
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected (normal left inverted right x axis y axis)
   3840x2160 60.00 + 30.00
   2560x1600 59.97
   2560x1440 59.95
   1920x1080 60.00 59.94 50.00
   1680x1050 59.95
   1440x900 59.89
   1440x576 50.00
   1440x480 59.94
   1280x1024 75.02 60.02
   1280x960 60.00
   1280x720 60.00 59.94 50.00
   1152x864 75.00
   1024x768 75.03 70.07 60.00
   800x600 75.00 72.19 60.32 56.25
   720x576 50.00
   720x480 59.94
   640x480 75.00 72.81 59.94 59.93
DP-5 disconnected (normal left inverted right x axis y axis)

So the system can see all monitors and I can select all three under the Screen Display settings but setting them up and applying the changes doesn't result in them all turning off as expected until you've done it numerous...

Read more...

Revision history for this message
Mark Edmunds (markedmunds1907) wrote :

Just to add on to my last comment... something is really broken for my configuration - after ten minutes of trying to get all three monitors to wake up and play ball with the screen display settings windows and it only ever enabling two out of the three (sometimes 1 & 3, sometimes 1 & 2 and somethings 2 & 3), I gave up and rebooted.... and now it's fine.

Think will just have to disable the monitors from sleeping when the screen is locked...

Happy to investigate if given direction on what to look at on my system.

Changed in gnome-shell:
status: Unknown → New
Changed in mutter:
status: Unknown → New
Changed in mutter:
status: New → Fix Released
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.