Reciver switches source automaticly

Don’t know if it’s the reciver or the raspberry doing this. I set the reciver to be controlled via hdmi and it has worked well for a long time. Now suddenly it switches back to OSMC when i change source on the reciver.

If i turn of the hmdi controll option in the reciver it stops. Anyone familliar with this problem?