Lakka Nightly & Pi4 & HDMI 0

For anyone that may be having trouble with HDMI 0 on a Pi4 (mine is 8gb) connected to a 4K TV. HDMI 1 worked for me, but no audio. I then learned audio is only carried on HDMI 0. No signal was being picked up by my TV when plugged into HDMI 0.

SSH into your device and type ‘tvservice -s’. Look for either “CEA” or “DMT” this indicates what standard the HDMI output is. Mine is CEA, which is typically used by TVs. DMT is typically used by monitors.

Next look for the number next to the mode. This is the HDMI output mode that defines resolution/frequency/aspect ratio. Mine was 95 which means 2160p/30Hz/16:9
Full list can be found here Search in the page for ‘hdmi_mode’

The raspberry pi uses a config.txt file as its ‘bios’ and you’ll need to make some manual adjustments. At your command line type “mount /flash -o remount,rw” (enter)
“cd /flash nano config.txt”

You are now able to update /flash/config.txt and save the changes.

First I uncommented the line for hdmi_drive=2 (remove the # to uncomment) and rebooted. This gave me video and audio on HDMI 0, but the resolution of Lakka was 640x480.

This is where your group and mode from tvservice comes in. Perform the above commands again to be able to edit config.txt. Below hdmi_drive=2 you’ll want to add 2 new options - hdmi_group and hdmi_mode. Set your hdmi_group=1 which explicitly defines the output as CEA. Use hdmi_group=2 and the second list of hdmi_modes in the above link if you saw “DMT” from the “tvservice -s” ouput

Finally I set hdmi_mode=34. 34 defines the hdmi format as 1080p/30Hz/16:9 from the list in the link above. After I rebooted Lakka looked beautiful and games had audio. You may need to do some trial and error to find the right hdmi_mode for your device. I chose 34 because it offered HD at the same frequency and aspect ratio I saw from “95” which was the original output of “tvservice -s” for me.

Thanks for the feedback but i get audio out from both hdmi ports without any interaction other than switch the cable from port1 -> port2 and back

I have this same problem, but tvservice -s just gives me:

state 0x6 [DVI CUSTOM RGB full 4:3], 640x480 @ 59.00Hz, progressive

No CEA or DMT to be seen :confused:

I think that DVI is basically the same as HDMI, but without audio in the signal.