Reason why i asked what device is because I never had luck with HDMI output with my Panasonic 5.1 Home Theater
system. It only worked when the TV was on and the Rasperry output was visible there.
Without the TV the HDMI did not seem to have a “connection”.
But you have a different case here…
It sounds a little similar as in both of your cases it doesn’t work when
there is no TV involved. Hdmi devices must need some sort of signal to
acknowledge the connection, perhaps your devices are not sending that? And
forcing it in the config gets around that?
In fact, if you take a look at https://github.com/woutervanwijk/Pi-MusicBox/blob/master/filechanges/opt/musicbox/setsound.sh#L42 you can see that it checks if there’s a HDMI connection detected and prints “HDMI output connected” if it finds one - do you see that in the startup messages? On my system without any HDMI connected, the output of that command is “state 0x120016 [DVI DMT (4) RGB full 4:3], 640x480 @ 60.00Hz, progressive” and it falls back to analog output. The name tvservice implies it needs a TV, probably because it uses HDMI-CEC.