Bug 468538

Summary: Wayland: Upon display entering sleep and being woken, certain windows are placed out of bounds
Product: [Plasma] kwin Reporter: Naxdy <xnaxdy>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: major CC: asturm, kde, mk.mateng, nate
Priority: NOR    
Version: 5.27.4   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Naxdy 2023-04-15 14:30:07 UTC
SUMMARY
Since some time in the 5.27 cycle, certain windows are placed out of bounds when the display enters sleep. Specifically, they are placed beyond the right hand border of the display (i.e. if the display's resolution is 1920x1080, the windows will be placed at X > 1920). In my setup, there is only 1 display connected.

Not all windows are affected by this, and they are not always affected either. Most commonly, the windows that I notice this behavior with are Dolphin, Telgram Desktop, and KeepassXC. Sometimes it's all of them, sometimes only a few, and sometimes even none.

These windows are usually located near the right boundary of my monitor, tiled using KWin's custom tiling feature. However, this issue seems to occur even if the windows are floating elsewhere.

The windows can be recovered by right clicking them in the task manager and selecting "move", this makes them peek from the right hand side of the display.

STEPS TO REPRODUCE
Currently unclear how to *reliably* reproduce this. For me, this does the trick:
1. Lock session
2. Turn off display by pressing ESC
3. Wait 10 seconds
4. Wake display
5. Unlock session

OBSERVED RESULT
Certain windows have vanished into the nethersphere.

EXPECTED RESULT
All windows are at the same location they were in before the session was locked.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo
(available in About System)
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
-
Comment 1 Nate Graham 2023-04-17 16:41:26 UTC
X11 or Wayland? Or both?
Comment 2 Naxdy 2023-04-17 17:15:28 UTC
This was tested on Wayland. Not sure if it also happens on X11.
Comment 3 michaelk83 2023-04-26 16:11:25 UTC
Suspect duplicate of Bug 468184 (and likely Bug 452118), assuming the display effectively disconnects when going to sleep.
Comment 4 Nate Graham 2023-04-26 19:50:56 UTC
Maybe; Bug 452118 supposedly doesn't affect Wayland users.
Comment 5 David Edmundson 2023-04-27 07:17:20 UTC
Sleep and wake can disconnect and reconnect monitors, lets consider this a dupe of this bug about unplugging unless any information shows otherwise. I've asked for some specific information in that bug which could be useful here too.

*** This bug has been marked as a duplicate of bug 469034 ***
Comment 6 Naxdy 2023-04-27 08:02:48 UTC
Shouldn't it be the other way around, given that this bug was reported first?
Comment 7 Nate Graham 2023-12-01 00:32:24 UTC

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