Raspberry Pi 4B, 4 GB. No audio->No hair

Well, I have spent the last 3 hours or so trying to figure out why I have no audio in Lakaa 3.1 stable on my Raspberry Pi 4B with a standard 5V, 3A USB-C power supply (Wall-outlet type). I am using an official Raspberry Pi Micro HDMI to HDMI cable. The only USB device plugged in is a USB HDD containing games I own and have copied myself. I have tried uncomenting hdmi_drive=2 in config.txt. I’ve tried a different Micro to full HDMI cord. I’ve tried so many other things also.

LibreELEC and RetroPie work fine - audio and all - on the same unit.

Running ‘aplay -L’ gives [quote=“aaronouthier, post:1, topic:33787, full:true”] Well, I have spent the last 3 hours or so trying to figure out why I have no audio in Lakaa 3.1 stable on my Raspberry Pi 4B with a standard 5V, 3A USB-C power supply (Wall-outlet type). I am using an official Raspberry Pi Micro HDMI to HDMI cable. The only USB device plugged in is a USB HDD containing games I own and have copied myself. I have tried uncomenting hdmi_drive=2 in config.txt. I’ve tried a different Micro to full HDMI cord. I’ve tried so many other things also.

LibreELEC and RetroPie work fine - audio and all - on the same unit.

Running ‘aplay -L’ gives me:

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 vc4-hdmi-hifi-0
    Default Audio Device
sysdefault:CARD=vc4hdmi0
    vc4-hdmi-0, MAI PCM vc4-hdmi-hifi-0
    Default Audio Device
hdmi:CARD=vc4hdmi0,DEV=0
    vc4-hdmi-0, MAI PCM vc4-hdmi-hifi-0
    HDMI Audio Output
default:CARD=vc4hdmi1
    vc4-hdmi-1, MAI PCM vc4-hdmi-hifi-0
    Default Audio Device
sysdefault:CARD=vc4hdmi1
    vc4-hdmi-1, MAI PCM vc4-hdmi-hifi-0
    Default Audio Device
hdmi:CARD=vc4hdmi1,DEV=0
    vc4-hdmi-1, MAI PCM vc4-hdmi-hifi-0
    HDMI Audio Output
default:CARD=Headphones
    bcm2835 Headphones, bcm2835 Headphones
    Default Audio Device
sysdefault:CARD=Headphones
    bcm2835 Headphones, bcm2835 Headphones
    Default Audio Device

Running ‘retroarch -v’ yields:

