I get these bubbles every now and then from my 2 xp4's on my Malawi tank, interestingly I never get it from the sunsun...
Any way, after many a rude word, I traced the problem to the intake pipe!
It has a habit of blocking half way in, making the pump suck harder to get in the water, which lowers the water inside the pump, which in turn brings the propellor into contact with the top of the water, and as the propeller spins, its creates bubbles, which are spat out the 'out' pipe!!
It only ever happens with my Malawis, but then the malawis are in a tank with a higher ph, 8.2, and higher ph helps slime algae to grow, and its slime algae that grows inside the intake pipe and blocks it.. I dont know why it only affects the in pipe though, and not the out!!
Anyway I dont know if this helps, but its worth checking.