Lakka 2.3.2/RPi4 no sound

Hello, I thought that I’d try posting here first before submitting to github.

  • Which version of Lakka are you using? 2.3.2
  • What system hardware are you using? RPi4
  • What did you do? I updated my previous installation (2.3.1) to 2.3.2. The previous installation worked just fine without any issue
  • What did you expect to happen? Upgrade without issue (which the upgrade itself had no issue)
  • What happened instead? There is no sound from the system or cores. Everything else seems to work just fine like before

Steps tried

  • purge retroarch.cfg
  • switch to hw:0,0 and using audio jack
  • switch between alsa, alsathread
  • switch with different audio devices (with lots of restarting for this and above switching attempts)
  • try and see if it’s core dependent (no sound from any)
  • create an autostart.sh file with amixer cset numid=3 1
  • verify that sound hardware is working (I also have libreelec installed and that works just fine through hdmi)

The only reason why I haven’t wiped the whole thing and just reinstall the previous version is I’m still relatively new to pi/lakka, have a nice raspbian/libreelc/lakka triple setup going on my SD card, and don’t want to break the other installations trying to reinstall lakka.

Thanks!

Log file ###########################################

Lakka - The DIY retro emulation console

… visit http://www.lakka.tv

###########################################

Lakka (official): 2.3.2 (RPi2.RPi4.arm) Lakka:~ # aplay -L null Discard all samples (playback) or generate zero samples (capture) default:CARD=ALSA bcm2835 ALSA, bcm2835 ALSA Default Audio Device sysdefault:CARD=ALSA bcm2835 ALSA, bcm2835 ALSA Default Audio Device iec958:CARD=ALSA,DEV=0 bcm2835 ALSA, bcm2835 IEC958/HDMI IEC958 (S/PDIF) Digital Audio Output Lakka:~ # systemctl stop retroarch.service; retroarch -v [INFO] RetroArch 1.8.4 (Git 9e25601a56) [INFO] === Build ======================================= [INFO] Capabilities: NEON VFPv3 VFPv4 [INFO] Built: Jan 20 2020 [INFO] Version: 1.8.4 [INFO] Git: 9e25601a56 [INFO] ================================================= [INFO] [Environ]: SET_PIXEL_FORMAT: RGB565. [INFO] Redirecting save file to “/storage/savefiles/.srm”. [INFO] Redirecting savestate to “/storage/savestates/.state”. [INFO] Version of libretro API: 1 [INFO] Compiled against API: 1 [INFO] [Audio]: Set audio input rate to: 30000.00 Hz. [INFO] [Video]: Video @ fullscreen [INFO] [Video]: Starting threaded video driver … [WARN] [DRM]: Couldn’t get device resources. [WARN] [DRM]: Couldn’t get device resources. [INFO] [DRM]: Found 1 connectors. [INFO] [DRM]: Connector 0 connected: yes [INFO] [DRM]: Connector 0 has 37 modes. [INFO] [DRM]: Connector 0 assigned to monitor index: #1. [INFO] [DRM]: Mode 0: (2560x1440) 2560 x 1440, 60 Hz [INFO] [DRM]: Mode 1: (2048x1152) 2048 x 1152, 60 Hz [INFO] [DRM]: Mode 2: (1920x1200) 1920 x 1200, 60 Hz [INFO] [DRM]: Mode 3: (1920x1080) 1920 x 1080, 60 Hz [INFO] [DRM]: Mode 4: (1920x1080) 1920 x 1080, 60 Hz [INFO] [DRM]: Mode 5: (1920x1080) 1920 x 1080, 50 Hz [INFO] [DRM]: Mode 6: (1920x1080) 1920 x 1080, 30 Hz [INFO] [DRM]: Mode 7: (1920x1080) 1920 x 1080, 30 Hz [INFO] [DRM]: Mode 8: (1920x1080) 1920 x 1080, 25 Hz [INFO] [DRM]: Mode 9: (1920x1080) 1920 x 1080, 24 Hz [INFO] [DRM]: Mode 10: (1920x1080) 1920 x 1080, 24 Hz [INFO] [DRM]: Mode 11: (1600x1200) 1600 x 1200, 60 Hz [INFO] [DRM]: Mode 12: (1680x1050) 1680 x 1050, 60 Hz [INFO] [DRM]: Mode 13: (1600x900) 1600 x 900, 60 Hz [INFO] [DRM]: Mode 14: (1280x1024) 1280 x 1024, 75 Hz [INFO] [DRM]: Mode 15: (1280x1024) 1280 x 1024, 60 Hz [INFO] [DRM]: Mode 16: (1152x864) 1152 x 864, 75 Hz [INFO] [DRM]: Mode 17: (1280x720) 1280 x 720, 60 Hz [INFO] [DRM]: Mode 18: (1280x720) 1280 x 720, 60 Hz [INFO] [DRM]: Mode 19: (1280x720) 1280 x 720, 50 Hz [INFO] [DRM]: Mode 20: (1024x768) 1024 x 768, 75 Hz [INFO] [DRM]: Mode 21: (1024x768) 1024 x 768, 70 Hz [INFO] [DRM]: Mode 22: (1024x768) 1024 x 768, 60 Hz [INFO] [DRM]: Mode 23: (832x624) 832 x 624, 75 Hz [INFO] [DRM]: Mode 24: (800x600) 800 x 600, 75 Hz [INFO] [DRM]: Mode 25: (800x600) 800 x 600, 72 Hz [INFO] [DRM]: Mode 26: (800x600) 800 x 600, 60 Hz [INFO] [DRM]: Mode 27: (800x600) 800 x 600, 56 Hz [INFO] [DRM]: Mode 28: (720x576) 720 x 576, 50 Hz [INFO] [DRM]: Mode 29: (720x480) 720 x 480, 60 Hz [INFO] [DRM]: Mode 30: (720x480) 720 x 480, 60 Hz [INFO] [DRM]: Mode 31: (640x480) 640 x 480, 75 Hz [INFO] [DRM]: Mode 32: (640x480) 640 x 480, 73 Hz [INFO] [DRM]: Mode 33: (640x480) 640 x 480, 67 Hz [INFO] [DRM]: Mode 34: (640x480) 640 x 480, 60 Hz [INFO] [DRM]: Mode 35: (640x480) 640 x 480, 60 Hz [INFO] [DRM]: Mode 36: (720x400) 720 x 400, 70 Hz [INFO] [GL]: Found GL context: kms [INFO] [GL]: Detecting screen resolution 1920x1080. [INFO] [EGL] Found EGL_EXT_platform_base, trying eglGetPlatformDisplayEXT [INFO] [EGL]: EGL version: 1.4 [INFO] [EGL]: Current context: 0xb4008c28. [INFO] [KMS]: New FB: 1920x1080 (stride: 7680). [INFO] [GL]: Vendor: Broadcom, Renderer: V3D 4.2. [INFO] [GL]: Version: OpenGL ES 3.0 Mesa 19.1.1. [INFO] [GL]: Using resolution 1920x1080 [INFO] [GL]: Default shader backend found: glsl. [INFO] [Shader driver]: Using GLSL shader backend. [WARN] [GL]: Stock GLSL shaders will be used. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] Setting up menu pipeline shaders for XMB … [INFO] [GLSL]: Compiling ribbon shader… [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Compiling simple ribbon shader… [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Compiling snow shader… [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Compiling modern snow shader… [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Compiling bokeh shader… [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Compiling snowflake shader… [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GL]: Using 4 textures. [INFO] [GL]: Loaded 1 program(s). [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver. [INFO] [udev]: Keyboard #0 (/dev/input/event0). [INFO] [udev]: Mouse #0 (/dev/input/event1). [INFO] [udev]: Mouse #1 (/dev/input/mouse0). [INFO] [Joypad]: Found joypad driver: “udev”. [WARN] [udev]: Full-screen pointer won’t be available. [INFO] [Video]: Found display server: null [INFO] Found shader “/tmp/shaders/bilinear.glslp” [INFO] Found shader “/tmp/shaders/nearest.glslp” [INFO] Found shader “/tmp/shaders/slang-conversion-template.glsl” [INFO] Found shader “/tmp/shaders/stock.glsl” [INFO] ALSA: Using signed 16-bit format. [INFO] ALSA: Period size: 444 frames [INFO] ALSA: Buffer size: 1411 frames [INFO] [Menu]: Found menu display driver: “gl”. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Menu]: Found menu display driver: “gl”. [CDROM] No sg devices found and sg kernel module is not loaded. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [LED]: LED driver = ‘null’ 0x5d14fc [INFO] [MIDI]: Initializing … ALSA lib /home/natinusala/release/Lakka-LibreELEC/build.Lakka-RPi4.arm/alsa-lib-1.1.9/src/seq/seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory [ERROR] [MIDI]: snd_seq_open failed with error -2. [ERROR] [MIDI]: Initialization failed (list of input devices unavailable). [INFO] SRAM will not be saved. [INFO] Loading history file: [/storage/.config/retroarch/content_history.lpl]. [INFO] Loading history file: [/storage/.config/retroarch/content_music_history.lpl]. [INFO] Loading history file: [/storage/.config/retroarch/content_video_history.lpl]. [INFO] Loading history file: [/storage/.config/retroarch/content_image_history.lpl]. [INFO] Loading favorites file: [/storage/.config/retroarch/content_favorites.lpl]. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [KMS]: New FB: 1920x1080 (stride: 7680). [INFO] [KMS]: New FB: 1920x1080 (stride: 7680). ^C[INFO] [config] Saved new config to “/storage/.config/retroarch/retroarch.cfg”. [INFO] Content ran for a total of: 00 hours, 00 minutes, 00 seconds. [INFO] Unloading game… [INFO] Unloading core… [INFO] Unloading core symbols… [INFO] Threaded video stats: Frames pushed: 4678, Frames dropped: 0.

