KDE plasma partial screen after unplugging hdmi second screen

I’ve had the same problem on openSUSE Leap 42.1, but didn’t want to delete all my desktop settings (and KDE on openSUSE doesn’t have a „.kde“-folder, only “.kde4”, the deletion of which of course didn’t do anything, deleting kde-related things in .config didn’t help either).

Here is what I did to solve the problem without deleting any other settings:

Comparing the contents of ~/.local/share/kscreen/ of my account with that of a new account showed that instead of one file, there were six with names like “2b70a6fd3b2743573dc02a7767a1512d“ and “2b70a6fd3b2743573dc02a7767a1512d_lidOpened“. The contents of the files showed that some of them contained completely wrong resolutions and x/y positions.

With the second screen plugged in via hdmi, I deleted all files in there. KDE immediately recreated one file “2b70a6fd3b2743573dc02a7767a1512d“ which included the correct resolutions and positions for both screens.

After logging out and back in, I could unplug the hdmi and everything works as expected. Still works after rebooting.


Toggling projection (FN key + F7 on my laptop) solved it for me.

Decided to contribute this answer as it's easier to to see if toggling projection solves the issue before trying other methods listed here like deleting KDE config.