oslonha
Posts: 2
Joined: Thu Sep 21, 2023 12:47 pm

No audio through HDMI on Raspberry Pi OS Lite 64-bit

Thu Sep 21, 2023 12:59 pm

I have no audio output through HDMI on a Raspberry Pi 4 with Raspberry Pi OS Lite 64-bit.
I want to play a mp3 file from the command line using mpg123 software.

If I install Raspberry Pi OS 64-bit (Desktop version) and then I install the mpg123 software I can play the mp3 correctly.

However I have no audio on Raspberry Pi OS Lite 64-bit.
I installed Xorg, openbox, pulseaudio and mpg123, but when I run mpg123 with the same mp3 file the audio dosen't work on the same hardware as the desktop version.

The config.txt file of the Lite version is identical to that of Desktop version where audio works correctly.

Edit: I forgot to write that on Lite version I added the user to audio, video and render groups and that I run the mpg123 command from a terminal inside the desktop environment.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6954
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: No audio through HDMI on Raspberry Pi OS Lite 64-bit

Thu Sep 21, 2023 1:35 pm

I suspect audio may be coming through headphone socket - can you test that
If that is working, then you need to switch output device (the desktop image has a GUI control for that, but it will be possible from command line).

User avatar
kerry_s
Posts: 6595
Joined: Thu Jan 30, 2020 7:14 pm

Re: No audio through HDMI on Raspberry Pi OS Lite 64-bit

Thu Sep 21, 2023 1:56 pm

sudo raspi-config -> system options -> audio

oslonha
Posts: 2
Joined: Thu Sep 21, 2023 12:47 pm

Re: No audio through HDMI on Raspberry Pi OS Lite 64-bit

Thu Sep 21, 2023 7:58 pm

Thank you for the suggestions, I did some tests and noticed a strange behavior.
First of all I checked if the audio was coming out of the headphone socket and I found that yes, the audio was coming out of this connector.

I have two user on the system: user A privileged and user B unprivileged.
I have the desktop session with user B.
In the desktop session I opened a terminal, logged in as user A with

Code: Select all

su A
and then

Code: Select all

sudo raspi-config
If I go to system options -> audio I get this message:

Code: Select all

No internal audio devices found.
Then I tried to login through ssh with user A and executed again

Code: Select all

sudo raspi-config
in this way with system options -> audio I see two audio output:

Code: Select all

0 Headphones
1 MAI PCM i2s-hifi-0
I selected 1 MAI PCM i2s-hifi-0 and now I can play audio from the ssh shell, but if I return to the local shell on the desktop I still can't hear anything.
On the desktop I can't play audio neither with user A nor with user B.

pidd
Posts: 5203
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: No audio through HDMI on Raspberry Pi OS Lite 64-bit

Fri Sep 22, 2023 4:55 pm

On the desktop, try right-clicking the speaker symbol on the right hand side of the task task bar to select audio target..

Return to “Raspberry Pi OS”