Bug 483143 - Wayland multi-monitor output order changing on session start
Summary: Wayland multi-monitor output order changing on session start
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-10 17:59 UTC by Nick
Modified: 2024-03-11 19:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Typical Wayland info center output (20.02 KB, text/plain)
2024-03-10 17:59 UTC, Nick
Details
Alternate Wayland info center output (20.02 KB, text/plain)
2024-03-10 17:59 UTC, Nick
Details
kwinoutputconfig.json (2.77 KB, application/json)
2024-03-10 20:43 UTC, Nick
Details
KScreen 2 enabled but "Not running" (115.86 KB, image/png)
2024-03-11 03:20 UTC, Nick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick 2024-03-10 17:59:07 UTC
Created attachment 166895 [details]
Typical Wayland info center output

SUMMARY
On Wayland session start, multi-monitor order appears to change randomly. Simply logging out and in is enough.

STEPS TO REPRODUCE
1. Log in to a Wayland session
2. Open the Wayland section in the Info Center
3. Check xdg_output and wl_output

OBSERVED RESULT
Between sessions, order of monitors may change.

EXPECTED RESULT
Monitors always keep the same order.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: CachyOS, but also observable on latest KDE Neon
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
On Fedora KDE with Plasma 5.27.10, and CachyOS before Arch updated to Plasma 6.0.1, the order of monitors remains fixed. (With the order of the first log.) With Plasma 6.0.1, it switches on session start randomly. Since I only have two displays I can test with, I can't tell what happens to the order with three or more.
I noticed this when certain mpv functions started behaving differently right after the upgrade to Plasma 6.0.1.

I'm not sure if this is the correct Product/Component. The order of screens in the Window Manager section of the Info Center remains the same (DP-1 > HDMI-A-1) when the order flips in the Wayland section.
Comment 1 Nick 2024-03-10 17:59:55 UTC
Created attachment 166896 [details]
Alternate Wayland info center output
Comment 2 Zamundaaa 2024-03-10 19:33:35 UTC
Please attach your ~/.config/kwinoutputconfig.json when the screens are in the right order, and when the screens are in the wrong order
Comment 3 Nick 2024-03-10 20:43:13 UTC
Created attachment 166906 [details]
kwinoutputconfig.json

The contents of kwinoutputconfig.json are exactly the same when the displays are in either order.
Compared both log out/in and full reboots. The file is still being modified between sessions.
Comment 4 Zamundaaa 2024-03-11 02:21:19 UTC
Oh, I thought this was about the position of outputs left/right being swapped... The order of wl_output globals is undefined, if mpv relies on the order not changing, that's a bug in mpv.
Comment 5 Nick 2024-03-11 03:20:33 UTC
Created attachment 166930 [details]
KScreen 2 enabled but "Not running"

Well if I boot my Fedora install which is still on Plasma 5.27.10, I can relog 20 times in a row and the order of xdg_output and wl_output will not change once between sessions. On Plasma 6.0.1 it will change after 3 at the most.
The only other difference between Plasma versions I can think of is kscreen 2 not starting automatically despite being enabled on Plasma 6.0.1. I see this on fresh installs of KDE Neon and CachyOS.

Journal shows this:
Mar 10 17:52:08 system dbus-broker-launch[1535]: Service file '/usr/share/dbus-1/services/org.kde.kscreen.service' is not named after the D-Bus name 'org.kde.KScreen'.
Mar 10 17:52:12 system dbus-broker-launch[1692]: Service file '/usr/share/dbus-1/services/org.kde.kscreen.service' is not named after the D-Bus name 'org.kde.KScreen'.
Mar 10 17:54:12 system dbus-broker-launch[3505]: Service file '/usr/share/dbus-1/services/org.kde.kscreen.service' is not named after the D-Bus name 'org.kde.KScreen'.
Comment 6 Nick 2024-03-11 19:31:35 UTC
Oh, kwin manages screens on Wayland with Plasma 6 which is why kscreen doesn't run. Tried disabling it on Plasma 5.27.10 but the order of xdg_output and wl_output still wouldn't change. I really don't understand the change in behavior.