0018
Posts: 1
Joined: Sun Jul 07, 2019 6:43 pm

RPi4 Buster no Sound on HDMI

Sun Jul 07, 2019 7:00 pm

Hi,

i have a problem with the sound over HDMI on my Rpi4 4GB with Buster. It is not possible to get sound over HDMI, 3,5mm² is fine.
I tried the advanced settings in the raspi -config to force the audio over HDMI, but nothing happend, also after a reboot.

Is there other options which i have to activate?

Thanks.

trejan
Posts: 3063
Joined: Tue Jul 02, 2019 2:28 pm

Re: RPi4 Buster no Sound on HDMI

Sun Jul 07, 2019 8:17 pm

What does "sudo tvservice -a" say?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11052
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: RPi4 Buster no Sound on HDMI

Mon Jul 08, 2019 5:06 pm

Only one HDMI port is currently supported for audio at a time, and it is independent of the video.
Default is HDMI0, therefore if your monitor is connected to HDMI1 you will get no audio.

"hdmi_preferred=1" in /boot/config.txt to shift audio (and CEC) to HDMI1.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Thom101
Posts: 4
Joined: Fri Jul 12, 2019 9:27 pm

Re: RPi4 Buster no Sound on HDMI

Fri Jul 12, 2019 9:38 pm

I have a new Pi 4 B 4gb I go the Raspian NOOBS 3.2.0 and the sound and HDMI0 stopped working for me (I will attempt to reinstall 3.1.1 unless my card was corrupted) but the issues seems similar to 0018's issue. But I didn't look in the configuration to see what was going on. My Pi 3 B+ is still working fine and the 4 seems like it was getting hot also. You have any of the other issues 0018?

zabadaba
Posts: 1
Joined: Sun Jul 14, 2019 10:23 am

Re: RPi4 Buster no Sound on HDMI

Sun Jul 14, 2019 10:25 am

THANK YOU! I tried everything I could find on this issue and this explanation fixed it.

snowballEarth
Posts: 77
Joined: Wed Feb 18, 2015 9:05 pm

Re: RPi4 Buster no Sound on HDMI

Fri Aug 23, 2019 7:14 pm

Raspbian buster and libreelec 9.1.002 didn't play well with my 8-year-old Logik branded tv.
The sound didn't come on through hdmi, but picture did (albeit at only 720p, when tv supports 1080p)

I looked at other threads and the following line brought back sound over hdmi:
add "hdmi_drive=2" to /boot/config.txt in raspbian.
the file is located in /flash/config.txt in libreelec.

bunklung
Posts: 107
Joined: Tue Jun 25, 2019 12:10 pm

Re: RPi4 Buster no Sound on HDMI

Tue Aug 27, 2019 10:56 am

6by9 wrote:
Mon Jul 08, 2019 5:06 pm
Only one HDMI port is currently supported for audio at a time, and it is independent of the video.
Default is HDMI0, therefore if your monitor is connected to HDMI1 you will get no audio.

"hdmi_preferred=1" in /boot/config.txt to shift audio (and CEC) to HDMI1.
This isn't documented and it didn't work for me :(

https://www.raspberrypi.org/forums/view ... 8#p1526219
https://www.raspberrypi.org/documentati ... t/video.md

Glot
Posts: 3
Joined: Sun Dec 08, 2019 5:21 pm

Re: RPi4 Buster no Sound on HDMI

Tue Feb 16, 2021 2:27 am

Warning - I'm a noob but this worked for me, YMMV use at your own risk.

I have a RPI4b 2GB and could throw a nice Raspbian screen on my large LG TV. No audio though.

2/14/21 I started with downloading berryboot (because I would like to boot multi OS) and copying the files to 32gb microSD. I then booted that berryboot loader and further installed the current Raspbian OS option (large) over the net.
After booting to a nice desktop I did what I hope is a proper update typing these into a Terminal
sudo apt update
sudo apt full-upgrade
and I did a reboot.
Desktop resized from the menus and all we need is some sound.
Speaker icon (right click) has a choice of Analog (top) and HDMI (bottom checked). Speaker icon {left click) sets a level 0 - 100.
HDMI choice doesn't fix sound.

** Executive summery - For my 1 hdmi TV setup the solution is to use: sudo raspi-config then select System Options, S2-Audio, HDMI 1 **

2/15/21

If you are in my situation googling for an answer there's your quick fix above. Read on if you are trying gather bread crumbs for a permanent fix so noobs like me don't waste days trying fix sound configuration with an HDMI TV and the RPI4.

I had played with a RPI4 previously using sudo raspi-config to fix some issues but noticed on the PI site a warning not to use that unless requested by RPI support. It had a been awhile and thinking this might indicate instability I went googling for info and came across this thread.

So I tried the various recommendations here and elsewhere to make changes in /boot/config.txt and /boot/cmdline.txt - the second I guessing is passing various parameters to a kernel sound module. I also tried various combinations of 0/1 data with those three parameters but never getting HDMI sound. I finished with them all set to one, but not seeing any fixing of the issue. tvservice also was not helpful - at least for me.

Next I plugged earphones into the RPI4 and sure enough there was sound on Chromium - just not over hdmi. After reading here about various uses of aplay I tried:
sudo aplay -l
and
sudo aplay -L
Getting plenty of debugging info on both a Headphones device and an HDMI 1 device.

Next I d/l'd a wav file and played it on the GUI in a Terminal window with

sudo aplay -D hw:CARD=0, DEV=0 all_I_know.wav

I suddenly heard Bill Shatner booming out of the TV with 'That's all we know." from a Trek clip. Now we were getting somewhere!
I could play it on headphones (earphones actually) with a 0 -> 1 change

sudo aplay -D hw:CARD=1, DEV=1 all_I_know.wav

Now it was tinny Bill on the headphones. This also played on the headphones:

sudo aplay -D hw:CARD=Headphones, DEV=0 all_I_know.wav

This also worked with the big screen:
sudo aplay -D hw:CARD=b1, DEV=0 all_I_know.wav

But :
sudo aplay -D hw:CARD=HDMI, DEV=0 all_I_know.wav
or:
sudo aplay -D hw:CARD=HDMI1, DEV=0 all_I_know.wav
just return :
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
aplay: main:828: audio open error: No such device

At this point I'm guessing something in the desktop applet Volume Control (ALSA/BT) is knackered because while the volume slider works (Bill gets louder) choosing HDMI/Analog never changes Chrome playback - always the tinny earphones. But it does show different slider levels.

Finally I decide to gird my loins and return to old raspi-config - worse case I rebuild from scratch if it mungs it too badly. That's when picking system_options and setting S2 Audio to option 0 - HDMI 1 takes my GUI desktop to sound over HDMI and Chromium sounds as good as Bill's wav file.

However the desktop applet Volume Control (ALSA/BT) can still select between analog and digital and set a different volume level for each. No GUI sounds come out the headphones BUT the volume is properly set for each device depending on the last device choice. I know this is so because the headphones still work when you send Bill's 'That's all we know' using the aplay command to the headphones. So I'm guessing this is something in the ALSA applet and how HDMI is not like HDMI #. Sorry I don't have the expertise to fix it better.

As Bill would say "That's all I know".

Kudos to Bill Shatner for his encouraging voice (over and over) and here's to any fellow noob this helps. I know it's not a solution but it may save some time finding the kludge. As we old guys say "Even the blind pig occasionally finds a truffle.".

Dave

Return to “Troubleshooting”