The problem is quite easy to reproduce with a laptop:
- Boot up with connected external screen, set up as primary.
- Disconnect external screen.
- Connect the screen again.
- All off the windows stay on the built in screen
Is there a way to solve it? This happened after I updated to ubuntu 22.04.
Hi - there’s a bug related to the situation you’re describing - 455066 – Windows don't remember what screen they were on if that screen is disconnected and reconnected - that’s been fixed in KDE Plasma releases for quite a while now.
However, Kubuntu 22.04 ships with an quite old version of KDE Plasma by default (5.24), one that was released before the version in which that bug was fixed (5.26).
It might be possible to use the Kubuntu team’s Backports PPA to upgrade to Plasma 5.27 while staying on version 22.04 of the Ubuntu base, but adding PPAs should be done with caution since they can introduce other potential issues.
Hope that helps,