I've seen this a lot since 5.5.95. I'm not sure if I saw it before, if so then it happened only rarely. I have a screen configuration with three screens. I will attach it to the bug. The x positions of the screens should be 0, 1920 and 3840 and are correctly assigned in the config file. At startup, all three screens are connected (seeing the sddm login screen on all three). After login, I'm presented with a clone setup and find in the file above the x position 0, 0 and 0. If I disconnect one of the screens (thus a different config file gets loaded), change the file so the correct x positions are in there and reconnect the screen, the file is loaded as it should and the correct screen setup is done. The only messages in journal I could find are: Mar 12 10:02:14 orionis kscreen_backend_launcher[1119]: kscreen.xrandr: Connected output 83 to CRTC 79 Mar 12 10:02:14 orionis kscreen_backend_launcher[1119]: kscreen.xrandr: Connected output 85 to CRTC 80 Mar 12 10:02:14 orionis kscreen_backend_launcher[1119]: kscreen.xrandr: Connected output 86 to CRTC 81 Mar 12 10:02:14 orionis kscreen_backend_launcher[1119]: kscreen.xcb.helper: Detected XRandR 1.4 Mar 12 10:02:14 orionis kscreen_backend_launcher[1119]: kscreen.xcb.helper: Event Base: 88 Mar 12 10:02:14 orionis kscreen_backend_launcher[1119]: kscreen.xcb.helper: Event Error: 145 Then there are some detail messages about the connected screens (layout, rotation etc.), but nothing interesting there. Interesting part is that I can't find something in the logs about loading or saving a screen configuration, but this must have happened since the config file was changed. IIRC, the respective log lines should come from kded5 or kdeinit5. Reproducible: Always
Created attachment 97851 [details] screen configuration
I have a similar problem with a configuration for laptop screen plus external monitor. The offset of the laptop screen should be (1920, 2160) but is sometimes reset to (0,0). I've seen this with all plasma 5.x.y versions that I've used so far. As a workaround I use incrond to run a script that restores the kscreen configuration file whenever it changes.
It's easier to remove write access to the file, but that still does not solve the problem at all.
With icrond's logging I was hoping to see a pattern when this occurs, but I couldn't find anything. It seems more or less random.
As I don't see this every time, I guess there is a race going on. To me, it looks like kscreen tries to look for a config, when some daemon or backend is sometimes not available to retrieve the config (e.g. kded or kdeinit). Then it tries a best guess at the screen config and writes that config to disk (at that time, the backend/daemon/whatever would be available, because it happens a bit later). Since I'm not good at understanding c++ and since I don't know kscreen in detail, that's just speculation. However, I remember from times where loading a config was successful, that there are lines in the log telling you that it found a config and tries to apply that. When the config gets rewritten, I can't find such lines in the log, but there aren't logs about something failing either. Other than the lines about some xrandr, but iirc that's normal (since there are multiple ones).
Not sure if related although it seems likely, but my 3 screen config seems to be lost each login (since qt 5.6) and is a joke to setup again with kscreen5. Video demonstration: https://www.youtube.com/watch?v=GWC_SrE9cco. Let me know if I should file separate bug. My 3 screens are correct at login manager, but on login the left and right (identical screens) are cloned and center screen is disabled.
I didn't have this anymore for quite some time, so might close this as resolved (one way or another).
Thanks for following up!