Laptop desktop sometimes defaults to the wrong external display

Hello,

I have a laptop with Manjaro running KDE desktop… I can hook it up to a dock with two external displays.

I have configured the displays using the KDE > System Settings > Display Configuration so that both are “Enabled” and one of them is “Primary”. Most of the time everything works fine this way.

My Question:
Sometimes when the laptop is NOT docked and I am working on something then I dock the laptop the desktop appears on the wrong display… the one that is NOT configured as the “Primary” display. So I have to drag all the windows over to my main so-called primary display.

When I click “Identify” it does correctly identify the external displays.

Has anyone come across this before?

An experiment:
I’m having trouble trying to replicate exactly when this happens. Earlier it happened when the laptop was booted up with applications running and it was not docked. I closed the lid (in my configuration this just turns off the laptop display) then docked it and then the laptop desktop appeared on the wrong external display. But actually I tried repeating this now and the laptop desktop appeared on the correct external display, the “Primary” one.

What I want:

  1. Whenever the laptop is docked and off when I turn it on I want the laptop desktop to go to Dell P2419HC.
  2. If the laptop is docked and I put it to sleep then when I wake it up I want its desktop to go to Dell P2419HC.
  3. If I am working on the laptop and it is not docked, when I put it in the dock again I want the laptop desktop to go to Dell P2419HC.

No exceptions!

Cheers,

Flex