Directly after login the external display works fine and also shows as the primary display. But the Display Configuration shows that there is another screen (the laptop-screen) that is in state "Enabled". Thus it happens from time to time that applications start on that screen and thus are out of sight. Opening the lid shows the missing application-windows on the secondary monitor. Closing the lid then disables the laptop-screen (changing it's status in Display Configuration) and thus application-windows are moved to the primary (externally connected) screen. Reproducible: Always Steps to Reproduce: Login to the system with an external monitor (docking) connected and laptop-screen-lid closed. Actual Results: Laptop-screen also shows in state "Enabled", as a secondary screen. Expected Results: It should be Disabled while closed - as it appears after opening and closing the lid.
Thanks for the bug-report! We've fixed a number of issues in the most recent development cycle that would lead to the problem you're observing. Could you test Plasma 5.8 please and confirm that it's fixed (and, if not definitely report back)? I'll close this bug for now, as I'm pretty sure the problem is gone in 5.8. (I've tested this use-case myself, and confirm it's working now.)