Windows change Monitor/Desktop after screen lock

Bug #1295267 reported by Chris Burrell on 2014-03-20
366
This bug affects 66 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Undecided
Unassigned
7.1
Fix Released
Low
Unassigned
compiz-plugins-main (Ubuntu)
Low
Unassigned
unity (Ubuntu)
Low
Unassigned

Bug Description

I run a dual monitor configuration, with one portrait and one landscape.

I nearly always have multiple applications open in multiple windows across both monitors and all virtual desktops.

When I lock the screen and then unlock, my application windows will move from their original position.

Sometimes they are in completely random positions;

Other times they seem to get the monitors confused, and rather than being in the top half of the portrait monitor they are on the top half of the landscape monitor;

Sometimes it is only a new desktop, but the monitor position is the same;

Sometimes it is the same desktop, but on the other monitor.

Description: Ubuntu 13.10
Release: 13.10

What I expect to happen: When I unlock my computer, all the windows are in the same position on the same monitor and desktop as I left them.

What actually happens: When I unlock my computer, some or all of the windows have been changed to a random position on a random monitor and/or desktop.

Launchpad Janitor (janitor) wrote :

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

Changed in unity (Ubuntu):
status: New → Confirmed

Same in 14.04.

My laptop is a Samsung NP900X4C.

Christopher Townsend (townsend) wrote :

@ Chris Burrell,

A couple of questions:

1. Have you upgraded to 14.04, and if, does this still occur?
2. Is the machine suspending/hibernating when in the lockscreen?

Thanks!

Changed in unity (Ubuntu):
status: Confirmed → Incomplete
Chris Burrell (b-laukchpad-0) wrote :

@ Christopher Townsend

1) Yes, I have updated to 14.04 - no, it does not seem to happen anymore
2) No, it was not - I could lock the screen for a second, and the windows would be rearranged when I logged back in.

Thanks,

C

Christopher Townsend (townsend) wrote :

Ok, thanks. Will tag this as saucy and add a task for 7.1. Not sure it'll get fixed, but at least it will be tagged correctly:)

