Switching from TV to projector then back to TV gives me a blank screen until reboot

I have a hdmi splitter switch so I can see osmc on the TV or projector. If I boot up the Pi and the TV is on the pi hdmi source I see the interface however if I turn off the TV and on again then go to the right hdmi source I get a blank screen.

Same thing if I switch hdmi sources from projector cable to TV hdmi cable. The projector responds when I connect it to show osmc just not the TV, unless I reboot. It’s a 2012 Panasonic.

I remember having the same problem on Raspbmc which was fixed via ssh and adding a line a code, but I can’t find that’s link again sadly.

I control osmc via a usb keyboard or Yatse on Android or xmbc remote on ios. I have sound card overlay hifiberry-digi-overlay

You could try adding to config.txt:

which would mean the Pi wouldn’t know if hdmi cable is unplugged or switched.

Thanks that worked!