My configuration is the following:
- computer is a Dell M3800 (a beefy laptop); its internal display is 15 inch, 1920x1080 resolution;
- there is also an external display, which is a 24 inch display, same resolution, connected via HDMI.
There is something really strange since the upgrade, and I'm not sure why that is...
The configuration of the displays is so that the laptop is on the left (which it is, physically) and the large screen on the right. I have windows on both screens.
When I leave the computer alone and screens enter "power saving", if I wake the screens up, all windows are "back" to the laptop screen...
Since the initial question, I have noticed that in fact this has nothing to do with my locking the screen at all; it is systematic as long as the screens enter power saving mode (note: the screens, not the computer).
For this I have tried another configuration: only activate the Asus monitor via HDMI and deactivate the laptop's internal display... On wake up, the laptop screen highlights briefly before X "remembers" that "uh no, the guy wants the external display only" and switches back to the wanted configuration again.
Also, this laptop has an nVidia chipset, and it doesn't matter whether I use the nouveau driver or nVidia proprietary driver: the effects are the same.
I have opened a bug (link), but in the meanwhile, is there a workaround for this apart from, in settings, never let the screens "fall asleep", which is a waste?