Rpi 4 not sound via HDMI

I installed DietPi in a RaspberryPi 4 Model B but HDMI audio is always disconnected, so audio is always in mute.

I tested using Mate, XFCE, and LXDE with the same result.

Required Information

  • DietPi version |
    root@DietPi:~# cat /boot/dietpi/.version
    G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=10
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH='master'
    G_GITOWNER='MichaIng'
    
  • Distro version |
    root@DietPi:~# echo $G_DISTRO_NAME $G_RASPBIAN
    bullseye 0
    
  • Kernel version |
    root@DietPi:~# uname -a
    Linux DietPi 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64 GNU/Linux
    
  • SBC model | RPi 4 Model B (aarch64)
  • Power supply used | Dedicated 5V 1A
  • USB flash drive used | ScanDisk USB3.1 32GB

Additional Information (if applicable)

  • Software title | Mate, XFCE, and LXDE Desktop
  • Was the software title installed freshly or updated/migrated? Fresh
  • Can this issue be replicated on a fresh installation of DietPi? Yes
  • Bug report ID | 8824aa5b-b4c5-4ca4-876b-ee83e095eedf

Steps to reproduce

Fresh installation of Mate, XFCE, and LXDE Desktop:

  1. Display Options
  • Display Resolution → vc4-kms-v3d
  • GPU/RAM Memory Split → 256 : Video Encoding
  • RPi Codecs → [On]
  • RPi Camera LED → [Off]
  1. Audio Options
  • Sound card → [rpi-bcm2835-auto]
  1. Performance options
  • Overclocking → high ARM (1900/600/4)
  • ARM Initial Turbo → [60 seconds]
  1. Advanced options
  • Swap file: [off]

Expected behavior

  • Audio enabled

Actual behavior

  • Audio is always mute.
  • ex. on Mate, “Audio preferences” says that vc4-hdmi-0 and vc4-hdmi-1 are disconnected, but it is connected to a HDMI TV.

Extra details

  • It works fine with other distributions.
  • Works fine via headphones

What happens if you select rpi-bcm2835-hdmi?

Same result.

Tested as well with

hdmi_group=1
hdmi_mode=1
hdmi_drive=2

Still no lucky.

Is PulseAudio installed along xfce?

I know that ALSA is installed when you config the audio in dietpi-config.
You can check if PulseAudio is intalled and running with pactl list.

@MichaIng you are our sound specialist, can you check pls.

PulseAudio shouldn’t be installed with any desktop. Can you additionally show the output of:

aplay -l
grep -v '^[[:blank:]]*#' /boot/config.txt
cat /boot/cmdline.txt

Ah, and you did reboot after changing audio settings?