tags: added: saucy
Changed in unity (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → Low
Changed in unity:
status: New → Fix Released
Chris Burrell (b-laukchpad-0) wrote :

Interestingly, this has started occurring again.

My system was fine on friday, but over the weekend my work desk was replaced - the crew doing the job put my monitors on in the wrong order, and since then, the issue has been happening again.

Chris Burrell (b-laukchpad-0) wrote :

This bug is very much affecting the usability of my work PC, to the point that I'm planning to reinstall Ubuntu in the hopes it will resolve this issue.

If anyone needs any information - config files/log files etc.. - please request them now, before I format the machine.

Thanks

Chris

Chris Burrell (b-laukchpad-0) wrote :

It appears that this only happens when the monitors actually power off - if I lock the machine and then unlock it straight away, the windows stay in place. If I lock the machine and leave it until the monitors go into powersaving mode, the windows move (and now it seems my PC is crashing when I unlock the machine)

Chris Burrell (b-laukchpad-0) wrote :

whoops, no, my mistake - it also happens when my monitors do not power off.

Reece (reece) wrote :

Exactly the same issue here.

I've used Ubuntu for years with multiple multi-display setups (one at work, one or two at home). This did not used to be a problem. The first occurrences seemed to coincide with the time I bought a new monitor (and new model) that is 2560x1440. At the same time, I also changed one external monitor config to over-under rather than side-by-side.

Possibly related: In #1351982 (https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1351982), I described a problem in which the panel and indicator bars are occasionally unresponsive to mouse clicks after an unlock. Relocking (with ctrl-alt-L) and unlocking restores both reliably. The two bugs don't seem related functionally, but I think they did start occurring around the same time.

ThomasA (thomas-arildsen) wrote :

This happens on my computer too. Applications move to other desktops after screen lock. I have two identical monitors in landscape mode and 2x2 virtual desktops. This problem appeared on my computer when I installed 14.04 on top of a previous 13.04 install.

Reece (reece) wrote :

Follow to my earlier comment (#10):

- Windows move after screen lock + time. (Just screen lock isn't enough.) It's possible that screen blanking is the trigger.

- Seems to only affect gnome-terminal. This may be because I always keep it in the lower left corner (by manual snapping).

- Ubuntu 14.04 and 14.10 are similarly affected. 14.10 was from a fresh install. The setup (dual monitor, laptop on right, top aligned) has been the same for years.

Ivo van der Wijk (iivvoo) wrote :

I have exactly the same problem on my Dell XPS 13 laptop (14.04). It seems to happen after the screen locks / turns off.

However, it seems to happen with one specific screen - I've been able to normaly use "standard" full HD external screens, but once I use my Samsung Syncmaster T240 screen, the bug appears. It might be related to its "odd" resolution: 1920x1200.

I'm using unity 7.2.4 and the problem still persists.

ThomasA (thomas-arildsen) wrote :

There might actually be something about the screen resolution. I am observing this behaviour on my stationary PC with two Dell U2410 screens running at 1920x1200. I am still running Ubuntu 14.04.

Amos (amosfolarin) wrote :

Yes, I'm experiencing the same thing.
After a lock screen, my windows all move back onto one monitor.

The main monitor has had the resolution dropped from 3840x2160 --> 2560x1440

Linux worky 3.19.0-18-generic #18-Ubuntu SMP Tue May 19 18:31:35 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
unity 7.3.2

Graphics: Card: NVIDIA GK104GLM [Quadro K3000M] bus-ID: 01:00.0
           Display Server: X.Org 1.17.1 drivers: nvidia (unloaded: fbdev,vesa,nouveau)
           Resolution: 1920x1080@59.9hz, 1920x1080@60.0hz, 2560x1440@60.0hz
           GLX Renderer: Quadro K3000M/PCIe/SSE2 GLX Version: 4.5.0 NVIDIA 346.59 Direct Rendering: Yes

$ xrandr
Screen 0: minimum 8 x 8, current 5560 x 1920, maximum 16384 x 16384
VGA-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected primary 1080x1920+2560+0 left (normal left inverted right x axis y axis) 531mm x 298mm
   1920x1080 59.9*+
   1680x1050 60.0
   1600x1200 60.0
   1440x900 59.9
   1280x1024 60.0
   1280x960 60.0
   1280x800 59.8
   1024x768 60.0
   800x600 60.3 56.2
   640x480 59.9
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 1920x1080+3640+13 (normal left inverted right x axis y axis) 382mm x 215mm
   1920x1080 60.0*+
DP-5 disconnected (normal left inverted right x axis y axis)
DP-6 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 607mm x 345mm
   3840x2160 60.0 +
   2560x1440 60.0*
   1920x1080 60.0 59.9
   1680x1050 60.0
   1600x900 60.0
   1440x900 59.9
   1280x1024 75.0 60.0
   1280x800 59.8
   1280x720 60.0
   1152x864 75.0
   1024x768 75.0 70.1 60.0
   800x600 75.0 72.2 60.3 56.2
   640x480 75.0 72.8 59.9

Magnum (magnum-pestilenz) wrote :

Same here witch 15.04

Dirk Eddelbuettel (edd) wrote :

Same here with 15.04 (as well as previous releases for at least a few years; I tend to update every six months).

Running two screens with an older NVidia nvs280 (or 285), and now three screens at work with a radeon. So not a chipset issue.

Dirk Eddelbuettel (edd) wrote :

Update to the last update: on the Radeon-based three-screen setup it seems to happen less than at home. Still moves some windows some times when locking...

Blaze (blazeishere) wrote :

Same here on 15.04.
Moreover, app windows become inaccessible, invisible, like moved somewhere away. Extremely annoying.

*-display
       description: VGA compatible controller
       product: 3rd Gen Core processor Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:29 memory:f0000000-f03fffff memory:e0000000-efffffff ioport:4000(size=64)

ThomasA (thomas-arildsen) wrote :

@blazeishere do you perhaps also experience this with a monitor resolution of 1920x1200 as some other users (including myself) have reported?

David Klasinc (bigwhale) wrote :

I am seeing this on 15.10, running nvidia GTX 670 with proprietary drivers.

I recently changed monitors, I had Dell 2560x1440 and LG 1920x1080 and everything was working out as it should. Now I have Dell 3840x2160 and LG 1920x1080.

And sometimes after the screen is unlocked windows are pseudo randomly displaced and resized. Most of the time they aren't on the same virtual desktop, not the same size and also physical position is different. Something really strange is going on.

Sometimes certain windows have only title bar and an outline visible and are otherwise inaccessible.

Also, locking the screen manually and then immediately unlocking works. So this might be connected with the screens being turned off and then back on?

tags: added: trusty utopic vivid wily
David Klasinc (bigwhale) wrote :

I tried to run xrandr periodically and check what's going on while the screens are turned off. It turns out that the output doesn't change while screens go to sleep and eventually turn off.

My xrandr output:

Screen 0: minimum 8 x 8, current 5760 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 disconnected (normal left inverted right x axis y axis)
DP-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
   3840x2160 60.00*+ 29.98
   2560x1440 59.95
   1920x1200 59.88
   1920x1080 60.00 59.94 50.00 23.97 60.00 50.04
   1680x1050 59.95
   1600x1200 60.00
   1280x1024 75.02 60.02
   1280x800 59.81
   1280x720 60.00 59.94 50.00
   1152x864 75.00
   1024x768 75.03 60.00
   800x600 75.00 60.32
   720x576 50.00 50.08
   720x480 59.94 60.05
   640x480 75.00 59.94 59.93
DP-1 disconnected (normal left inverted right x axis y axis)
DVI-D-0 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 510mm x 290mm
   1920x1080 60.00*+
   1680x1050 59.95
   1280x1024 75.02 60.02
   1280x960 60.00
   1152x864 75.00
   1024x768 75.03 60.00
   800x600 75.00 60.32 56.25
   640x480 75.00 59.94

David Klasinc (bigwhale) wrote :

To clarify, 'when screens are off' should be 'when screens go to sleep' they aren't actually turned off. If I turn them off by pressing the button on the screen, xrandr will detect that screen is gone.

Gey (geoffray-adde) wrote :

Happening here as well with 16.04.

Tom Inglis (tominglis) wrote :

I just experienced this issue for the first time today.

I have an older monitor (Iiyama ProLite XB2380HS) and it is plugged into the lower DVI port on my Sapphire Radeon R9 380 Nitro.

I bought a new monitor (Iiyama G-Master GB2388HSU), and plugged it into the DisplayPort port on the same graphics card.

The former monitor is on the left, and the latter is on the right. I have four workspaces with two screens in each.

I wanted to get games to open up in the right hand monitor, so installed CCSM, and chose "Prefer smaller output" for Overlapping Output Handling.

This works fine, but when the screens suspend after a manual lock screen or automatically after 10 minutes, when I log back in, all of the applications in the left hand side of my workspaces have moved onto the right hand side.

Tom Inglis (tominglis) wrote :

PS -

I was also able to achieve the same behaviour as CCSM by going into the Screen Display settings and selecting the right hand monitor as the one for Launcher placement.

Tom Inglis (tominglis) wrote :

PS -

I have looked into this some more, and also looked at other similar issues on LaunchPad.

I think that this issue is related to compiz, not unity.

Also, I think that this bug is related:

https://bugs.launchpad.net/ubuntu/+source/compiz-plugins-main/+bug/1514065

Tom Inglis (tominglis) on 2016-02-19
Changed in compiz-plugins-main (Ubuntu):
status: New → Confirmed
Changed in compiz-plugins-main (Ubuntu):
importance: Undecided → Low

I did not have this issue with Ubuntu 14.04 but now I have it with 16.04 with the same hardware. Windows from the screen on the right move to the screen on the left if the screen is locked for a while. I have one screen on DVI and another on HDMI. Both are the same model (BenQ GW2460). I have an Intel integrated GPU with Oibaf drivers.

$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080 60.00*+
   1680x1050 59.88
   1600x900 60.00
   1280x1024 75.02 60.02
   1280x800 59.91
   1152x864 75.00
   1280x720 60.00
   1024x768 75.08 60.00
   832x624 74.55
   800x600 75.00 60.32
   640x480 75.00 60.00
   720x400 70.08
HDMI2 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080 60.00*+ 50.00 59.94
   1920x1080i 60.00 50.00 59.94
   1680x1050 59.88
   1600x900 60.00
   1280x1024 75.02 60.02
   1280x800 59.91
   1152x864 75.00
   1280x720 60.00 50.00 59.94
   1024x768 75.08 60.00
   832x624 74.55
   800x600 75.00 60.32
   720x576 50.00
   720x576i 50.00
   720x480 60.00 59.94
   720x480i 60.00 59.94
   640x480 75.00 60.00 59.94
   720x400 70.08
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

$ sudo dmidecode -t 2
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
 Manufacturer: Gigabyte Technology Co., Ltd.
 Product Name: H87-D3H-CF

Leif (leifjohn) wrote :

I've never had this issue before, but I also just upgraded to 16.04 and now it is driving me nuts.

Tom Inglis (tominglis) wrote :

I found that this was caused by having one monitor with a DisplayPort connection and one with a DVI connection. When I went back to two DVI connections it was resolved.

However, this is still an issue with a clean install of Ubuntu 16.04, and ideally it would be possible to mix and match display types?

David Klasinc (bigwhale) wrote :

I can confirm that this is still present in 16.04. I did a clean install and as soon as screens go blank and enter the power savings mode windows will semi-randomly displace around the workspaces. I have one screen on Display Port and the other on DVI. Dell P2715Q doesn't have DVI ports so I can't test what happens if I connect it to DVI.

Olivier Clavel (zeitounator) wrote :

Experiencing the same issue here after unpgrading to 16.04. Never experienced the issue for years of using ubuntu on the same machine and same hardware: 14.04 => 14.10 => 15.04 => 15.10 => 16.04. It's only on the latest upgrade that the problem appeared.

Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080 60.00*+ 50.00 59.94
   1920x1080i 60.00 50.00 59.94
   1680x1050 59.88
   1280x1024 75.02 60.02
   1440x900 59.90
   1280x960 60.00
   1280x720 60.00 50.00 59.94
   1024x768 75.08 70.07 60.00
   832x624 74.55
   800x600 72.19 75.00 60.32 56.25
   720x576 50.00
   720x480 60.00 59.94
   640x480 75.00 72.81 66.67 60.00 59.94
   720x400 70.08
VGA1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080 60.00*+
   1680x1050 59.95
   1280x1024 75.02 60.02
   1440x900 59.89
   1280x960 60.00
   1280x720 60.00
   1024x768 75.08 70.07 60.00
   832x624 74.55
   800x600 72.19 75.00 60.32 56.25
   640x480 75.00 72.81 66.67 60.00
   720x400 70.08
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

nmorice (moteur-diesel) wrote :

Same as Olivier

Experiencing the same issue here after unpgrading to 16.04. Never experienced the issue for years of using ubuntu on the same machine and same hardware: 14.10 => 15.04 => 15.10 => 16.04. It's only on the latest upgrade that the problem appeared.

$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 173mm
   1920x1080 60.05*+ 59.93
   1680x1050 59.95 59.88
   1600x1024 60.17
   1400x1050 59.98
   1600x900 60.00
   1280x1024 60.02
   1440x900 59.89
   1280x960 60.00
   1368x768 60.00
   1360x768 59.80 59.96
   1152x864 60.00
   1280x720 60.00
   1024x768 60.00
   1024x576 60.00
   960x540 60.00
   800x600 60.32 56.25
   864x486 60.00
   640x480 59.94
   720x405 60.00
   640x360 60.00
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 476mm x 268mm
   1920x1080 60.00*+ 50.00 50.00 59.94
   1680x1050 59.88
   1600x900 60.00
   1280x1024 60.02
   1440x900 59.90
   1280x800 59.91
   1280x720 60.00 50.00 59.94
   1024x768 60.00
   800x600 60.32
   720x576 50.00
   720x480 60.00 59.94
   640x480 60.00 59.94
   720x400 70.08
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

mreichardt (mreichardt) wrote :
Download full text (3.6 KiB)

I have this problem in Ubuntu 14.04 and 16.04 with a dual 4K screen setup (using a nvidia GPU).

Sometimes when waking the screens from standby ("Power Save Mode"), windows on the right screen are moved to an invisible offscreen area.
Using keyboard shortcuts, they can be moved to the visible area again.

I just ran my screens through ~10 standby cycles in different configurations.
One screen (Dell) wakes from standby almost immediately - the other (Iiyama) needs around 3 seconds. For simplicity, I will refer to them as quick and slow screen.
Both screens are connected via DisplayPort.
The driver from Ubuntu's nvidia-361 package is used.

I made the following observations:
* Window displacement happens on the right screen only.
* When the quick screen is the right screen, you can see the windows at the correct positions after wakeup, then the slow screen wakes up, reinitialization seems to be triggered (both screens are black for one second) and after that the windows are displaced (sometimes).
* When the quick screen is the right screen, random displacement seems to happen only once per Unity Session (if I logged out and in again, it happened again). When the slow screen is the right screen, it happens more often.
* When window displacement occurs, windows seem to be swapped between the right screen and the invisible offscreen area (-> windows still in the invisible offscreen area reappear at their former positions).
* Swapping the DisplayPort connectors at the Graphics Adapter does not have an impact on the behaviour.
* KDE also displaces windows on wakeup. They are moved to screen edges instead of invisible offscreen areas.

---

I am using the tint2 taskbar (window displacement also occurs without tint2). Its command line output at screen wakeup might be interesting.
There are two variants of output (see below). Window displacement may occur on either.
If displacement occurs, tint2 and also the menus in the title bar are often broken on one screen - until I restart tint2.

First variant:

/build/tint2-6JO0z5/tint2-0.12.7/src/tint.c 1163: triggering tint2 restart due to configuration change in the root window
/build/tint2-6JO0z5/tint2-0.12.7/src/tint.c 1883: restarting tint2...
xRandr: Found crtc's: 3
xRandr: Linking output DP-2 with crtc 0
xRandr: Linking output DP-4 with crtc 1
xsettings: Gtk/FontName = Ubuntu 11
xsettings: Net/IconThemeName = ubuntu-mono-dark
real transparency on... depth: 32
panel items: TSC
Systray composited rendering on
tint2 : nb monitor 2, nb monitor used 2, nb desktop 1
Kernel uevent interface initialized...

Second variant:

/build/tint2-6JO0z5/tint2-0.12.7/src/tint.c 1163: triggering tint2 restart due to configuration change in the root window
/build/tint2-6JO0z5/tint2-0.12.7/src/tint.c 1883: restarting tint2...
xRandr: Found crtc's: 3
xRandr: Linking output DP-2 with crtc 0
xsettings: Gtk/FontName = Ubuntu 11
xsettings: Net/IconThemeName = ubuntu-mono-dark
real transparency on... depth: 32
panel items: TSC
Systray composited rendering on
tint2 : nb monitor 1, nb monitor used 1, nb desktop 2
Kernel uevent interface initialized...
tint2 : another systray is running pid=1908
/build/tint2-6JO0z5/tint2-0.12.7/src/t...

Read more...

mreichardt (mreichardt) on 2016-05-06
tags: added: xenial
mreichardt (mreichardt) wrote :
Download full text (5.2 KiB)

Looking at the /var/log/Xorg.0.log, it appears that the Iiyama screen is considered disconnected on standby - and the reconnect causes a relayout of the desktop.

I wonder if it's possible to simply suppress or ignore those hotplug events (?)

This is the output in the /var/log/Xorg.0.log on a standby cycle:

[ 31292.359] (--) NVIDIA(GPU-0): DFP-6: disconnected
[ 31292.359] (--) NVIDIA(GPU-0): DFP-6: Internal DisplayPort
[ 31292.359] (--) NVIDIA(GPU-0): DFP-6: 960.0 MHz maximum pixel clock
[ 31292.359] (--) NVIDIA(GPU-0):
[ 31292.362] (--) NVIDIA(GPU-0): CRT-0: disconnected
[ 31292.362] (--) NVIDIA(GPU-0): CRT-0: 400.0 MHz maximum pixel clock
[ 31292.362] (--) NVIDIA(GPU-0):
[ 31292.365] (--) NVIDIA(GPU-0): DFP-0: disconnected
[ 31292.365] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[ 31292.365] (--) NVIDIA(GPU-0): DFP-0: 330.0 MHz maximum pixel clock
[ 31292.365] (--) NVIDIA(GPU-0):
[ 31292.365] (--) NVIDIA(GPU-0): DFP-1: disconnected
[ 31292.365] (--) NVIDIA(GPU-0): DFP-1: Internal TMDS
[ 31292.365] (--) NVIDIA(GPU-0): DFP-1: 330.0 MHz maximum pixel clock
[ 31292.365] (--) NVIDIA(GPU-0):
[ 31292.365] (--) NVIDIA(GPU-0): DFP-2: disconnected
[ 31292.365] (--) NVIDIA(GPU-0): DFP-2: Internal DisplayPort
[ 31292.365] (--) NVIDIA(GPU-0): DFP-2: 960.0 MHz maximum pixel clock
[ 31292.365] (--) NVIDIA(GPU-0):
[ 31292.365] (--) NVIDIA(GPU-0): DFP-3: disconnected
[ 31292.365] (--) NVIDIA(GPU-0): DFP-3: Internal TMDS
[ 31292.365] (--) NVIDIA(GPU-0): DFP-3: 330.0 MHz maximum pixel clock
[ 31292.365] (--) NVIDIA(GPU-0):
[ 31292.366] (--) NVIDIA(GPU-0): DELL P2715Q (DFP-4): connected
[ 31292.366] (--) NVIDIA(GPU-0): DELL P2715Q (DFP-4): Internal DisplayPort
[ 31292.366] (--) NVIDIA(GPU-0): DELL P2715Q (DFP-4): 960.0 MHz maximum pixel clock
[ 31292.366] (--) NVIDIA(GPU-0):
[ 31292.366] (--) NVIDIA(GPU-0): DFP-5: disconnected
[ 31292.366] (--) NVIDIA(GPU-0): DFP-5: Internal TMDS
[ 31292.366] (--) NVIDIA(GPU-0): DFP-5: 330.0 MHz maximum pixel clock
[ 31292.366] (--) NVIDIA(GPU-0):
[ 31292.366] (--) NVIDIA(GPU-0): DFP-6: disconnected
[ 31292.366] (--) NVIDIA(GPU-0): DFP-6: Internal DisplayPort
[ 31292.366] (--) NVIDIA(GPU-0): DFP-6: 960.0 MHz maximum pixel clock
[ 31292.366] (--) NVIDIA(GPU-0):
[ 31292.366] (--) NVIDIA(GPU-0): DFP-7: disconnected
[ 31292.366] (--) NVIDIA(GPU-0): DFP-7: Internal TMDS
[ 31292.366] (--) NVIDIA(GPU-0): DFP-7: 330.0 MHz maximum pixel clock
[ 31292.366] (--) NVIDIA(GPU-0):
[ 31292.573] (II) NVIDIA(0): Setting mode "DP-2: nvidia-auto-select @3840x2160 +0+0 {ViewPortIn=3840x2160, ViewPortOut=3840x2160+0+0}"
[ 31292.987] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[ 31292.987] (**) NVIDIA(0): device Idek Iiyama PL2888UH (DFP-6) (Using EDID
[ 31292.987] (**) NVIDIA(0): frequencies has been enabled on all display devices.)
[ 31292.992] (--) NVIDIA(GPU-0): Idek Iiyama PL2888UH (DFP-6): connected
[ 31292.992] (--) NVIDIA(GPU-0): Idek Iiyama PL2888UH (DFP-6): Internal DisplayPort
[ 31292.992] (--) NVIDIA(GPU-0): Idek Iiyama PL2888UH (DFP-6): 960.0 MHz maximum pixel clock
[ 31292.992] (--) NVIDIA(GPU-0):
[ 31293.113] (II) NVIDIA(0): Setting mode "DP-2: nvidia-auto-select @3840x2160 +0+0 {View...

Read more...

mreichardt (mreichardt) wrote :

With the Ubuntu Mate desktop, the window displacement issue does not occur on my system.
I just tried this - using different compositors (Marco and Compiz).

So until the window displacement issue is resolved, I am tempted to stick to Ubuntu Mate.

David Klasinc (bigwhale) wrote :

A few more observations and data on my configuration:

- Using 3x2 workspaces configuration
- 4K Dell on DP-0 is primary screen on the left side and has Unity Launcher
- 1080p LG is on the right side with no Launcher and is a secondary screen
- When screens are 'turned off/put into sleep mode/blanked/...' LG will go first in the power saving mode and Dell will be the last one.
- When screens are turned on again, Dell will be the first one to wake up and display a picture

- All the windows on primary screen workspaces are merged onto one workspace
- All the windows on secondary screen workspaces are moved into some random (sometimes off screen) area on the primary screen, workspace seems to be random too

MankyGitt (dnadruff) wrote :

I have this issue.
16.04LTS - this problem is very frustrating.
Previously, on the same hardware, running 14.04, and then 15.10 I did not have this problem: Display was reasonably stable - "reasonable" not "perfect" because there is a bug affecting HDMI output to 4K monitors where periodically the monitor will black out for a few seconds.

I never use the upgrade path for new distributions: I always perform a clean new installation, and allow fresh hardware configurations to be generated. This is not an "upgrade" issue.

Observations: I can use a mini-display port connection to the DVI-B input on the monitor (and forego the 4K resolution): In this configuration, the screen black-out issue does not occur. The placement of windows after screens blank is an issue.
I have enabled "Workspaces" because I found that windows would hide on workspaces I could not access without this enabled.

The windows ALWAYS migrate to the workspace to the left of the active one.
This issue only occurs with dual monitors with extended display.

I am now experimenting with disabling monitor power saving (Screens should never black out). I will also experiment with using only the external monitor.

Hardware in use: Dell XPS 15 9530 (the UltraHD touch screen model - it is awesome). Monitor: Kogan Ultra HD 28" display. HDMI cable. Monitor to the right of the laptop display (in case that config matters in the "Displays" configuration.)

I'll report back on the results of "no power off" and "external as only display".

Again - this issue is new to 16.04 for me. 14.04, and 15.10 were rock solid.

Manthis (manthis) wrote :

I'm encountering the same issue and this is clearly driving me nuts as I can't figure out why all my windows are systematically moved to my left screen when unlocking my computer. As others, I confirm that it seems to happen when screens go in sleep mode and wake up.

Sebastien Bacher (seb128) wrote :

Did compiz/unity change there, or is there some video driver issue when makes the screen config change when monitors go to suspend mode which was not the case before?

Alexander Thomas (doctor-lex) wrote :

I also started experiencing this problem on 16.04, right after I had enabled “turn screen off when inactive” in the system settings. I have two identical Iiyama monitors, one of which is attached to the DVI port of the integrated Intel graphics, the other to the HDMI port.

David Klasinc (bigwhale) wrote :

It appears that this is happening when one of the screens is connected to DP or HDMI.

ThomasA (thomas-arildsen) wrote :

I have reported on this issue before and I last experienced it in 14.04.
I can confirm that my set-up is also two identical monitors; one connected via HDMI and another via DP.
Contrary to some other affected users here, I used to have the problem in 14.04, but I do not seem to experience it after upgrading to 16.04.

In my particular case, I have 2 different monitors. One is on my laptop (with Intel Integrated Graphics), the other is my HP monitor, connected with HDMI.

I've noticed when I remove the hdmi port, my current workspace switches window positions, so that what's on screen 1, moves to 2, and 2 to 1. On every other screen, it usually moves to the connected monitor when put it back, regardless of it's individual state.

In 15.04, if my computer suspended (which is usually the case here), they'd hold their state and return when the other monitor woke. That took a few seconds from the laptop monitor.

James McKenna (mckennajp) wrote :

Disabling sna seems to fix this for now if you have this problem with Intel Integrated Graphics:

/etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
 Identifier "Card0"
 Driver "Intel"
 Option "AccelMethod" "uxa"
EndSection

Gey (geoffray-adde) wrote :

I use an intel integrated graphics and unfortunately, disabling sna does not work for me.

prasanna (prasanna) wrote :

I have this issue too with 16.04. Laptop + HDMI external monitor. Intel Integrated Graphics.
I do not have the 20-intel.conf file in my xorg.conf.d so cannot check whether changing the acceleration method solves the problem.

I am having this issue when my laptop is connected to an external monitor and I am using both screens side-by-side. It just started happening after upgrade to 16.04. Was driving me nuts, but I just discovered (following a reading of comment #41) that if I go to System Settings -> Brightness and Lock and set "Turn screen off when inactive for" to "Never" (I had it set to 5 minutes), then the problem does not seem to occur--when I return to my computer, all of the application windows are where I left them.

I would like to hear if this workaround resolves the issue for anyone else as well.

Referring to comment #41: only partial success. I am still getting occasional window moves after locking the screen and walking away for a bit, though much less frequent. And there doesn't seem to be a correlation to being gone for five minutes or two hours.

David Klasinc (bigwhale) wrote :

This is driving me crazy. :/ What we need, in a nutshell, is this:

- window is moved/resized/changed: save desktop state
- screen is put to sleep: save desktop state and disable WM events
- screen wakes up: restore desktop to what it was, if screens are missing, put all windows on 1st workspace of the primary screen
- if screen is disconnected: save desktop state, move out of bounds windows to 1st workspace of the primary screen
- if screen is connected again: restore desktop state if no WM events occurred while screen was missing

If WM events are suspended a moment before screens are turned off/to stand-by/to sleep/low power mode/... and desktop state is saved, then no re-arrangement would occur.

I also noticed that having a window on my secondary screen and issuing a 'Move To Workspace' by right clicking on a title bar, will always send the window to my primary screen. Which is also slightly annoying.

I also have this issue with windows moving after unlock, on 16.04 with one screen connected via DisplayPort and another via HDMI. When I switch to both screens via HDMI (one via a thunderbolt/USB-C-to-HDMI adapter) the problem seems to go away.

This is on a Dell Precision 5510, with the nouveau and intel (i915_bpo) drivers for the nvidia and intel graphics respectively.

GM (g-mereu) wrote :

Same here with Gnome Classic (upgraded 15.10 to 16.04) :(

When I unlock the system I find the desktop configuration changed:
 - Terminator's window changes from the external screen to the built-in
 - same for the application bar

Some info about my config:

Toshiba PORTEGE Z30-B-11G with Intel® HD 5500

$ lspci -vnn | grep VGA -A 12
00:02.0 VGA compatible controller [0300]: Intel Corporation Broadwell-U Integrated Graphics [8086:1616] (rev 09) (prog-if 00 [VGA controller])
 Subsystem: Toshiba America Info Systems Broadwell-U Integrated Graphics [1179:0005]
 Flags: bus master, fast devsel, latency 0, IRQ 48
 Memory at f0000000 (64-bit, non-prefetchable) [size=16M]
 Memory at e0000000 (64-bit, prefetchable) [size=256M]
 I/O ports at 3000 [size=64]
 Expansion ROM at <unassigned> [disabled]
 Capabilities: <access denied>
 Kernel driver in use: i915
 Kernel modules: i915

----

$lshw -C display:

  *-display
       descripción: VGA compatible controller
       producto: Broadwell-U Integrated Graphics
       fabricante: Intel Corporation
       id físico: 2
       información del bus: pci@0000:00:02.0
       versión: 09
       anchura: 64 bits
       reloj: 33MHz
       capacidades: msi pm vga_controller bus_master cap_list rom
       configuración: driver=i915 latency=0
       recursos: irq:48 memoria:f0000000-f0ffffff memoria:e0000000-efffffff ioport:3000(size=64)

------

Xorg.0.log:

[111189.451] (II) intel(0): resizing framebuffer to 1920x1080
[111199.862] (II) intel(0): resizing framebuffer to 4480x1440
[111199.886] (II) intel(0): switch to mode 2560x1440@60.0 on HDMI2 using pipe 0, position (1920, 0), rotation normal, reflection none
[111200.133] (II) intel(0): switch to mode 1920x1080@59.9 on eDP1 using pipe 1, position (0, 0), rotation normal, reflection none

---------

Otto Rask (ojrask) wrote :

Happening on updated 14.04. Two identical Dell monitors (1920x1080), one connected using DVI->HDMI and other using DP->MiniDP (additionally a laptop screen which is disabled when using the monitors).

When the computer is on lock screen/sleeps long enough, the secondary monitor (DP-connected) loses windows and they are shifted to my primary screen when logging back in. I mostly use the Gnome terminal only on the secondary screen so it may or may not be directly related to the terminal software.

This started occurring just last week after our office moved and I plugged my monitors back to my laptop docking station. So one thing I need to try now is to switch the screens around and see whether that changes anything (in case the OS has some kind of a memory regarding actual _hardware_ which was previously plugged in).

Before the office change my screens and the OS operated normally and sleep/lock worked OK.

GPU is a mobile Radeon (using open-source drivers) on a Dell laptop, through the Dell docking station.

Stuart (stuart-ward) wrote :
Download full text (3.5 KiB)

Having this with dual Monitor setup, with second monitor connected via Display Port

  *-display
       description: VGA compatible controller
       product: 2nd Generation Core Processor Family Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:27 memory:f0000000-f03fffff memory:e0000000-efffffff ioport:5000(size=64)

:~$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 3060, maximum 32767 x 32767
LVDS1 connected primary 1600x900+0+2160 (normal left inverted right x axis y axis) 310mm x 174mm
   1600x900 60.00*+
   1440x900 59.89
   1368x768 60.00
   1360x768 59.80 59.96
   1152x864 60.00
   1280x720 60.00
   1024x768 60.00
   1024x576 60.00
   960x540 60.00
   800x600 60.32 56.25
   864x486 60.00
   800x450 60.00
   640x480 59.94
   720x405 60.00
   640x360 60.00
DP1 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 621mm x 341mm
   3840x2160 30.00*
   2560x1600 59.97
   2560x1440 59.95
   1920x1080 60.00 60.00 50.00 59.94
   1920x1080i 60.00 50.00 59.94
   1680x1050 59.88
   1280x1024 75.02 60.02
   1440x900 59.90
   1280x960 60.00
   1152x864 75.00
   1280x720 60.00 50.00 59.94
   1440x576 50.00
   1024x768 75.08 70.07 60.00
   1440x480 60.00 59.94
   832x624 74.55
   800x600 72.19 75.00 60.32 56.25
   720x576 50.00
   720x480 60.00 59.94
   640x480 75.00 72.81 66.67 60.00 59.94
   720x400 70.08
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

[113097.393] (--) intel(0): HDMI max TMDS frequency 600000KHz
[113097.413] (--) intel(0): HDMI max TMDS frequency 600000KHz
[113097.454] (II) intel(0): resizing framebuffer to 3840x3060
[113097.464] (II) intel(0): switch to mode 1600x900@60.0 on LVDS1 using pipe 0, position (0, 2160), rotation normal, reflection none
[113097.465] (II) intel(0): switch to mode 3840x2160@30.0 on DP1 using pipe 1, position (0, 0), rotation normal, reflection none
[113097.579] (--) intel(0): HDMI max TMDS frequency 600000KHz
[113433.884] (II) intel(0): resizing framebuffer to 1600x900
[113433.894] (II) intel(0): switch to mode 1600x900@60.0 on LVDS1 using pipe 0, position (0, 0), rotation normal, reflection none
[113434.490] (--) intel(0): HDMI max TMDS frequency 600000KHz
[113434.545] (II) intel(0): resizing framebuffer to 3840x3060
[113434.572] (II...

Read more...

This is happening on my HP ProBook Running Xenial. In addition, some windows completely disappear. I must quit the application through the launcher and restart it to regain the windows. The windows are where I would expect them to be after the application is re-launched.

:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

:~$ lspci -vnn | grep VGA -A 12
00:02.0 VGA compatible controller [0300]: Intel Corporation Broadwell-U Integrated Graphics [8086:1616] (rev 09) (prog-if 00 [VGA controller])
 DeviceName: 32
 Subsystem: Hewlett-Packard Company Broadwell-U Integrated Graphics [103c:2248]
 Flags: bus master, fast devsel, latency 0, IRQ 48
 Memory at c0000000 (64-bit, non-prefetchable) [size=16M]
 Memory at b0000000 (64-bit, prefetchable) [size=256M]
 I/O ports at 6000 [size=64]
 Expansion ROM at <unassigned> [disabled]
 Capabilities: <access denied>
 Kernel driver in use: i915
 Kernel modules: i915

00:03.0 Audio device [0403]: Intel Corporation Broadwell-U Audio Controller [8086:160c] (rev 09)

lshw:
    description: Notebook
    product: HP ProBook 450 G2 (L8E09UT#ABA)
    vendor: Hewlett-Packard
    version: A3009DD10303
    serial: xxxxxxxxxxxxxxxxxx
    width: 64 bits
    capabilities: smbios-2.7 dmi-2.7 vsyscall32
    configuration: boot=normal chassis=notebook family=103C_5336AN G=N L=BUS B=HP S=PRO sku=L8E09UT#ABA uuid=7F928F1F-7AFC-E411-B003-2057910000FF
     *-pci
          description: Host bridge
          product: Broadwell-U Host Bridge -OPI
          vendor: Intel Corporation
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 09
          width: 32 bits
          clock: 33MHz
          configuration: driver=bdw_uncore
          resources: irq:0
        *-display
             description: VGA compatible controller
             product: Broadwell-U Integrated Graphics
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             version: 09
             width: 64 bits
             clock: 33MHz
             capabilities: msi pm vga_controller bus_master cap_list rom
             configuration: driver=i915 latency=0
             resources: irq:48 memory:c0000000-c0ffffff memory:b0000000-bfffffff ioport:6000(size=64)

Andy_D (andy-dempster) wrote :

Sorry trying to work out how to escalate this - please ignore this status change. I've just lost an hour of work to this bug. Label me "not happy!"

Changed in compiz-plugins-main (Ubuntu):
status: Confirmed → Fix Released
c2h5oh (c2h5oh) wrote :

Still happening in Yakkety.

Some observations:
- waiting to unlock until 2nd screen wakes seems to help. Not sure if 100% effective
- sometimes, but not always, screws up HiDPI for windows that got moved between screens (I've got different settings on each)

Both of those seem to suggest a race: location and dpi for a window are being updated based on primary (with launcher) display data, when reconnect happens and primary display is suddenly a different device with different characteristics & settings.

My setup:
- Intel Graphics (Iris Pro)
- Laptop display (eDP1)
- 4k monitor (DP1) that is my primary (with launcher) one

David Klasinc (bigwhale) wrote :

One more way to replicate this:

- open terminal
- run: xset dpms force suspend
- wait 30 seconds
- move mouse
- cry because all of your windows are scattered around and resized

David Klasinc (bigwhale) wrote :

I think I found a reason why this happens.
I left xrandr running in a loop, logging everything and then I forced both displays into standby with xset.

After checking the logs this is what I noticed:

DP-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
DVI-D-0 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 510mm x 290mm
DP-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
DVI-D-0 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 510mm x 290mm
DP-0 disconnected (normal left inverted right x axis y axis)
DVI-D-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 290mm
DP-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
DVI-D-0 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 510mm x 290mm
DP-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
DVI-D-0 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 510mm x 290mm

When displays go to low power mode my 4K screen is briefly turned off and then back on. When 4K screen is turned off, the 1080p becomes primary and and all the windows are moved to it, when screen is connected back and windows are restored everything is put in the wrong place.

This seems like a wrong implementation of DPMS with the screen manufacturer, not much can be done about this, but WM could go around this.

(strangely enough, same thing happens if I just turn off my HiDPI screen, I don't know how I didn't remember this before)

Which brings up a separate problem - handling of windows when one screen is turned off.

WM should remember position of windows when one screen is disconnected. Windows should be then placed on the _visible_ area on the remaining screen. When previous screen is connected again if windows were not moved, they should go back to their original positions.

Ville Herva (v-iki) wrote :

Just noting that this reproduces (grossly) on my 16.04 Unity, too. Config: Dell XPS 9530 (4k touch screen) + Samsung 4k external display. I've tried other external displays and I get the same problem. Happens with both Nvidia graphics (proprietary) and Intel.

I agree that some of this harder to fix: connecting and disconnecting displays (be it intentionally or because they power themselves off) --> not easy to retain the position of the windows when the same monitor later comes back online. (Could be a different one that is connected, with a different resolution or layout for example).

Anyhow, windows disappearing outside visible area, being moved from virtual desktop (workspace) to another, being scaled to 1 pixel width and moved if they would have fitted into the new screen dimensions, should not happen, ever.

Further, with 4k laptop display and 4k Samsung monitor, I keep losing windows even though the monitor isn't being disconnected or shut down. Just moving between virtual desktops (workspaces) is enough to cause the windows to move around, switch workspaces and disappear.

Goes without saying that it is quite annoying.

Bob (boababa) wrote :

Ville, I've had the same issue with windows completely disappearing. The workaround is to completely disable the screen saver:
  * sudo apt-get install xscreensaver
  * Start scrensaver from the main menu
  * Disable the screensaver by setting Display Mode to "Disable Screen Saver", and in Advanced uncheck "Fade to Black when Blanking"
  * sudo apt-get remove gnome-screensaver

Now the windows only move between monitors instead of completely disappearing.

Hopefully the workaround for monitors turning off/on - window position memory - will be enabled at some future release.

Giampiero Salvi (giampisalvi) wrote :

Confirming this bug on Ubuntu 16.04. Also using dual monitor, with one monitor in vertical orientation. The bug did not affect me before I upgraded from 14.04 to 16.04, but around the same time I also changed one of the monitors, so I cannot tell which is the cause (reading the previous messages I suspect the cause was the change in monitor rather than the upgrade).

The vertical monitor hasn't changed and is a dell 22" with resolution 1680x1050.

Before the change, the horizontal monitor was a Samsung SyncMaster 2443 with resolution 1920x1200.
After the change, the horizontal monitor is a Philips BDM3270 with resolution 2560x1440.

The graphic card is:
Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

Kernel: 4.4.0-47-generic
XRandr reports:
Screen 0: minimum 8 x 8, current 3610 x 1680, maximum 32767 x 32767
DP1 connected 1050x1680+2560+0 left (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050 59.88*+
   1280x1024 75.02 60.02
   1152x864 75.00
   1024x768 75.08 60.00
   800x600 75.00 60.32
   640x480 75.00 60.00
   720x400 70.08
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 708mm x 398mm
   2560x1440 59.95*+
   1920x1080 60.00 50.00 50.00 59.94
   1920x1080i 60.00 50.00 59.94
   1680x1050 59.88
   1280x1024 75.02 60.02
   1440x900 74.98 59.90
   1280x960 60.00
   1280x720 60.00 50.00 59.94
   1024x768 75.08 60.00
   800x600 75.00 60.32
   720x576 50.00
   720x576i 50.00
   720x480 60.00 59.94
   720x480i 60.00 59.94
   640x480 75.00 72.81 66.67 60.00 59.94
   720x400 70.08
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Not sure if you need more info.

Chris (g-chris-t) wrote :

Just throwing my log on the fire...

Intel NUC with 2x24" ViewSonic monitors attached. One connected via mini-Display and one connected via HTMI.

Ubuntu 16.04 fresh install.

Chris (g-chris-t) wrote :

$ xrandr

Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080 60.00*+ 74.99 50.00 59.94
   1920x1080i 60.00 50.00 59.94
   1600x1200 60.00
   1680x1050 59.88
   1400x1050 59.95
   1280x1024 75.02 60.02
   1440x900 59.90
   1280x960 60.00
   1280x800 59.91
   1152x864 75.00
   1280x720 60.00 50.00 59.94
   1440x576 50.00
   1024x768 75.08 70.07 60.00
   1440x480 60.00 59.94
   832x624 74.55
   800x600 72.19 75.00 60.32 56.25
   720x576 50.00
   720x576i 50.00
   720x480 60.00 59.94
   720x480i 60.00 59.94
   640x480 75.00 72.81 66.67 60.00 59.94
   720x400 70.08
   720x240 60.12 60.05
HDMI2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080 60.00*+ 50.00 59.94
   1920x1080i 60.00 50.00 59.94
   1600x1200 60.00
   1680x1050 59.88
   1400x1050 59.95
   1280x1024 75.02 60.02
   1440x900 59.90
   1280x960 60.00
   1280x800 59.91
   1152x864 75.00
   1280x720 60.00 50.00 59.94
   1440x576 50.00
   1024x768 75.08 70.07 60.00
   1440x480 60.00 59.94
   832x624 74.55
   800x600 72.19 75.00 60.32 56.25
   720x576 50.00
   720x576i 50.00
   720x480 60.00 59.94
   720x480i 60.00 59.94
   640x480 75.00 72.81 66.67 60.00 59.94
   720x400 70.08
   720x240 60.12 60.05
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

David Klasinc (bigwhale) wrote :

So, I was digging more into this and it appears not to be a hardware problem. People are reporting similar issues and how monitor is sometimes working and sometimes not.

Anyway, I also found a workaround for this. When I set my monitor to 30Hz refresh rate this problem disappears.

I have a Dell P271Q and in the settings menu there's a 'Display' option. Setting MST to Primary will lock the refresh rate to 30Hz and it will also put the monitor into 'Multi Stream Transport' mode.

Having my screen on 30Hz is a downside, but frankly I didn't notice the difference.

Still, this is just a workaround.

Alex (alecsandru-g) wrote :

Also have this bug, all my windows (except for terminal windows) move to left-most monitor after screen lock and monitors enter stand-by.

This however only happens while leaving them longer in stand-by (overnight), during the day, when it may be locked for an hour at most, it doesn't happen.

Andrew Greenwood (n-andrew-z) wrote :

This has been open for 6 releases (3 years) ?
pfffff... This has to be the most frustrating user experience...

Alex (alecsandru-g) wrote :

It seems it only happens if I manually turn the display off, and only to the windows that are maximized.

cengopon (pognonec) wrote :

Just to indicate that this still affect 16:10 users: dual screen, and sorting of windows required after suspend period.

Michael Hampton (mike.hammer) wrote :

I have been running 16.04 on a dual screen with monitor on vga for about a year, not seeing the problem. I replaced the monitor with a 4K TV that I connect to via HDMI, and now I'm seeing this frequently.

I think it is related to screen resolution, or possibly placement. When I rearranged my displays, I saw one window disappear.

Karsten W. Rohrbach (byteborg) wrote :

Just to chime in, running 16.04.2 LTS on a Lenovo E540.
I had this behaviour in dual head operation with an external full hd display.
I recently changed to a pivot QHD display, that operates in portrait mode.
I am losing windows frequently after returning from a locked screen.
This is a rather annoying and repeatable behaviour:
- I open a few applications, say, thunderbird, firefox and a terminal
- I need to leave, activate screen lock
- I return, unlock
- thunderbird window is lost, the dot is still displayed in unity's dock
- the window dows not return when clicking the application icon
- only solution is to right-click the icon, close the app and re-open it

Karsten W. Rohrbach (byteborg) wrote :

#1666623 might be related

Jaakko Ahola (ahola-jj) wrote :

Here's my 5 cents.

( tl;dr - use gnome and gdm )

I've been running Ubuntu 16.04.2 for long time on Dell Latitude E7250 without any problems using Gnome.
I have two DELL external monitors, one connected with HDMI straight to laptop and the other connected with DisplayPort to the docking station. HDMI connected monitor is pivoted.

Last week my laptop came for IT suppport after reinstallation of Ubuntu due to some other reasons.
Now the desktop manager was Unity.
When locking screen and automatic screen off, my system froze completely.
I changed back to Gnome. Still same effect. Then I changed also from lightdm to gdm.
-> setup is the same as before the reinstallation -> no problems any more with screen locking.

Jaakko Ahola (ahola-jj) wrote :

Well actually I should correct the comment #73.
The problem still occurs with gdm. It didn't solve the problem after all.

Ben (bi613en) wrote :

Below is a fix/workaround/solution that might work for some who are visiting this thread.

Short version:
Stop using external video adapters and instead use the natively supported connections.

Medium version:
Ubuntu 14.04 _AND_ 16.04. My problem started when I started using a external video adapter (hpk-481409-001 Displayport to DVI). It was solved by ceasing to use the video adapter and instead using the native connections of both the monitor and PC.

Long version:
I was running 14.04 on an HP Elitedesk 800 workstation with 2 Display ports and 1 VGA port. I changed monitors and needed to start using an adapter for one of them since they only supported DVI input, the display ports on the PC were internally connected in parallel, and the Display port to DVI cables that I had only mapped the first channel. When the problem started, I thought that it was an Ubuntu update issue and it would resolve itself. I later upgraded from 14.04 to 16.04 and the problem persisted. I tried switching to a heterogeneous monitor configuration like I had before the monitor change, because I thought that it might be a monitor-name identification issue, however this did not fix the problem. I tried using a VGA/Displayport combination (luckily for those reading this I, for some reason, kept the displayport-DVI-adapter connection), and that didn't solve the problem. Then, I simply replaced the displayport-DVI-adapter connection with a simple displayport-DVI cable, and I do not see the problem anymore. If it pops up again I will provide an update.

Davide (gozzilli) wrote :

I use two cables with no adapters but I still experience the problem. I tried both DP-DP and HDMI-HDMI cables on both monitors, with no luck.

Chris (chris-q-d) wrote :

Affects me on a fresh install of 16.04. Two monitors with different port types.

xrandr:

Screen 0: minimum 8 x 8, current 5520 x 2160, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1680x1050+3840+555 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050 59.88*+ 59.95
   1280x1024 75.02 60.02
   1152x864 75.00
   1024x768 75.03 60.00
   800x600 75.00 60.32
   640x480 75.00 59.94
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 621mm x 341mm
   3840x2160 29.98*+
   2048x1080 59.99
   1920x1080 60.00 59.94 50.00 60.00 50.04
   1680x1050 59.95
   1440x900 74.98 59.89
   1280x1024 75.02 60.02
   1280x960 60.00
   1280x720 60.00 59.94 50.00
   1024x768 75.03 60.00
   800x600 75.00 60.32
   720x576 50.00
   720x480 59.94
   640x480 75.00 72.81 59.94 59.93
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

komali2 (komali2) wrote :

Getting this bug in 16.04, had it in an installation on a macbook pro as well as an IBM thinkpad. Switching cables/ports does nothing.

James Hill (jmsjms) wrote :

Getting the bug here too. 16.04

David's post #59 was very helpful to me https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1295267/comments/59

I think he's figured it out (at least for our setup). My problem seems to be that when I press the suspend button, one of my screens goes to sleep before the rest of the system, forcing the windows to move to the non sleeping screen. When I wake up, both monitors wake up, but the windows don't move back to the second screen.

I've found a workaround by disabling dpms using "xset -dpms". It's not the best solution, but when I leave my PC I turn off my screens & speakers at the wall anyway.

I also found a workaround was using VGA instead of HDMI with one of the screens (doesn't work with the other screen), but VGA didn't look great, so I wasn't happy with that.

It seems to me like there are two ways to fix this bug.

#1 detect the bad screen behaviour, and put the windows back on the correct screen. For example, if one monitor gets "removed", then the system goes to sleep a few seconds later, then the system wakes up and both monitors are there, then you know that was bad behaviour and can work around it.

#2 Find a way to not inform the monitors that the PC is going into sleep mode. If they don't attempt to sleep before the PC goes into hibernate mode, that seems like it should work (basically a more sophisticated version of my xset -dpms solution).

James Hill (jmsjms) wrote :

Example lines from my Xorg.0.log below, showing the framebuffer resizing. Note that both screens are attached to the PC permanently, so there should never be a need to resize.

[308422.419] (II) intel(0): resizing framebuffer to 1920x1080
[308422.430] (II) intel(0): switch to mode 1920x1080@60.0 on HDMI1 using pipe 1, position (0, 0), rotation normal, reflection none
[308425.578] (II) intel(0): resizing framebuffer to 3840x1093
[308425.607] (II) intel(0): switch to mode 1920x1080@60.0 on HDMI1 using pipe 1, position (1920, 0), rotation normal, reflection none
[308425.609] (II) intel(0): switch to mode 1920x1080@60.0 on HDMI2 using pipe 0, position (0, 13), rotation normal, reflection none
[308447.488] (II) intel(0): resizing framebuffer to 1920x1080
[308447.498] (II) intel(0): switch to mode 1920x1080@60.0 on HDMI1 using pipe 0, position (0, 0), rotation normal, reflection none
[308447.829] (II) intel(0): resizing framebuffer to 3840x1093
[308447.844] (II) intel(0): switch to mode 1920x1080@60.0 on HDMI1 using pipe 0, position (1920, 0), rotation normal, reflection none
[308447.852] (II) intel(0): switch to mode 1920x1080@60.0 on HDMI2 using pipe 1, position (0, 13), rotation normal, reflection none

James Hill (jmsjms) wrote :

This might also work:

https://askubuntu.com/questions/511601/how-to-make-suspend-work-without-the-screen-staying-black-afterwards

Copy and paste solution in case of linkrot:

> This is actually a simple one:

> Add pm-suspend --quirk-dpms-on to the /var/cache/pm-utils/last_known_working.quirkdb file.

> Reboot and it should work flawlessly.

Klaus Kettner (sesom) wrote :

I can confirm, that answer #45 by James McKenna solved the problem for me! James, thank you!

I am running Linux Mint Cinnamon on an Eglobal i7 fanless barebone and the problem drove me nuts. There are two monitors connected to my computer:

- Main monitor: LG 21:9 connected with DP
- Second monitor: Acer 16:9 connected with HDMI

The main monitor wakes up in less than 1 second from suspend mode, the second screen takes up to 5 seconds. Nevertheless all windows were move to the second - the slow! - monitor. Disabling SNA fixed the problem for me!

Sergey Gross (sergey.gross) wrote :

Everything still the same for nvidia GTX1060 and 2 monitor - 4k Samsung and portrait-oriented Dell 1680x1050. After every wake up I have the same not-my orientation of monitor that doesn`t connected to real positions.

Dragor (gregory-brancq) wrote :

Same bad behavior here with a Thinkpad laptop on dual external monitors through a docking station.
As soon as I eject the laptop, all windows are randomly assigned to desktops. Very annoying.
Use ubuntu 16.04 with compiz, same issue with "Desktop Wall" and "Cube".

Jeff Van Epps (lordbah) wrote :

Similar but maybe not. This is the closest match I've been able to find. Screens sleep (not lock), when I hit a key to wake it up one window has moved from one monitor to the other. Always VirtualBox Manager and only that, not Thunderbird or Chrome or empathy or terminal or anything else I've found. Ubuntu 18.04 GNOME on Wayland. Nvidia GTX590 using two DVI ports, one has an adapter to connect to VGA monitor.

Leone Gerry (ajeet4u1989) wrote :

I am a data entry worker and i want to run dual monitor at one cpu. But i have doubt about it, Do the dual monitor process same data or i can do different task on both. https://windowsclassroom.com/setup-dual-monitors-windows-10/ This blog says that both monitor show same display. Is it true?

WinEunuchs2Unix (ricklee518) wrote :

Comment #86 should be deleted because the Windows fluff is detracting from serious Linux conversation.

I often close the Intel HD530 driven laptop lid and windows there move to nVidia GTX 970M HDMI hardwired external TV. The windows on the Thunderbolt Intel HD 530 driven external monitor TV stay consistent.

If I do not turn on the TV's before resuming from suspend, then the windows on the Thunderbolt driven TV (right side) disappear off screen and I have to use <Alt>+<Tab> to select the disappeared window. Then I need to hold <Alt>+<F7>+<Left Click> and move mouse left to force window back onto canvass.

Another annoying non-Ubuntu-fault-probably-Xorg-fault problem is that when opening and closing laptop lid both external TVs reset. The Intel HD 530 Thunderbolt connected via DP to HDMI converter plug resets it's XRANDR setting for --gamma 1:.9:.7 --brightness .5 so I have to recall it from bash history and resend the command.

When one monitor deactivates, cannot the windows simply move to the other screens (as they do now) without reseting the other monitors/TVs?

In /var/log/Xorg.log nVidia sends out messages but Intel HD 530 (i915 driver) doesn't appear to send out messages.

Unfortunately googling how to override these issues via XORG hooks or even a custom script that monitors UDEV events sheds no light on the situation.

Overall things have improved greatly over the last three years (18.04 problems excluded) so I don't want to sound negative. Laptop eDP Windows do move properly to main HDMI TV on lid close and back to laptop eDP on lid open.

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

Duplicates of this bug

Other bug subscribers