Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first
  • Global Moderator

    A recent change in Raspbian Buster's kernel/firmware is causing Audio/Sound issues for RPI users - users that installed the 4.6 image or installed RetroPie manually on-top of Raspbian Buster.

    Symptoms include:

    • Error messages showing when a game is launched (lvl0: VolumeControl::init() - Failed to find mixer elements).
    • Sound missing in EmulationStation and/or games.
    • System Volume slider stuck at 0% in EmulationStation's Sound settings.

    To verify if you're affected by the audio changes, you can check your Raspbian Linux kernel version (uname -r), if it's 4.19.118 or later, your system is affected.

    To solve this issue(s), here is a list of steps need to be taken.

    • update your RetroPie-Setup installation.
    • use the Audio menu in RetroPie to choose your Audio output (HDMI/Headphones).
      This will set the default Sound card/device for your system, but wouldn't always solve the problem of missing audio in EmulationStation.
    • update the EmulationStation core package - you should have at least version v2.9.2.
    • Re-configure your Sound in EmulationStation, depending on how your sound output is configured. The table below shows the Sound settings as they worked before the update and how they should be configured after the update is applied.
    Audio output Before the update After the update

    HDMI

    • Audio Card: Default
    • Audio Device: PCM
    • OMX Audio Device: HDMI
    • Audio Card: Default
    • Audio Device: HDMI
    • OMX Audio Device: ALSA

    Headphone Jack

    • Audio Card: Default
    • Audio Device: PCM
    • OMX Audio Device: Local
    • Audio Card: Default
    • Audio Device: Headphone
    • OMX Audio Device: ALSA

    NOTES:

    • For more technical details about the change - see https://www.raspberrypi.org/blog/latest-raspberry-pi-os-update-may-2020/.

    • RetroPie users still using an a system based on Raspbian Strech should not be affected by this change, since Raspbian no longer provides any updates for this version.

    • If you're using an external (USB/I2S/etc.) soundcard, you might be affected by the change - the system configures now (at least) 2 sound cards instead of 1 (as it was the default before the update). If you've disabled the on-board sound, then you shouldn't be affected.

    • (Optional) If you wish to revert to the previous Audio configuration, then you can add to /boot/cmdline.txt:

       snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_compat_alsa=1
      

  • I went through this process 3 times to be sure I was doing it right, but still no go. When I open alsamixer from a Desktop terminal window, the default sound device it opens with is always PulseAudio. Even when I change it there or in ES it keeps defaulting back to that. I AM getting sound, but it is complete garbage. I'm also getting the lvl0: VolumeControl::init() - Failed to find mixer elements message and the volume slider always being at 0.

    4 gb Pi 4
    4.19.118 kernal
    ES 2.9.2

    Audio Card: default
    Audio Device: HDMI
    OMX Audio Device: ALSA

    OMX audio HW acceleration set to either ON or OFF makes no difference. Still crappy PulseAudio sound.

    pi@raspberrypi:~ $ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
    Subdevices: 3/3
    Subdevice #0: subdevice #0
    Subdevice #1: subdevice #1
    Subdevice #2: subdevice #2
    card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
    Subdevices: 2/2
    Subdevice #0: subdevice #0
    Subdevice #1: subdevice #1
    card 2: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
    Subdevices: 2/2
    Subdevice #0: subdevice #0
    Subdevice #1: subdevice #1

    PulseAudio is not even listed here...

  • Global Moderator

    @VictimRLSH we don't support PulseAudio in EmulationStation or running it through the desktop environment.

    EDIT: PulseAudio doesn't get listed with ALSA utilities, since it's running on-top of it. Any reason you're using PulseAudio ?


  • @mitu That's just the thing, I didn't install it (at least not to my knowledge) I'm going to try purging it and see if that breaks anything.


  • Purging PulseAudio with

    sudo apt-get remove --purge pulseaudio

    and then reconfiguring and rebooting solved the problem. People who are still having problems might want to check alsamixer and see what comes up as the default.


  • @mitu - If this isn't appropriate to post here just let me know. I did read a few other threads about loosing audio but what I was trying to figure out was slightly different.

    I am running RetroPie 4.6.1 commit 63f4f55f on a Pi 4. I used the ES (menu audio clicks) and a mame2003 game for audio testing to keep the image as unchanged as possible. No other changes to the image.

    To clear up any confusion on the Pi PCB the ports are labeled HDMI 0 and HDMI 1 right next to each port. I don't if it would be beneficial to match them up with RetroPie that labels them HDMI 1 and HDMI 2.

    What I was trying to achieve is basically if you plug into HDMI 1 is it possibly to get audio. From what I could tell with a default 4.6 fresh image it's not possible. But once I updated the RetroPie script I noticed in RetroPie -> AUDIO and it allows you to choose HDMI 1 or HDMI 2.

    If plugged into HDMI 0 you don't need to do anything but if you plug into HDMI 1 all you have to do is select HDMI 2 in the RetroPie -> AUDIO and audio starts working immediately.

    To take it a step further I did the underlying OS updates through the RetroPie Menu (I did all updates from the RetroPie setup menu including ES 2.9.2 and Kernel 4.19.118 v71+) which seemed to cause some issues. If I exit Emulationstation (Alt+F4) I see this error Jun 11 02:55:52 lvl0: VolumeControl::init() - Failed to find mixer elements!

    If I enter the RetroPie -> AUDIO I see that same error 3 times at the top of the screen and also the menu is missing HDMI 2 and a few other options that were there before the OS update.

    The weird thing is within ES I left audio as Default and PCM (I never changed it any time) and my audio now detects automatically on both HDMI 0 and HDMI 1.

    Just to verify it or try it another way I wiped my card, reloaded the image and tried again but this time I went to the bash prompt and used sudo apt update and sudo apt full-upgrade with the exact same results as above.

    Anyway I just wanted to share that information as something doesn't seem quite right but it's pretty cool the ports seem to auto detect the active port after the update and both video and audio work.

  • Global Moderator

    @Riverstorm said in Audio issues after latest Raspbian updates:

    If I enter the RetroPie -> AUDIO I see that same error 3 times at the top of the screen and also the menu is missing HDMI 2 and a few other options that were there before the OS update.

    Yes, that's on purpose - as explained in the post. After the upgrade the Audio configuration is changed.

    1. Before the upgrade

      • you had a single Audio card, switching between the 3 possible outputs was done from the Audio menu.
      • the audio volume controlled this single audio output (both in EmulationStation or via alsamixer).
      • the name of the Audio Device was always PCM.
    2. After upgrading the kernel/firmware

      • you have at least 2 cards - one for the analog jack and one for each connected HDMI port (though they're always numbered HDMI 1 and HDMI 2 and don't correspond to the HDM port as name on the PCB).
      • the Audio menu will make one of them the default (same result as configuring via raspi-config) for any application that uses ALSA for audio (games/video/audio players/etc.)
      • the name of the Audio device has to be set to either HDMI or Headphone, depending on which audio output you're using, it's no longer unique (PCM, as before).
      • you can control (and use) all audio outputs (analog or 1/2 HDMI ports).

  • @mitu - I'm sorry if I am missing the obvious here. I did read the technical details, watched the video and I also spent a few hours on the raspberry pi forums reading the engineers posts yesterday. It sounds like audio was a bit of challenge for them to straighten out and decide how to proceed over the past months.

    Just to clarify before the OS upgrade there was HDMI 1 and 2 in the audio menu which worked to switch the audio back and forth between ports. It works great. Plug in your TV, boot up and pick your HDMI port from the audio menu and the audio works.

    After the update I only see HDMI 1 (in the RetroPie -> AUDIO menu or HDMI in ES) so when you say the audio menu will make one of them the default. You can no longer switch between HDMI 1 and 2 but it treats both of them as a single card?

    After the OS update I did not choose HDMI as my Audio Device but left it as PCM (In Emulationstation) and my audio is working perfectly on both HDMI ports. It seems to automatically work on either port. I just switch ports, reboot and play. Are both HDMI ports bundled as one card hence you only see HDMI 1 in the RetroPie audio menu?

    Is the ES menu the preferred method of setting the audio or is it ok to use RetroPie audio menu. I am a bit confused on the two options and the differences of when to use which menu.

    In the RetroPie menu I see HDMI 1 but in ES I only see HDMI so I wonder is that HDMI 1 or 2 or both? I'm just trying to wrap my head around everything here and I appreciate any help in getting it straight if possible, if not I can follow the steps above and call it good too.

  • Global Moderator

    @Riverstorm said in Audio issues after latest Raspbian updates:

    Just to clarify before the OS upgrade there was HDMI 1 and 2 in the audio menu which worked to switch the audio back and forth between ports. It works great. Plug in your TV, boot up and pick your HDMI port from the audio menu and the audio works.
    After the update I only see HDMI 1 (in the RetroPie -> AUDIO menu or HDMI in ES) so when you say the audio menu will make one of them the default. You can no longer switch between HDMI 1 and 2 but it treats both of them as a single card?

    Honestly, I don't know how can I make clearer, but I'll try again.

    In the Audio menu of RetroPie:

    • Before the upgrade, the switching between the outputs was just that - a switch. The system didn't know what you had connected and just routed the sound to one of the possible outputs.

    • After the upgrade, the system shows the connected ports (the Headphone jack is always connected) and there are (at least) 2 separate audio options - one for each output. It doesn't matter which HDMI port is connected, HDMI 1 will always be it. If you had both HDMI ports connected, you'd have 2 HDMI ports + Headphone jack as options.

    After the OS update I did not choose HDMI as my Audio Device but left it as PCM (In Emulationstation) and my audio is working perfectly on both HDMI ports. It seems to automatically work on either port. I just switch ports, reboot and play. Are both HDMI ports bundled as one card hence you only see HDMI 1 in the RetroPie audio menu?

    That's normal, the settings in EmulationStation affect only how EmulationStation outputs audio - for video snaps (vlc or omxplayer).

    Is the ES menu the preferred method of setting the audio or is it ok to use RetroPie audio menu. I am a bit confused on the two options and the differences of when to use which menu.

    The ES menu only configures how ES outputs audio, but doesn't affect the other applications. Using the Audio menu in RetroPie, you configure the default audio for all ALSA based applications (which in Linux is pretty much every application).
    The volume control is the only one that affects other applications and it's easier to use than invoking alsamixer.

    In the RetroPie menu I see HDMI 1 but in ES I only see HDMI so I wonder is that HDMI 1 or 2 or both?

    The naming is confusing and perhaps should be changed, but there's no relation between them. The Audio Device is actually the name of the ALSA volume control, not the name of the device. You can see it when looking in alsamixer.

    Here's the name of the volume control when the Headphone card is selected (Item Name="Headphone")
    d1d17c24-d3f2-44d7-916e-498105a8d5e5-image.png

    Here's the name of the volume control when the HDMI (1) card is selected (and muted, as shown by the MM toggle)

    cae83f89-7fe2-4dfc-ac2a-c4dd77a2cfc5-image.png


  • @mitu - Ok, several things clicked there that I had no idea how they worked so I really appreciate the layman's explanation.

    I read a post once to the effect that RetroPie users are "protected" from really understanding how things work. I can't completely disagree with that statement but on the other hand that's part of the "magic" of RetroPie.

    You can get things up and running fairly easy and then go back and dig in a bit deeper to fine tune settings. There's so many aspects of RetroPie that probably are very simplistic but I learn new things all the time. I honestly never used Linux in any capacity until RetroPie. Anyway I usually don't update the underlying OS with each new RetroPie release and basically use them as is but I truly appreciate the opportunities to learn new things.

    To the effect of sounding cheesy, in a world that's a bit crazy right now and could use more good, I do thank the good lord of folks like you. You may have been around much longer than I know or realize but you just seemed to come out of nowhere and took RetroPie by storm knowing it inside and out. It's always at the back of my thoughts when reading your posts. It probably always will be no matter what is said, I guess there's something to say for first impressions. ;)

    You do have an incredible technical talent but also the perfect mindset and temperament to be a natural moderator beyond the basic task of some typical terms of service violation, unacceptable behavior, or illegal ROM link.

    One of my favorite sayings is "Common sense, so rare it's a superpower." :)

    Most can't set aside biases, pride or petty disagreements to focus on what truly constitutes "gold standard" moderation which isn't always about being the "smartest" member that knows the most in the community.

    I've yet to genuinely like someone purely based on knowledge alone. Even if they are the leading-global-authority-go-to-go-guy that knows it all. A skill that's as equally, if not more, important is connecting and helping others without making them feel inferior. Making them feel like they are part of a community. It leaves a much more powerful and forever lasting impact.

    Knowing when to let marginal conversations play out and being impartial to all members equally. Elevating conversations to bring about the best conclusion or sometimes shooting the breeze with some small talk.

    In this day and age of phones and social media along with less and less face-to-face real human contact many people forget that being social is a skill set that needs to be practiced to stay good. Lord knows I do my fair share at small pub's and the like. Anyway basically exercising good judgement or common sense to foster, promote and grow a community culture. It's an enormous responsibility really.

    Anyway I may say it often but I don't think it can be said enough as I've always been impressed with how you handle most situations and think you're a class act and a true asset to the community working the back-end and just as often, if not more, the front-end.

    I just wanted to say THANKS, good sir, for all you do and have a great weekend. As that beer commercial goes... "This Bud's for you!" ...errr... whatever the beer of choice is on that side of the pond! ;)


  • Dude, at least pour the guy a real ale. When I go over there I like a good Scottish 80 myself.

  • Global Moderator

    @Riverstorm said in Audio issues after latest Raspbian updates:

    [..]
    I just wanted to say THANKS, good sir, for all you do and have a great weekend. As that beer commercial goes... "This Bud's for you!" ...errr... whatever the beer of choice is on that side of the pond! ;)

    Thank for the - more than - kind words.


  • @VictimRLSH - lol...I apologize for my shortsightedness I should buy the man a proper drink and not just a pint! ;) I've never been but my wife has several times and wants to go as a family, which with the current state of affairs will probably be a while. I guess you could say I'm dead chuffed about that. I hope I used that properly I just learned it the other night on TV. I love their slang over there. Ok fellas, have a super weekend, heading home now to spend some time with the fam! ;)


  • I've just upgraded my 3B+ to Buster (it went exactly in this manner: https://djangocas.dev/blog/upgrade-existing-jessie-to-buster-without-re-image/ ), and this, of course, happened - the above fix, with the addition to cmdline.txt, did restore the sound.

    (Incidentally, I had the sound in startx, even before the attempts to fix it in Retropie).

    However, the volume still always resets to 0 in EmuStation, and the fix seems to only work sometimes - one time EmuStation will click when scrolling through titles, other times it will stay quiet.

    Speaker-test from the command line, however, now always seems to make its noise properly.

    (By the way, I've noticed that while the regular binary for EmuStation is from June, the one for EmuStation dev. version 2.10 is still from April - I'll check if this influences the sound fix. I normally use the dev. version, I switched to the regular for the sound fix).


  • Adding: hah, "funnily" enough, now EmuStation's sound is crackling, wobbly, and it also slowns down the emulators to the point that after updating to Buster, RP has become just unusable. :|

    EmuStation 2.10 dev acts in the same manner, no matter what devices are selected in the menu - HDMI, PCM, ALSA, both...

  • administrators

    @BazzCatt that sounds like another issue.


  • @BazzCatt This is what was happening to me. Check alsamixer and see what your default sound device is. I found a Bluetooth utility I installed into the desktop to facilitate file transfers also installed Pulseaudio and completely jacked up my sound in the same manner. I had to purge pulseaudio to remedy the problem (see above post).


  • This should fix the problem:

    sudo rpi-update 8d64ec7016906fb1f2bbe937dd7401705c5acf33

    Newer firmwares makes troubles with sound on Raspbian Buster.
    Use that command on your own risk.

  • Global Moderator

    @Sid1968 said in Audio issues after latest Raspbian updates:

    sudo rpi-update 8d64ec7016906fb1f2bbe937dd7401705c5acf33

    Using rpi-update is not recommended for normal updates. While this might get you a firmware version before the changes in the audio configuration, any updates for OS updates including kernel/firmware - via apt - will overwrite it.
    I strongly advice against this approach.

    Newer firmwares makes troubles with sound on Raspbian Buster.

    Hence the topic at hand. If you want to revert to the previous audio configuration, you can modify cmdline.txt as outlined in the first post.


  • @mitu The problem is that the "normal" update command installs a new firmware. That causes the sound issues. My command restores an older version. For me it works well. But... that should everyone decide for themselves.

Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.