[RPi5] CEC not working

  • Hi,


    I'm Pierre, and I'm new to LibreElec, I have a raspberry PI 5 4Gb that I branched to my Philips TV using a HDMI cable (plugged on the HDMI port nearest to the USB-C port). I run LibreELEC (official): 12.0.2 (RPi5.aarch64) on it.

    I would like to control it using my TV remote control, but I can't get it running.

    • CEC is enabled
    • I tried rebooting (TV and raspberry)
    • I tried playing with the configuration (mainly HDMI number and type of device), and also went back to the default.
    • I tried different HDMI port on my TV
    • I tried both port on the raspberry
    • I tried to scan using "echo 'scan' | cec-client -s", but all failed


    Do you guys have any ideas of what I am doing wrong?


    Thank you!


    Pierre


    N.B. Also before trying LibreElec, I tried Kodi over a standard raspi OS, and CEC did work well, so it does not seems to be hardware releated issue.

  • Go to Best Answer
  • Try the latest nightly from 2025-04-16, it solved a bunch of issues for me:
    Its at the bottom of the nightly page: https://test.libreelec.tv/12.0/RPi/RPi5/
    LibreELEC-RPi5.aarch64-12.0-nightly-20250416-e25b5e0.img.gz (sha256) 2025-04-16 15:44 143.5M

    I used the official hdmi-cable from RPI, so I could have 4K@60hz with my SamsungTV (2024).
    All works just fine here /shrug

    edit 1:

    I could reproduce some I think: I use the HDMI-0 (closest to power-port), when I use the other one HDMI-1 the CEC does not work.

    edit 2:

    I tried changing HDMI-port number from 1 to 2 , that did not work
    I tried changing physical address from 0 to 1 and 2 but that did not work either. (assuming those are addresses?)

    So I went to the pulse-eight website to get some clarification on the options: https://libcec.pulse-eight.com/FAQ/Index/104
    * HDMI port number: the HDMI port number that you connected the CEC adapter to on your TV or AVR. (Default: 1)
    * Connected to HDMI device: the logical address of the HDMI device that you connected the CEC adapter to. 0 for TV, 5 for an AVR (Default: 0)
    So a bit of a dead end there.


    Then I went to https://github.com/Pulse-Eight/libcec and under vendor specific notes:

    Raspberry Pi

    • If your TV cannot detect the Raspberry Pi's CEC, or if the the Pi can't detect the TV, try adding the following line in /boot/config.txt and reboot the Pi: hdmi_force_hotplug=1


    So that might be an option, but I cant test it because it works fine here on HDMI-0 just not HDMI-1


    Good luck !

    Edited 2 times, last by Elicity (June 19, 2025 at 9:03 AM).

  • I could reproduce some I think: I use the HDMI-port closest to power-port, when I use the other one CEC does not work.

    That's intentional and expected. CEC is only supported on the HDMI-A-1 connector (nearest the USB-C power port).

  • Okay, good to know. I'm no expert, I just used the descriptions from the board itself:

    So the HDMI-A-1 is the HDMI0 port on board ?

    Afaict setting the hotplug value might work for him.


    As a last resort I found in /flash/config.txt which could be related, but IDK.

    # Don't send initial active source message.
    # Avoids bringing CEC (enabled TV) out of standby and channel switch when
    # rebooting.
    hdmi_ignore_cec_init=1

  • RPiOS and LE use identical firmware, config, and kernels. If it works in one it should work in the other.

    Have you tried hdmi_force_hotplug=1 ? - I'm not 100% sure this is still supported in Pi firmware but worth a shot.

  • I have LibreELEC running on a RPi5, and CEC is working on v12.0.1 but stops working on v12.0.2 for whatever reason. The downgrade to 12.0.1 fixed it for me.

    I will try the hdmi_force_hotplug=1 setting on 12.0.2.

    Thanks for that.

  • Stuntel ,

    You should make sure that you use the HDMI port that is closest to the USB-C port. Then CEC will work again. 12.0.1 temporarily supported CEC on both ports, but there were too many unresolved issues, so support was limited to the first HDMI port.

  • CEC is working on v12.0.1 but stops working on v12.0.2 for whatever reason

    The kernel used in LE 12.0.0 and 12.0.1 supports CEC on both HDMI ports but there are some issues when multiple CEC-capable HDMI devices are active at the same time so RPi devs dropped that capability. The kernel in LE 12.0.2 reverts to the behaviour of LE10/LE11 where CEC is only supported on the HDMI port nearest the USB-C power connector.