Bug 468252

Summary: Desktop Session does not restore windows to proper screen
Product: [Plasma] kwin Reporter: Karl Robillard <wickedsmoke>
Component: platform-x11-standaloneAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: jlp, julien.dlq, kde, m.kurz, miranda, nate, ol+kde, postix, s2, sam
Priority: NOR    
Version: 5.27.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=336990
https://bugs.kde.org/show_bug.cgi?id=482818
https://bugs.kde.org/show_bug.cgi?id=482895
Latest Commit: Version Fixed In:

Description Karl Robillard 2023-04-07 15:38:38 UTC
STEPS TO REPRODUCE
1. Use a two monitor (left-right) setup.  The left screen is the "Primary" Device.
2. Place Konsole windows on left screen.
3. Log out, then log back in.

OBSERVED RESULT
The Konsole windows appear on the right screen.  The window size and screen-relative placement are OK.

EXPECTED RESULT
The Konsole windows should appear on the left screen.

SOFTWARE/OS VERSIONS
Linux: Fedora 37
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
May be related to bugs marked as fixed: 427875, 442380

A work around is to set Session Restore to "When session was manually saved", place the windows on the opposite screen, then Save Session.
Comment 1 Nate Graham 2023-04-10 17:45:54 UTC
You're using the Wayland session, I assume? Probably the same root cause as Bug 421870.
Comment 2 Karl Robillard 2023-04-10 17:58:44 UTC
(In reply to Nate Graham from comment #1)
> You're using the Wayland session, I assume? Probably the same root cause as
> Bug 421870.

No, X11 with NVidia driver. 

Also note that the two screens have different background images which I sometimes see get swapped immediately after login.
Comment 3 Nate Graham 2023-04-11 15:42:10 UTC
(In reply to Karl Robillard from comment #2)
> Also note that the two screens have different background images which I
> sometimes see get swapped immediately after login.
Hmm, that seems related but is a separate issue and need to be reported separately.
Comment 4 Karl Robillard 2023-04-15 10:47:04 UTC
I'm not too concerned about the background image swapping as the images always end up on the same screen.  That was not the case before KDE 5.27.4, where some startup race condition would determine the screen placement.  Knowing that the images still jump screens may provide a clue for why the window placement is wrong.
Comment 5 kde 2023-06-15 17:23:04 UTC
I can confirm this bug. My setup is two monitors left-right (left: rotated right, right: primary). Windows from the previous session on the left screen are moved to the right screen, with the correct size. During login, the left monitor not is rotated to the right at first, but after a few seconds rotation happens.

This is Opensuse Tumbleweed-20230602, X11/intel integrated graphics.