Monitor ``swapping'': Monitor 1 is now Monitor 2

I tend to keep my main desktop computer on all the time. On some days I’ll begin work only to find that some menus are not where I expected them to be. I use KDE’s Activities feature pretty extensively and being able to right-click on the background of Monitor 1 (on my left) to bring up the ``Activities…’’ menu and it’s not where I expected it to be (on Monitor 1)… it’s popping up on Monitor 2 (on my right). A little disconcerting as Monitor 2 is usually shared during the day with my corporate-issued Wintel laptop.

I’ve found that jumping into the ``System Settings’’ menu and manually dragging monitors 1 ] 2 ] -> 2 ] 1 ] (then Apply) and 2 ] 1 ] -> 1 ] 2 ] (and re-Apply) corrects the change.

The question: Any ideas as to what’s causing the monitor swapping? I also notice that, on some mornings, that the Panel has crashed over night. My suspicion is that these two events may be related in some way.

TIA for any information about this.

Kscreen2 is flakey. Try logging out of Plasma, removing all content from ~/.cache/, then logging back into Plasma. If that doesn’t help, or doesn’t stick, try unchecking the Kscreen box in startup settings. Then use xrandr or inxi -Ga to discover the output connector names X uses. Next create a new script in /etc/X11/xinit/xinitrc.d/. In the script, use those names with xrandr in the following form:

xrandr --output **HDMI-1** --primary --output **HDMI-2** --right-of **HDMI-1**