Running Kodi on the Raspberry CM4

I really struggled to get Kodi running and functional on the Raspberry Compute Module 4. The CM4 didn’t work with CEC. The CM4 wouldn’t play BluRay rips or any really big MKV files. I’ve never been an advocate for streaming movies over WiFi, so I made sure I bought a CM4 carrier card with gigabit ethernet.

My first attempt was Rasbian 11 (bullseye) with Kodi installed on top. I like that configuration because I can salt it and maintain my configuration management on it. That lets me easily set up snmp, motd, timezone, passwords, etc on all of my raspberries. But for some reason, I got a new error message: “Source Too Slow, Read Rate Low For Continuous Playback” in the top right corner of Kodi. I’d get good audio, but no video. I checked the NAS and it was pushing out 10mbs. Seems OK. But then I checked top:

Something is riding the struggle bus! Hmmm. Other solutions for Kodi on the CM4? I ran across c0rnelius’s Custom Image for Kodi on the CM4 that runs under Ubuntu. Pretty cool, but I’m a purist and didn’t want to rip all of that bloatware out of the OS. But LibreELEC caught my eye! I jumped over to the LibreELEC project and saw that THEY have a CM4 image available for download. BINGO! That oughta’ work!

So, I downloaded it, burned it to an SD card, and fired it up. My carrier board requires that I edit the config.txt file to turn on the USB, so I can’t boot from a thumb drive. :'( But it booted right up and I was able to turn on ssh functionality to scp my advancedsettings.xml and guisettings.xml files into place and it works a treat!

Next, was the CEC issue. I’ve got a big Samsung TV with a tiny but highly functional remote. I usually use the Samsung remote for everything, especially controlling Kodi. No dice. I checked the forums and found a LOT of people saying that the new version of Kodi on an RPi 4 with a Samsung TV is a bad combination for CEC. “HDMI-CEC”, short for HDMI Consumer Electronics Control, is an HDMI feature many TVs and peripherals have. Basically, it relays the signals from the TV remote along the HDMI cable to your source, thus eliminating the need for another remote.

Ugh! Just when I thought I was out of the woods! Then, I remembered something I saw on the back of the TV. One of the HMDI ports was labelled “HDMI4 (ARC)”. ARC (Audio Return Channel) is a special function of HDMI high-speed certified cables via which the sound can also be sent back to the transmitter.

What is HDMI ARC?

Most Samsung TVs support the HDMI feature called Audio Return Channel. HDMI ARC is designed to reduce the number of cables between your TV and an external Home Theatre System or Soundbar. The audio signal is capable of traveling both ways to and from the speakers, which will improve the sound quality and latency of the signal.

What else is HDMI ARC?

It’s the solution to the Raspberry Pi CEC problem! I moved my Kodi Raspberry to HDMI 4 on my Samsung TV and the CEC worked! I reprogrammed the SOURCEs menu and everything is happy again! Just for fun I checked top on the new set up:

What a difference in resource management between LibreELEC and non-LibreELEC systems!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.