You need to edit config.txt and change the hdmi drive, it’s basic Raspberry Pi stuff you should find info online

Thanks, that worked. I guess the only thing I’d wonder is why I didn’t have to do it when I first installed Lakka. Anyway thanks for helping.

Well it used to be there but then people complained that it broke whatever HDMI feature they needed so I removed it, there is no way to content everyone sadly

Glad it works for you though!

Any chance a noob could get some information on what you did to make it work? I’ve done just about everything and cannot get my audio to work. I’ve looked in my config.txt and can’t see anything about HDMI audio? What do I need to change?

For me the sound only works when I use the HDMI port closest to the power port. The other port still provides video but no sound.

The config.txt file doesn’t normally include it so you have to add the line hdmi_drive=2 to force audio through HDMI. Not sure if this only works with the port closest to power but that’s the one I’m using.

https://www.raspberrypi.org/documentation/configuration/config-txt/video.md

First post! Putting this here, as I kept coming across this article when I was trying to resolve the exact same issue, and not getting anywhere - so hopefully someone else will see this and find out how I fixed it.

These instructions apply to the most recent version of Lakka as at 30-Jun-2020 (Version 2.3.2). I initially did this on a clean install of Lakka from the downloads page, but it also worked on the version I installed through NOOBS.

The situation was that Retroarch was outputting audio to the AUX port fine, but would not output to the television through HDMI.

