Bug 348016

Summary: Window positions not applied on secondary monitor
Product: [Plasma] plasmashell Reporter: Ancoron <ancoron.luciferis>
Component: generic-multiscreenAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal CC: bugs.kde.org, kde, notmart, plasma-bugs, sebas
Priority: NOR Keywords: triaged
Version: 5.3.0   
Target Milestone: 1.0   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: xorg.conf
krandrrc
kscreen config
Excerpt for "kscreen" from xsession-errors

Description Ancoron 2015-05-20 16:39:57 UTC
I have a dual-monitor setup manually configured in the xorg.conf and SDDM is working correctly.

However, after the very first login using plasma5 I noticed that the monitor positions had swapped, although the primary monitor was still where it was supposed to be.

As a result I went into the display settings and corrected that.

However, any subsequent login brings back applications only inside the primary monitor, although I left some on the secondary. So, the secondary monitor is always empty.

To me it feels like the kscreen/krandr configuration is applied after window positions are initialized, so that application windows that where previously on the secondary monitor (which is left of the primary) are moved to the primary because plasma/kwin/... thinks that the windows would be out-of-screen otherwise.

Reproducible: Always

Steps to Reproduce:
1. configure dual-head setup with secondary monitor left of primary inside xorg.conf
2. login
3. correct swapped monitors
4. move some application to secondary monitor
5. logout
6. login again

Actual Results:  
All application windows are moved inside the primary monitor.

Expected Results:  
Application windows left on the secondary monitor should be restored at the same position with the same window size.

In KDE SC4 everything was working fine and I didn't need to configure anything using kscreen or xrandr.
Comment 1 Ancoron 2015-05-20 16:40:47 UTC
Created attachment 92732 [details]
xorg.conf
Comment 2 Ancoron 2015-05-20 16:43:35 UTC
Created attachment 92733 [details]
krandrrc
Comment 3 Ancoron 2015-05-20 16:44:02 UTC
Created attachment 92734 [details]
kscreen config
Comment 4 Ancoron 2015-05-20 17:09:10 UTC
Created attachment 92735 [details]
Excerpt for "kscreen" from xsession-errors

I just deleted the krandrrc and kscreen config files to see what would happen with the same result.

I've attached an excerpt of the xsession-errors log from the first login afterwards. To me, it shows that kscreen does not even look at the xorg.conf.
Comment 5 David Edmundson 2015-05-20 23:03:10 UTC

*** This bug has been marked as a duplicate of bug 161325 ***
Comment 6 Ancoron 2015-05-21 07:20:02 UTC
(In reply to David Edmundson from comment #5)
> 
> *** This bug has been marked as a duplicate of bug 161325 ***

Sorry, but I disagree on the duplicate:
1. KDE 4 was just fine with my xorg.conf - no separate xrandr or kscreen config needed
2. I am not using Xinerama
3. my monitors are permanently available - no (un-)plugging while the system is running
Comment 7 Marco Martin 2015-05-22 08:49:18 UTC
well, to see if is really the same issue,
check if the commit in kwin
http://commits.kde.org/kwin/8de4e4d84ecd0de9046995a07de72323b8754dbe
solves this problem as well
Comment 8 Ancoron 2015-05-22 10:20:33 UTC
The commit is already included in my version and does not solve the problem, sorry.
Comment 9 Piotr Dobrogost 2016-07-16 10:11:41 UTC
@Ancoron
Is this still an issue?
Comment 10 Sebastian Kügler 2016-08-08 11:34:07 UTC
Needs retesting...
Comment 11 Ancoron 2016-08-24 06:24:58 UTC
Yes, it is still the same. However, I just did a logout-login cycle and noticed something new to me:

Activities and open applications at logout time:
* Activity #1 (active): Firefox, Konsole, Thunderbird, Dolphin
* Activity #2: Firefox, Konsole, Dolphin
* Activity #3: n/a
* Activity #4: Firefox, Konsole, Dolphin

Activities and open applications after re-login:
* Activity #1: Firefox, Thunderbird
* Activity #2 (active): Firefox, Konsole, Konsole, Konsole, Dolphin, Dolphin, Dolphin
* Activity #3: n/a
* Activity #4: Firefox

So, only Firefox and Thunderbird actually stayed in the Activity they where left. All other application windows that I had open where restored in the Activity that was active after login.

However, the really interesting part is that it switched to Activity #2, although I left the "session" in Activity #1.

In addition, the main panel just switched from the primary to the secondary monitor. Really confusing.

And still, all restored application windows are located on the primary monitor and also the concrete positions (if they where on the primary monitor before) are not remembered correctly except for Thunderbird, which restores exactly as it has been left.
Comment 12 Andrew Crouthamel 2018-09-26 22:27:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Ancoron 2018-09-26 22:37:39 UTC
Although window positions and sizes are almost always still messed up after logout/login cycle, the application windows are placed inside the correct displays.