Bug 452247 - Window is placed on wrong screen after monitors power on
Summary: Window is placed on wrong screen after monitors power on
Status: RESOLVED DUPLICATE of bug 455066
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.25.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 452254 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-04 01:14 UTC by rlk
Modified: 2022-08-21 03:46 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rlk 2022-04-04 01:14:16 UTC
SUMMARY
***
When I resume a session with two monitors after screens have been powered down by power management, a window on the second monitor comes back on the first monitor even with an explicit rule placing the window on the second monitor.  To correctly place the window, I need to make any change to the window rule (e. g. change Initial placement from Force Temporarily to Do Not Affect or vice versa -- that's the one I toggle, so I alternate which setting gets used), and the window is then placed correctly on the second monitor.

This started some time within the past few months; I'm not sure exactly what Plasma version is involved.
***


STEPS TO REPRODUCE
1. Place a window on the second monitor (I use a window rule forcing screen 1 with Apply initially -- it doesn't matter whether I use Apply initially, Force, or any other setting).  The window in question is a full-screen VNC viewer, but I believe I've seen it with other windows.
2. Allow the power saving to turn on (I use screen energy saving at 120 minutes).
3. Move the mouse or press a key and wait for the screen to power on.

OBSERVED RESULT
VNC window in question is placed on the first screen of my 2-monitor setup; I have to minimize it, since it's full screen.  If I then make any change to the window settings for the window in question and restore the window, it comes back on the second monitor.  The change must be to a rule affecting the window in question; changing a different rule does not resolve the problem.

EXPECTED RESULT
Window should display on the display it was previously on.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: OpenSUSE 15.3
(available in About System)
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.2
Kernel Version 5.3.18-150300.59.54-preempt (64 bit)
Graphics Platform: X11

ADDITIONAL INFORMATION

Primary display (screen 0): Dell U2718Q, positioned at left, portrait mode (3840x2160)
Secondary display (screen 1): Dell P2715Q, positioned at right, same
Comment 1 rlk 2022-04-04 15:33:59 UTC
To be clear, this is a regression, probably from either 5.23 or 5.22.
Comment 2 Nate Graham 2022-04-04 20:40:41 UTC
If it affects non-KDE apps and Window Rules don't fix it, it's not an issue with the X11-specific code to position windows, as that only affects certain KDE windows and hasn't changed in a while and it's in the Frameworks release cycle anyway.
Comment 3 Nate Graham 2022-04-04 20:55:38 UTC
*** Bug 452254 has been marked as a duplicate of this bug. ***
Comment 4 Jiri Slaby 2022-04-05 06:27:22 UTC
(In reply to Nate Graham from comment #2)
> If it affects non-KDE apps and Window Rules don't fix it, it's not an issue
> with the X11-specific code to position windows, as that only affects certain
> KDE windows and hasn't changed in a while and it's in the Frameworks release
> cycle anyway.

+1 as happens both to all windows, incl. xterm (Xwayland) and konsole (wayland).
Comment 5 rlk 2022-04-18 19:08:55 UTC
Same thing happens when I start the window in question: it comes up on screen 0, and I have to fiddle with the window management rule in the same way (e. g. toggle the forcing rule, regardless of what state it was initially in).
Comment 6 postix 2022-07-19 19:47:13 UTC
Can confirm on 

Operating System: openSUSE Tumbleweed 20220714
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.9-2-default (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX 580 Series

with VLC, Firefox for instance:

1) Turn off both screens
2) Turning on the primary, where Firefox or VLC are located
3) Turn on secondary screen: Firefox and VLC switch the screens.
Comment 7 Fushan Wen 2022-08-21 03:46:16 UTC

*** This bug has been marked as a duplicate of bug 455066 ***