Screen changing resolution without input by me

I have an annoying situation on my TW KDE system. I use a KVM switch to allow me to switch between this system and another small PC. Sometimes when it is switched to the other PC the TW system alters the screen resolution but with no action or input by me. So when I switch back the display is 1024x768 and not 1920x1080 which is how it is set up. Also when I try to use System Settings Display & Monitor I am unable to increase the resolution as the maximum available shows as 1024x768. The only way I’ve been able to reset it is to logout and login again which is intensely annoying. Incidentally the other PC which is running Windows 7 does not change resolution at all no matter how long the monitor is switched away from it.

So something is doing this while the monitor is switched away from the TW system. Is there any way I can prevent this or perhaps at a push at least reset it by command rather than having to logout/in?

Stuart