Bug 425796

Summary: Screen rotation is applied the wrong orientation in KCM on Wayland
Product: [Applications] systemsettings Reporter: Claudius Ellsel <claudius.ellsel>
Component: kcm_kscreenAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, kde, nate, nicolas.fella, plasma-bugs-null
Priority: NOR Keywords: wayland-only
Version First Reported In: 5.20.90   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screen settings

Description Claudius Ellsel 2020-08-25 19:25:09 UTC
When I rotate the screen vertically in the KCM on Wayland the orientation is exactly the opposite to what it shows (180° wrong). It works as expected on X11.

Probably wrong product, sorry in advance.
Comment 1 Nicolas Fella 2020-08-25 23:43:10 UTC
Can't reproduce on master
Comment 2 Claudius Ellsel 2020-08-26 13:46:07 UTC
Hm, might have been fixed in between then for master. Can I just test it on master myself by following https://community.kde.org/Get_Involved/development#Plasma? Or is the procedure to compile systemsettings with kdesrc-build and run it on the normal Plasma session? Or something else?
Comment 3 Nate Graham 2020-08-26 16:16:19 UTC
That should work. Make sure you remember to run install-sessions.sh after everything is built. That's what puts the built-from-source session in your login screen's sessions list so you can log into it.
Comment 4 Claudius Ellsel 2020-08-26 19:15:49 UTC
Created attachment 131206 [details]
Screen settings

Hm, I did that and I can still reproduce on the compiled Plasma session on Wayland.

kdesrc-run systemsettings did not work, maybe one has to invoke it with a special command for the specific kcm. But it should probably have used the freshly compiled systemsetting anyway from how I read Nate's comment.

Attached is a screenshot. I tried the other vertical orientation and the screen flipped 180°. So for me it still is not working.
Comment 5 Claudius Ellsel 2020-10-17 17:31:04 UTC
(In reply to Nicolas Fella from comment #1)
> Can't reproduce on master

Still happening for me on Plasma 5.20. Let me know whether you need more details.
Comment 6 Claudius Ellsel 2020-11-07 15:42:50 UTC
Seems it got fixed in between. At least it appeared to work as expected with the compiled session from master today.
Comment 7 Nate Graham 2020-11-09 14:57:40 UTC
Cool!
Comment 8 Claudius Ellsel 2020-11-09 15:23:17 UTC
Preferably, if the commit fixing this can be identified, this should be backported from master (if not done already).

Thus people won't have to wait until the next major release for a fix.
Comment 9 Nate Graham 2020-11-09 15:32:31 UTC
Sure, feel free to find that commit.
Comment 10 Claudius Ellsel 2020-11-09 16:12:40 UTC
I won't have much luck with that probably. In the code of the KCM itself there does not seem to have been relevant commits in the near past.

The relevant UI QML files are probably
https://invent.kde.org/plasma/kscreen/-/blob/master/kcm/package/contents/ui/Orientation.qml
and
https://invent.kde.org/plasma/kscreen/-/blob/master/kcm/package/contents/ui/RotationButton.qml

But I don't know which actions in code are triggered by them.

Since I am not paid to invest time to understand the code or to ensure the quality of KDE products, I will probably stop my research at this point and hope somebody else will pick up.

Also adding Aleix to CC, since he did some recent commits to the project.
Comment 11 Claudius Ellsel 2021-01-26 13:53:19 UTC
*** Bug 432101 has been marked as a duplicate of this bug. ***
Comment 12 Claudius Ellsel 2021-01-26 13:55:03 UTC
Reopening here, as I ran into this bug again when testing the 5.20.90 Beta on openSUSE Tumbleweed. Not sure whether this is a regression or only ever was fixed for the compiled from master session I tested with.