Bug 413627

Summary: screen positions of dual monitor setup does not get applied with one screen rotated
Product: [Plasma] KScreen Reporter: v
Component: commonAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: germano.massullo, nate, nick, prhunt, shiptome, subdiff, temptempor, v
Priority: NOR    
Version: 5.17.1   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 5.17.3

Description v 2019-10-30 12:28:27 UTC
SUMMARY
When I rotate my second screen and change the positions of the screens (first screen --pos 0x213) this will not persist after reboot. After reboot the screen positions reset. If I do not rotate one screen, all positions persist after reboot


STEPS TO REPRODUCE
1. open kscreen
2. rotate one screen by 90 degrees
3. change position of the other screen to 0x213
4. reboot


OBSERVED RESULT
after reboot primary screen will be at position 0x1053

EXPECTED RESULT
after reboot primary screen should be at position 0x213

SOFTWARE/OS VERSIONS
Linux: Manjaro
KDE Plasma Version: 5.17.1
KDE Frameworks Version: 5.63.0
Qt Version: 5.13.1

ADDITIONAL INFORMATION
Comment 1 Roman Gilg 2019-10-30 13:09:24 UTC
See https://phabricator.kde.org/D25062

If you want to on Arch/Manjaro you can easily test this patch by downloading the PKGBUILD, then applying the diff to the source and compiling the package from there.
Comment 2 v 2019-10-30 13:40:40 UTC
glad to see the problem is known. I downloaded the source of kscreen, changed the output.cpp in the kded folder like shown in your link. I created the pkg and installed it successfully. But the problem still persists and my screen positions is still messed up after a reboot. Did I do something wrong or might the committed patch be incomplete? Sorry, this is all a bit above my knowledge level and I am not sure what to do
Comment 3 Roman Gilg 2019-10-30 15:36:44 UTC
You can try first to also add some debug line
qDebug() << "XXXX TEST";

soewhere in the kcm constructor and start the kcm via
kcmshell5 kcm

from terminal to see if the debug line is printed.

If yes, there is a single call to Output::adjustPositions. Comment this one out and recompile to see if the issue is gone then at least.
Comment 4 Roman Gilg 2019-11-01 01:47:38 UTC
*** Bug 412368 has been marked as a duplicate of this bug. ***
Comment 5 Roman Gilg 2019-11-01 01:49:37 UTC
(In reply to Roman Gilg from comment #3)
> kcmshell5 kcm

This should have been:
kcmshell5 kcm_kscreen
Comment 6 Roman Gilg 2019-11-01 21:32:33 UTC
*** Bug 413705 has been marked as a duplicate of this bug. ***
Comment 7 Germano Massullo 2019-11-02 11:10:17 UTC
(In reply to Roman Gilg from comment #3)
> You can try first to also add some debug line
> qDebug() << "XXXX TEST";
> 
> soewhere in the kcm constructor and start the kcm via
> kcmshell5 kcm_kscreen
> 
> from terminal to see if the debug line is printed.
> 
> If yes, there is a single call to Output::adjustPositions. Comment this one
> out and recompile to see if the issue is gone then at least.

Can you please write down a complete procedure? I am not used to KDE/Plasma debug procedures.
Thank you
Comment 8 Paul Hunt 2019-11-03 21:42:50 UTC
I can confirm that this behaviour is also occuring in Opensuse Tumbleweed.  I have two screens, one of which is in portrait orientation.  The two screens overlap on boot.  I can re-position the screens using Kscreen, but the correct position does not persist after logging out of the session and back in.

Operating System: openSUSE Tumbleweed 20191101
KDE Plasma Version: 5.17.2
KDE Frameworks Version: 5.63.0
Qt Version: 5.13.1
Kernel Version: 5.3.7-1-default
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-2600K CPU @ 3.40GHz
Memory: 15.6 GiB of RAM
Comment 9 Paul Hunt 2019-11-03 21:47:30 UTC
To be more clear, the screen overlap occurs after logging in to a Plasma session.  The problem is not evident during boot.
Comment 10 Roman Gilg 2019-11-04 08:34:46 UTC
*** Bug 413785 has been marked as a duplicate of this bug. ***
Comment 11 Christoph Feck 2019-11-05 22:08:50 UTC
*** Bug 413106 has been marked as a duplicate of this bug. ***
Comment 12 Germano Massullo 2019-11-07 11:57:38 UTC
https://phabricator.kde.org/D25062#559530
Comment 13 Roman Gilg 2019-11-11 21:04:16 UTC
Git commit 0cf25b853ae3bff1bb1c1c05d6317994feedf061 by Roman Gilg.
Committed on 11/11/2019 at 21:04.
Pushed by romangilg into branch 'Plasma/5.17'.

fix(kded): read rotated output size

Summary:
When adjusting positions on config read respect the rotation value on reading
in the output size.
Related: bug 396354
FIXED-IN: 5.17.3

Test Plan: User tested it on a setup with one rotated output and two non-rotated outputs.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, gmassullo, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25062

M  +18   -1    kded/output.cpp

https://commits.kde.org/kscreen/0cf25b853ae3bff1bb1c1c05d6317994feedf061