Audio output not working? default audio sink automatically switches to HDMI

  • Hardware: Raspberri 4 B v1.1
    • OS: Raspbian GNU/Linux 10 (buster)
    • Java Runtime Environment: openjdk version “1.8.0_265”
      OpenJDK Runtime Environment (Zulu 8.48.3.246-CA-linux_aarch32hf) (build 1.8.0_265-b11)
      OpenJDK Client VM (Zulu 8.48.3.246-CA-linux_aarch32hf) (build 25.265-b11, mixed mode)
    • openHAB version: 2.5.10-1

The audio output is set in Paper UI/Configuration/System to
Default sink = System speaker
and is working well.

As soon as there is a monitor connected to any HDMI-input while (re-)booting the device, the audio output is automatically routed to HDMI and nothing comes out of the audio jack.
The effect is reversible - when you reboot w/o a monitor connected, the audio jack is working again.

Can be quite irritating as one spends a lot of time with checking the audio configuration…

IMHO this is a desired feature of the used OS ( raspbian) and caused by openHAB.
Reading Here you will find this:

If your display claims to have speakers, sound is output via HDMI by default; if not, it is output via the headphone jack. This may not be the desired output setup, or the auto-detection is inaccurate, in which case you can manually switch the output.

Hi Jürgen
thanks.
I didn’t succeed in manually switching (back) the output.
The setting in Paper UI/configuration has no effect .

What would be the way?

Sorry, I can’t help further. As said before that sounds as an OS feature, hence I would ask in an OS related forum.

Did you try to change it in the UI of the OS as described by @opus ( the linkhe provided ) ?