[RPi4] No HDMI audio on LibreELEC 10, 11 and 12

  • Hi everyone,

    I'm been through some hard times with my libreELEC installation and would like to share it with you - maybe anyone has an idea.

    I've been running an older LibreELEC install for years, and finally needed an upgrade before the Superbowl, because the PVR I wanted to install wasn't compatible with my Kodi version. Long story short, in the end I missed most of the Superbowl and spent my head banging against my Raspberry Pi 4, trying to get Audio via HDMI to work, but couldn't - the speakers just remained silent.

    24 frustrating hours later, I went back to Libreelec 9 which is the last version that works for me. When I upgrade to 10, I get the message that an incompatible version of config.txt was found and it will be replaced with the default - and that's where I know it's not gonna end well.

    The basic symptoms are that HDMI audio just won't be recognized. With libreelec 9 and Kodi 18 I have plenty of audio options, then I need to fix config.txt and I'm good to go. With 10+19 and 11+20 there's no passthrough available, and no audio choices except for Bluetooth via PULSEAUDIO (but I don't use Bluetooth). In the current version, I could at least choose HifiBerry as output option, but there's no HDMI to choose from either.

    Boot log shows this:
    CAESinkALSA - Unable to open device "default" for playback
    CAESinkALSA - Unable to open device "sysdefault" for playback
    CAESinkALSA - Unable to open device "sysdefault:CARD=vc4hdmi0" for playback
    CAESinkALSA - Unable to open device "hdmi:CARD=vc4hdmi0,DEV=0" for playback
    CAESinkALSA - Unable to open device "sysdefault:CARD=vc4hdmi1" for playback
    CAESinkALSA - Unable to open device "hdmi:CARD=vc4hdmi1,DEV=0" for playback

    Speaker Test:
    LibreELEC:~ # speaker-test -D hdmi:CARD=vc4hdmi0,DEV=0
    speaker-test 1.2.11
    Playback device is hdmi:CARD=vc4hdmi0,DEV=0
    Stream parameters are 48000Hz, S16_LE, 1 channels
    Using 16 octaves of pink noise
    Playback open error: -524,Unknown error 524

    LibreELEC:~ # aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

    LibreELEC:~ # aplay -L
    null
    Discard all samples (playback) or generate zero samples (capture)
    default
    Default Audio Device
    sysdefault
    Default Audio Device
    default:CARD=vc4hdmi0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    Default Audio Device
    sysdefault:CARD=vc4hdmi0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    Default Audio Device
    hdmi:CARD=vc4hdmi0,DEV=0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    HDMI Audio Output
    default:CARD=vc4hdmi1
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    Default Audio Device
    sysdefault:CARD=vc4hdmi1
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    Default Audio Device
    hdmi:CARD=vc4hdmi1,DEV=0
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    HDMI Audio Output

    To get audio to work, I think I've really done the sensible and the irrational, I've scraped the Interwebs for solutions, scraped the bottom of the barrel once again, just nothing worked. This includes:

    - Tried different ports
    - Got a different HDMI cable
    - Libreelec 10, 11 and 12
    - Tried countess configuration options.
    - Tried resetting to default
    ...and a ton of other stuff I can't recall right now due to sleep deprivation.

    For the moment, Libreelec 9 works fine with me, but for many good reasons, it would be great to run the most recent version. Any ideas what might be going on, and what I could try? Thanks!

  • There are no known HDMI audio problems in recent images (and we have a large RPi4/RPi5 userbase) but HDMI audio depends on the EDID data on the HDMI connection. No EDID or bad EDID or connecting to a monitor with no speakers or using HDMI adapters or bad HDMI cables or bad config.txt/cmdline.txt are the cause of most audio problems.

    • Ensure the board is running updated RPi firmware (done via LE settings)
    • Ensure the HDMI cable is a proper micro-HDMI to HDMI one (adapters frequently cause issues)
    • Ensure the cable is connected to HDMI-A-1 (socket nearest the power connector)
    • Connect the RPi directly to the TV (no AVR in the chain) then remove the SD card and power on. The board will boot to a status screen and you should see 'EDID = okay' against the active HDMI connection
    • Create a new/clean SD card using LE12.2 or a current LE13 nightly to ensure no old/existing config causes issues

    If still seeing a problem, put Kodi into debug mode, reboot to get a clean and complete debug log, then run "pastekodi" and share the log URL so we can see the output.

  • Thanks for the quick reply,

    I had done all of that already (like I said, I tried pretty much everything):
    - Updated the firmware
    - Bought a new cable
    - Switched connections
    - Installed LE12.2 from scratch

    Connecting directly to the "TV" isn't possible, as the "TV" is a beamer without speakers.

    And here's the thing: As a former sysadmin, I do a lot of troubleshooting, and when I'm entirely clueless (as is in this situation), I apply what I call "divide and conquer", i.e. I try to create a scenario where what I want to achieve works and one where it doesn't. Then I drill down to the differences, and ultimately find the culprit.

    Here, I have that information already: HDMI audio works with LE9 and fails with the changes done in LE10, which, among other things, render the previous configuration file invalid. So in my world, this would clearly point to a software problem. The fact that so many RPi4 users don't have the problem suggests I may have an unusual setup, but if the only change between "works" and "doesn't work" is a software change, then it still points to a software problem.

    I understand that things may be more complicated: It may be a combination of serveral things, including the hardware. Maybe it's not a bug, but a "feature" - possibly, version 10 onwards requires different hardware, but then the key to solving the problem is the software anyway, by figuring out what those requirements are. Unfortunately, as a user, my insight is limited.

    I am mentioning this because you asked me to test without LE10+ SD card. But I did that already by running it with an LE9 SD card, where EDID works fine (if HDMI audio works fine and it depends on EDID, that's the only logical conclusion - or am I missing something?).

    Speaking of unusal setup: I've mentioned it, but want to make sure it doesn't get lost in the mix. My RPi4 has Hifiberry Amp2 installed, which most users probably don't have. And I've mentioned that LE12 can see it (as in: I can choose it in the audio options), while LE10 and LE11 don't. Even though I don't need that audio option, maybe it would give us some clues. Not sure if that one depends on EDID as well, but since the issue is about LE not seeing audio options (or making them available), it might help to know WHY some newer versions of LE can't deal with this either, while some can.

    I already had the log file from a fresh LE12.2 install yesterday, so I'm simply attaching it - hope that's alright.

  • LE10+ uses a completly different (ground up rewrite) display pipeline to LE9.2, so yes there is a HUGE software difference. The main way this manifests for users is that almost all config.txt tweaks for forcing video and audio output used in the older display pipeline are no longer supported using config.txt, and are now achieved using standard Linux DRM methods/properties.

    It would be helpful if you described how everything is physically cabled/connected, and please share the "pastekodi" URL taken from the LE9.2 and a clean-install LE12.2 (or LE13 nightly) image so we can see kodi/kernel and various bits of config from the systems; the kodi.log on its own isn't giving us the full picture. If the RPi4 is connected to the projector using the HDMI socket nearest the power connector, please also run edid-decode /sys/devices/platform/axi/axi:gpu/drm/card1/card1-HDMI-A-1/edid | paste and share that URL too.

  • Thanks for the explanations. Getting things to work with LE9.2 is a two-step process. #1 I need to select HDMI in the audio options. #2 I need to tweak config.txt. In 10-12, HDMI never shows up as an audio option in the first place, so config.txt isn't a problem (yet).

    Physical connections (in all details): The RPi4 is directly attached to the Hifiberry Amp2. Power is provided by a 19V/3.42A AC adapter via Hifiberry. Internet via Ethernet cable. LE on a 4GB SD card (but also tested an 8GB USB stick with the same outcome). Signal goes out via a dedicated micro HDMI/HDMI cable to the AV receiver (tried both HDMI sockets on the RPi4 with the same result). Loudspeakers are directly attached to the receiver via cable. Video signal travels from the receiver to the projector via a HDMI/DVI adapter (it's an older projector with DVI only).

    I will follow up with the pastekodi URLs later (probably tonight).

  • Power up your RPi4 without the SD card and any other devices connected (i.e. only connect power and HDMI) and post the output of the "display:" line shown on screen.

    so long,

    Hias

  • Bash
    #!/bin/sh
    
    # SPDX-License-Identifier: GPL-2.0-or-later
    # Copyright (C) 2009-2016 Stephan Raue ([email protected])
    # Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
    
    token=$(echo "LibreELEC-9.2" | sha256sum | cut -d ' ' -f 1)
    
    cat "$@" | curl https://paste.libreelec.tv -F 'file=@-' -H "Authorization: Bearer ${token}"

    Save that ^ as /storage/newpaste and make it executable with chmod +x /storage/newpaste

    Then do pastekodi -c | /storage/newpaste and it will generate the URL

    ix.io has been down for years, hence we use our own paste server these days.

  • Power up your RPi4 without the SD card and any other devices connected (i.e. only connect power and HDMI) and post the output of the "display:" line shown on screen.

    so long,

    Hias

    display: DISP0: HDMI HPD=1 EDID=ok #2 DISP1: HPD=0 EDID=none #0

    As explained above, the fact that EDID works fine with LE9 already proved this, but here you have it.

    Pastekodi to follow (and sorry for the late replies, but I travel a lot, and so there are only certain time windows when I can do this).

  • Here are the files.

    12.2:
    https://paste.libreelec.tv/divine-humpback.log

    LibreELEC:~ # edid-decode /sys/devices/platform/gpu/drm/card0/card0-HDMI-A-1/edid | paste
    https://paste.libreelec.tv/present-quagga.log


    9.2.8
    https://paste.libreelec.tv/moral-shad.log


    Just to (possibly) save others some headaches, if you spend just a minute to provide a condensed, yet complete explanation, you could save n00bs like me hours of second-guessing. Like:

    In version 9.2, pastekodi is hardwired to ix.io which is down, so you need the following workaround to paste the logs.

    In 12.2, on the other hand, this workaround isn't needed. What's more, if you try the above workaround, it will fail with an "unauthorized" error.

    Hope this makes sense.

  • Code
    EDID of '/sys/devices/platform/gpu/drm/card0/card0-HDMI-A-1/edid' was empty.

    That's from the LE 12.2 system ^ and it explains why there are no HDMI audio devices listed in Kodi. The system log shows that the kernel detects HDMI audio card hardware on the RPi4, but as the connected HDMI device advertises no audio or video capabilities, Kodi is filtering that device out from the list. The AVR probably doesn't advertise capabilities as the projector is connected via DVI and DVI is a video-only connection type.

    The LE9.2 log shows that HDMI output is forced on using config.txt (which we suspected). I'm unsure what the exact mechanism used in the older display pipeline was, but this results in the kernel (and thus Kodi) seeing basic video and audio capabilities.

    That config.txt approach no longer exists in the current (no longer new) display pipeline. You can force the initial resolution and bit-depth for a DRM connector using kernel boot params but audio works entirely from the EDID data presented over HDMI. You can trick the kernel into seeing an HDMI device as always connected, see https://wiki.libreelec.tv/configuration/edid but this still requires an HDMI device with EDID data showing audio capabilities to capture from.

    Suggestions:

    a) Configure the AVR to mirror the video output on multiple connections, i.e. an HDMI output being available might result in audio capabilities being advertised with output mirrored to the DVI output.

    b) Configure the AVR to not pass-through the upstream device capabilities resulting in the RPi4 seeing an AVR with audio capabilities instead of a (DVI) video device with none.

    b) Capture EDID data from an HDMI device that does advertise audio capabilities. This will force the kernel (and Kodi) so see that device as connected. However this will dictate video output capabilities in addition to audio, so you might encounter display issues from the kernel attempting to use display modes that don't exist on or align with the projector.

    c) External HDMI to S/PDIF audio-splitter devices normally inject audio capabilities to the EDID on the HDMI connection so that audio can be sent to it (and then split out) with the video portion of HDMI connection passed through to the next-in-chain device.

    Beyond that I'm out of ideas /shrug

  • Thanks for the explanation as well as the detailed suggestions.

    I can't help but wonder why the config.txt approach was removed in the first place. I understand that software changes, and probably there was some solid reason why this type of solution isn't feasible anymore. But to me, it kind of violates the Kodi/Libreelec philosophy: The reason why I abandoned my DVD player back in the days because it was forcing stuff on me that I didn't need, while being unable to do what I wanted. Putting it all on a little Raspberry Pi was liberating (as in: libre), and back then, I really DID have a weird setup (the projector was running via a VGA adapter). But now I'm back to "We don't support what you want out of the box, and you can't reasonably configure it, either" - seems oddly familiar.

    What I don't get is why the audio capabilities of the video device need to be a show stopper at all. Kodi can be used as a music player as well, and while most video devices will have some kind of audio function, having a receiver output the audio to actual speakers is certainly not that usual, so whether or not the video device has audio is hardly RELEVANT.

    For me it means I'll roll back to 9.2 as it still works for me.

    Once the plugins fail, I'll revisit this thread and see what can be done. But off the top of my head, I don't think the user typing these lines could pull off #1 or #2 (might be because of me or simply because the hardware can't do it) - #3 seems to be asking for constant trouble and #4 means plugging in another power consumer, which I think is a really bad replacement for just a single line in a config file.

  • I can't help but wonder why the config.txt approach was removed in the first place.

    The "old" video pipeline was 100,000 lines of downstream code that relied on closed-source magic in firmware and both the open-source (downstream) code and closed-source firmware blobs would never be accepted upstream. RPi4 was in the early stages of development and would need another large chunk of all-new downstream code and Raspberry Pi devs finally realised their long-term technical debt from hoarding ever-more downstream code was unsustainable. Team Kodi helped the decision to rework the codebase and start upstreaming it by stating Kodi on Linux would be moving towards open-standards and would remove all vendor proprietary decode methods (including OMX, MMAL) from its codebase as part of it's own efforts towards sustainable code.

    So RPi devs did the right thing and reworked the video pipeline to follow modern Linux DRM standards, moving most (but not all) config.txt capabilities out of closed-source firmware into open-source kernel code, and open VL42 decoding approaches. RPi4 had some delays and ended up shipping in the middle of a Debian release cycle, so some "old methods" code was slung together to coexist with the current RPi2/3 oriented Debian codebase, and the changeover to "new methods" was timed for the next Debian and RPiOS release about six months later.

    Other than the usual "old is good, new is bad" grumbles that accompany all change it's been a fairly painless switch. Your specific scenario is one of the few (but niche) casualties of the change. I would read up on what the AVR can do as most have the ability to mirror outputs and advertise their own HDMI capabilities, but that's your call..

  • I would read up on what the AVR can do as most have the ability to mirror outputs and advertise their own HDMI capabilities, but that's your call..

    This is a Denon AVR-2109 from 2009, and while the AI insists it can fly and also make breakfast, I'm pretty sure I've tested everything, and it doesn't have these capabilities.

    Appreciate your explanations. Makes it all very understandable, but the next moment the bare user in me still doesn't get why in 2026, I need to obey to a machine wrongly telling me what my hardware's capabilities are, instead of me telling the machine what to do, like it should be.

    The most I can do is unplug the projector while the Pi boots, then it'll reward me with the two introductory beeps via the main speakers, buit as soon as I plug the hdmi cable back in to get video, audio is done with.

    Ironically, I managed to tell the hardware to give me analogue sound via the Pi's headphone jack, which I may then pipe into the receiver with old-fashioned cinch cables. but that has a lot of background noise and really is no fun at all. So I guess it's 9.2 for me for now, and eventually I'll have to throw out hardware to accomodate the software (basically what me and the planet hate most).

    Quote

    RPi4 had some delays and ended up shipping in the middle of a Debian release cycle, so some "old methods" code was slung together to coexist with the current RPi2/3 oriented Debian codebase, and the changeover to "new methods" was timed for the next Debian and RPiOS release about six months later.

    Are you suggesting that replacing the RPi4 with an RPi5 might also fix those issues for me, or did I misread that?

  • Does the AVR have a TV connected to it too? If yes, switch the AVR to that output and see if audio works (it should). If yes, capture the EDID data of that source with "getedid create" over SSH and then reboot. The RPi4 will now see that TV and its audio capabilities as always connected. Now see what happens when you switch the AVR to the projector. Audio will either continue to work, or it won't.

    If there is no TV connected to the AVR the same thing can be done by going mobile with the RPi4 and connecting it directly to a TV somewhere to capture its EDID data. You need to run the command over SSH so might need to connect the RPi4 to WiFi if there's no Ethernet nearby. It's slightly fiddly to setup but not that hard to do, and tt's $free to test.

    RPi5 will be the same as an RPi4 board (and all modern hardware).

  • Actually, no other devices were needed - it's as simple as this:

    1. Install Libreelec 12 and set up ssh.
    2. Hover the mouse button over "Reboot", unplug the projector and reboot.
    3. After reboot, ssh to the device and run "getedid create"
    4. Plug the projector's hdmi cable back in and reboot.

    Thanks for hanging in there - and hopefully, these instructions are helpful to someone in my "niche".

  • That makes sense. Without the DVI source to reflect the (no audio) properties of when connected, the AVR either defaults to some basic defaults or advertising it's own capabilities, which you capture. And once captured the RPi4 always sees the same thing.