To remedy this, I had to change the audio device in Retroarch, and then I had to add 2 lines to my config.txt file before it would output the audio to my TV.

To do this you need to be logged into the SSH prompt of your Lakka Pi (The SSH service must be enabled from the ‘Settings | Services’ menu in Retroarch, and the Pi must be connected to the network. Once enabled, use a terminal package like Putty to access to command line interface. The username is ‘root’ and the password is ‘root’)

Once you are logged in, you need to make sure you know the name of the driver on the Pi board. You can do this with the command (case sensitive)

aplay -L

This will output a list of the sound devices on your Pi. On mine, this ended with:

iec958:CARD=ALSA,DEV=0

bcm2835 ALSA, bcm2835 IEC958/HDMI

IEC958 (S/PDIF) Digital Audio Output

This told me that the iec958 entry is the one for the HDMI output. Yours may be different. Look for ‘HDMI’ in the descriptions of the audio devices.

You should be able to go to ‘Settings | Audio | Output | Device’ on the default Retroarch interface, and use the left or right arrows to select this device. If not, copy the first line of the HDMI driver output as displayed on your screen (the one with CARD=ALSA) by pressing RETURN on the ‘Device’ line of Retroarch, and typing it in directly, exactly as it appears in the output from the aplay command. You can use the Retroarch interface while the SSH is active, so you can refer back to the original.

You may need to reboot your Pi to make the change active.

If this does not resolve your issue, it is likely that your display is telling the Pi that it cannot support audio (or it is doing so in a way that the Pi does not understand). You can force the Pi to attempt to use HDMI audio by modifying the boot config.txt file on your board.

If you rebooted your Pi above, you’ll need to log back in to the SSH prompt.

To modify your config.txt, it’s safest to stop retroarch, and then you have to remount your SD card in read-write mode:

systemctl stop retroarch

mount -o remount,rw /flash

then change to the ‘flash’ folder

cd /flash

and edit the file

nano config.txt

I added the two lines after ‘hdmi_ignore_cec_init=1’ to keep the settings together, but you should just be able to add them at the end of the file:

hdmi_force_edid_audio=1

hdmi_drive=2

These two lines mean the HDMI audio output is setup, even if the Pi thinks the television says it doesn’t do audio. (Mine is a Samsung telly that very definitely does do audio, but for some reason it wasn’t working under Lakka)

Save the file by pressing CTRL-O, and then pressing RETURN to confirm the file name at the bottom of the screen. Then press CTRL-X to exit the editor. Finally, you can reboot your pi with the command

shutdown -r now

Once you have done this, hopefully your HDMI audio will be working. (It was the ‘force_edid_audio’ line that did it for me…)

I have a question does updating the eeprom version of the RPI4 affect anything of Lakka OS?