[INFO] RetroArch 1.9.4 (Git c226bd87f4)
[INFO] === Build =======================================
[INFO] Capabilities:  ASIMD
[INFO] Built: Jun  3 2021
[INFO] Version: 1.9.4
[INFO] Git: c226bd87f4
[INFO] =================================================
[INFO] [Input]: Found input driver: "udev".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48000.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 2 connectors.
[INFO] [DRM]: Connector 0 connected: yes
[INFO] [DRM]: Connector 0 has 33 modes.
[INFO] [DRM]: Connector 0 assigned to monitor index: #1.
[INFO] [DRM]: Connector 1 connected: no
[INFO] [DRM]: Connector 1 has 0 modes.
[INFO] [DRM]: Mode 0: (3840x2160) 3840 x 2160, 30.000000 Hz
[INFO] [DRM]: Mode 1: (3840x2160) 3840 x 2160, 29.970001 Hz
[INFO] [DRM]: Mode 2: (3840x2160) 3840 x 2160, 25.000000 Hz
[INFO] [DRM]: Mode 3: (3840x2160) 3840 x 2160, 24.000000 Hz
[INFO] [DRM]: Mode 4: (3840x2160) 3840 x 2160, 23.976000 Hz
[INFO] [DRM]: Mode 5: (1920x1080) 1920 x 1080, 60.000000 Hz
[INFO] [DRM]: Mode 6: (1920x1080) 1920 x 1080, 59.940201 Hz
[INFO] [DRM]: Mode 7: (1920x1080i) 1920 x 1080, 30.000000 Hz
[INFO] [DRM]: Mode 8: (1920x1080i) 1920 x 1080, 29.970100 Hz
[INFO] [DRM]: Mode 9: (1920x1080) 1920 x 1080, 50.000000 Hz
[INFO] [DRM]: Mode 10: (1920x1080i) 1920 x 1080, 25.000000 Hz
[INFO] [DRM]: Mode 11: (1920x1080) 1920 x 1080, 24.000000 Hz
[INFO] [DRM]: Mode 12: (1920x1080) 1920 x 1080, 23.976080 Hz
[INFO] [DRM]: Mode 13: (1680x1050) 1680 x 1050, 59.883251 Hz
[INFO] [DRM]: Mode 14: (1280x1024) 1280 x 1024, 60.019741 Hz
[INFO] [DRM]: Mode 15: (1280x960) 1280 x 960, 60.000000 Hz
[INFO] [DRM]: Mode 16: (1360x768) 1360 x 768, 60.015163 Hz
[INFO] [DRM]: Mode 17: (1280x800) 1280 x 800, 59.909546 Hz
[INFO] [DRM]: Mode 18: (1280x720) 1280 x 720, 60.000000 Hz
[INFO] [DRM]: Mode 19: (1280x720) 1280 x 720, 59.940201 Hz
[INFO] [DRM]: Mode 20: (1280x720) 1280 x 720, 50.000000 Hz
[INFO] [DRM]: Mode 21: (1024x768) 1024 x 768, 60.003841 Hz
[INFO] [DRM]: Mode 22: (800x600) 800 x 600, 60.316540 Hz
[INFO] [DRM]: Mode 23: (800x600) 800 x 600, 56.250000 Hz
[INFO] [DRM]: Mode 24: (720x576) 720 x 576, 50.000000 Hz
[INFO] [DRM]: Mode 25: (720x576i) 720 x 576, 25.000000 Hz
[INFO] [DRM]: Mode 26: (720x480) 720 x 480, 60.000000 Hz
[INFO] [DRM]: Mode 27: (720x480) 720 x 480, 59.940060 Hz
[INFO] [DRM]: Mode 28: (720x480i) 720 x 480, 30.001110 Hz
[INFO] [DRM]: Mode 29: (720x480i) 720 x 480, 29.970030 Hz
[INFO] [DRM]: Mode 30: (640x480) 640 x 480, 60.000000 Hz
[INFO] [DRM]: Mode 31: (640x480) 640 x 480, 59.940475 Hz
[INFO] [DRM]: Mode 32: (720x400) 720 x 400, 70.081665 Hz
[INFO] [GL]: Found GL context: kms
[INFO] [GL]: Detecting screen resolution 3840x2160.
[INFO] [EGL] Found EGL_EXT_platform_base, trying eglGetPlatformDisplayEXT
[INFO] [EGL]: EGL version: 1.4
[INFO] [EGL]: Current context: 0x7fa4016240.
[INFO] [KMS]: New FB: 3840x2160 (stride: 15360).
[INFO] [GL]: Vendor: Broadcom, Renderer: V3D 4.2.
[INFO] [GL]: Version: OpenGL ES 3.1 Mesa 21.1.1.
[INFO] [GL]: Using resolution 3840x2160
[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.
[WARN] [udev]: Full-screen pointer won't be available.
[INFO] [udev]: Pad #0 (/dev/input/event5) supports force feedback.
[INFO] [udev]: Pad #0 (/dev/input/event5) supports 16 force feedback effects.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Video]: Found display server: null
[WARN] [udev]: Mouse grab/ungrab feature unavailable.
[INFO] [ALSA]: Using floating point format.
[INFO] [ALSA]: Period size: 768 frames
[INFO] [ALSA]: Buffer size: 3072 frames
[INFO] [ALSA]: Can pause: no.
[INFO] [Display]: Found display driver: "gl".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[WARN] [XMB] Asset missing: /tmp/assets/xmb/retroactive/png/disc.png
[INFO] [SRAM]: SRAM will not be saved.
[INFO] [Playlist]: Loading history file: [/storage/.config/retroarch/content_history.lpl].
[INFO] [Playlist]: Loading history file: [/storage/.config/retroarch/content_music_history.lpl].
[INFO] [Playlist]: Loading history file: [/storage/.config/retroarch/content_video_history.lpl].
[INFO] [Playlist]: Loading history file: [/storage/.config/retroarch/content_image_history.lpl].
[INFO] [Playlist]: Loading favorites file: [/storage/.config/retroarch/content_favorites.lpl].
[INFO] [KMS]: New FB: 3840x2160 (stride: 15360).
[INFO] [KMS]: New FB: 3840x2160 (stride: 15360).
[INFO] [Config]: Saved new config to "/storage/.config/retroarch/retroarch.cfg".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[INFO] Threaded video stats: Frames pushed: 346, Frames dropped: 0.
1 Like

Hi,

Can you give the output of tvservice -s ?

It seems you are using 4K as resolution so first you should lower the output resolution using hdmi_group and hdmi_mode otherwise it will be slow.

For the sound, some report told that you have to use HDMI 1 instead of 0.

Main thing for the RPi4 nightlies is remembering to have your HDMI connected to port 1 (instead of port 0) and you’ll also need to set the audio to output from HDMI port 1 manually also (you can do this inside of RetroArch audio settings), but it’s pretty good now.

So using one of those audio devices should work (When you change audio device you have to close the core and restart it or restart RA to be taken into account)

default:CARD=vc4hdmi1
sysdefault:CARD=vc4hdmi1
hdmi:CARD=vc4hdmi1,DEV=0

Source

If it is still not working try to add hdmi_force_edid_audio=1.

Doc

1 Like

I have tried both of the Micro HDMI ports neither one has audio. The thing there is, I don’t know which physical port is HDMI1 vs. HDMI0. I am not familiar with how to set hdmi_group or hdmi_mode. I’ll need to research that. I have tried setting the audio device manually to the hdmi: line listed above - no effect. I also have tried each step both with and without rebooting the system.

Apologies, I have been awake now for a whole 10 minutes. My head is not quite out of the cotton factory yet…

I’ll get you the output you requested in a few minutes. First, I need to, err, well, make my morning “deposits”, and have some breakfast. Talk soon

Output of tvservice -s:

-sh: tvservice: not found

For reference, I am running 3.1 stable.

Ok, got it working now.

It is said that despite popular belief, most scientific discoveries begin not with “Aha!” or “Eureka!”, but rather with “That’s odd…”.

In my case, the problem occurs only when the option 'hdmi_drive=2" is enabled/uncommented in config.txt . This is odd, as that should prevent the problem from happening, not cause it!!

1 Like

Thank you for the feedback. I am glad you could figure it out.

Another strange thing (new topic needed??): I have set/changed both the “hdmi_group” and “hdmi_mode”, but those settings seem to have no effect.

group is set to 1 and mode is set at 16. TV output is showing the current resolution is 3840x2160 @ 30 Hz.

What could the problem be?

This has been mentioned on the Lakka discord channel. The fullscreen resolution can be set in the Retroarch interface under video when advanced options are enabled.

From what I understand this is because the KMS driver handles resolutions differently. However Raspberry Pi OS which I use on my RPi3 with Full-KMS does handle the settings in config.txt correctly (that is, Retroarch uses the resolution set there).

2 Likes