[Odroid-C4] CEC not working with my LG TV

  • Hi, i'm trying LibreELEC 12.2.1 on my ODROID-C4 and CEC is not working,

    on kodi startup i see the message Pulse-Eight CEC adapter Couldn't initialize the CEC adapter.


    odroidc4:~ # cec-client
    No device type given. Using 'recording device'
    CEC Parser created - libCEC version 7.1.1
    no serial port given. trying autodetect:
    path: /dev/cec0
    com port: Linux

    opening a connection to the CEC adapter...
    DEBUG: [ 55] Broadcast (F): osd name set to 'Broadcast'
    DEBUG: [ 55] CLinuxCECAdapterCommunication::Open - m_fd=3 bStartListening=1
    ERROR: [ 55] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16
    DEBUG: [ 55] CLinuxCECAdapterCommunication::Close - m_fd=3
    ERROR: [ 55] could not open a connection (try 1)
    DEBUG: [ 55] CLinuxCECAdapterCommunication::Close - m_fd=-1
    DEBUG: [ 1055] CLinuxCECAdapterCommunication::Open - m_fd=3 bStartListening=1
    ERROR: [ 1055] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16
    DEBUG: [ 1055] CLinuxCECAdapterCommunication::Close - m_fd=3
    ERROR: [ 1055] could not open a connection (try 2)
    DEBUG: [ 1055] CLinuxCECAdapterCommunication::Close - m_fd=-1
    DEBUG: [ 2056] CLinuxCECAdapterCommunication::Open - m_fd=3 bStartListening=1
    ERROR: [ 2056] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16
    DEBUG: [ 2056] CLinuxCECAdapterCommunication::Close - m_fd=3
    ERROR: [ 2056] could not open a connection (try 3)
    DEBUG: [ 2056] CLinuxCECAdapterCommunication::Close - m_fd=-1
    DEBUG: [ 3056] CLinuxCECAdapterCommunication::Open - m_fd=3 bStartListening=1
    ERROR: [ 3056] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16
    DEBUG: [ 3056] CLinuxCECAdapterCommunication::Close - m_fd=3
    ERROR: [ 3056] could not open a connection (try 4)
    DEBUG: [ 3056] CLinuxCECAdapterCommunication::Close - m_fd=-1
    DEBUG: [ 4056] CLinuxCECAdapterCommunication::Open - m_fd=3 bStartListening=1
    ERROR: [ 4056] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16
    DEBUG: [ 4056] CLinuxCECAdapterCommunication::Close - m_fd=3
    ERROR: [ 4056] could not open a connection (try 5)
    DEBUG: [ 4056] CLinuxCECAdapterCommunication::Close - m_fd=-1
    DEBUG: [ 5056] CLinuxCECAdapterCommunication::Open - m_fd=3 bStartListening=1
    ERROR: [ 5056] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16
    DEBUG: [ 5056] CLinuxCECAdapterCommunication::Close - m_fd=3
    ERROR: [ 5056] could not open a connection (try 6)
    DEBUG: [ 5056] CLinuxCECAdapterCommunication::Close - m_fd=-1
    DEBUG: [ 6057] CLinuxCECAdapterCommunication::Open - m_fd=3 bStartListening=1
    ERROR: [ 6057] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16
    DEBUG: [ 6057] CLinuxCECAdapterCommunication::Close - m_fd=3
    ERROR: [ 6057] could not open a connection (try 7)
    DEBUG: [ 6057] CLinuxCECAdapterCommunication::Close - m_fd=-1
    DEBUG: [ 7057] CLinuxCECAdapterCommunication::Open - m_fd=3 bStartListening=1
    ERROR: [ 7057] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16
    DEBUG: [ 7057] CLinuxCECAdapterCommunication::Close - m_fd=3
    ERROR: [ 7057] could not open a connection (try 8)
    DEBUG: [ 7057] CLinuxCECAdapterCommunication::Close - m_fd=-1
    DEBUG: [ 8057] CLinuxCECAdapterCommunication::Open - m_fd=3 bStartListening=1
    ERROR: [ 8057] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16
    DEBUG: [ 8057] CLinuxCECAdapterCommunication::Close - m_fd=3
    ERROR: [ 8057] could not open a connection (try 9)
    DEBUG: [ 8057] CLinuxCECAdapterCommunication::Close - m_fd=-1
    DEBUG: [ 9057] CLinuxCECAdapterCommunication::Open - m_fd=3 bStartListening=1
    ERROR: [ 9057] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16
    DEBUG: [ 9057] CLinuxCECAdapterCommunication::Close - m_fd=3
    ERROR: [ 9057] could not open a connection (try 10)
    DEBUG: [ 9057] CLinuxCECAdapterCommunication::Close - m_fd=-1
    unable to open the device on port Linux
    NOTICE: [ 10057] connection opened
    ERROR: [ 10057] could not start CEC communications


    odroidc4:~ # cec-client -l
    libCEC version: 7.1.1, compiled on 2025-11-01 17:22:36 by sky42@jammy on Linux 5.14.0-570.58.1.el9_6.x86_64 (x86_64), features: P8_USB, DRM, P8_detect, Linux_kernel_API
    Found devices: 1

    device: 1
    com port: Linux
    vendor id: 0000
    product id: 0000
    firmware version: 0
    type: Linux

    odroidc4:~ # cec-ctl
    Driver Info:
    Driver Name : meson-ao-cec-g12a
    Adapter Name : meson_g12a_ao_cec
    Capabilities : 0x0000030e
    Logical Addresses
    Transmit
    Passthrough
    Connector Info
    Reply Vendor ID
    Driver version : 6.16.0
    Available Logical Addresses: 4
    DRM Connector Info : card 0, connector 34
    Physical Address : 1.0.0.0
    Logical Address Mask : 0x0010
    CEC Version : 1.4
    Vendor ID : 0x001582 (Pulse-Eight)
    OSD Name : ''
    Logical Addresses : 1 (Allow Fallback to Unregistered)

    Logical Address : 4 (Playback Device 1)
    Primary Device Type : Playback
    Logical Address Type : Playback
    All Device Types : Playback
    RC TV Profile : None
    Device Features :
    None

    odroidc4:~ # cec-ctl --list-devices
    meson-ao-cec-g12a (meson_g12a_ao_cec):
    /dev/cec0

    odroidc4:~ # cec-ctl -d /dev/cec0 --show-topology
    Driver Info:
    Driver Name : meson-ao-cec-g12a
    Adapter Name : meson_g12a_ao_cec
    Capabilities : 0x0000030e
    Logical Addresses
    Transmit
    Passthrough
    Connector Info
    Reply Vendor ID
    Driver version : 6.16.0
    Available Logical Addresses: 4
    DRM Connector Info : card 0, connector 34
    Physical Address : 1.0.0.0
    Logical Address Mask : 0x0010
    CEC Version : 1.4
    Vendor ID : 0x001582 (Pulse-Eight)
    OSD Name : ''
    Logical Addresses : 1 (Allow Fallback to Unregistered)

    Logical Address : 4 (Playback Device 1)
    Primary Device Type : Playback
    Logical Address Type : Playback
    All Device Types : Playback
    RC TV Profile : None
    Device Features :
    None

    System Information for device 0 (TV) from device 4 (Playback Device 1):
    CEC Version : 1.4
    Physical Address : 0.0.0.0
    Primary Device Type : TV
    Vendor ID : 0x00e091 (LG)
    OSD Name : Tx, OK, Rx, Timeout
    Menu Language : eng
    Power Status : On
    System Information for device 11 (Playback Device 3) from device 4 (Playback Device 1):
    CEC Version : Tx, OK, Rx, Timeout
    Physical Address : Tx, OK, Rx, Timeout
    Vendor ID : Tx, Not Acknowledged (4), Max Retries
    OSD Name : Tx, Not Acknowledged (4), Max Retries

    Topology:

    0.0.0.0: TV
    1.0.0.0: Playback Device 1

    odroidc4:~ # grep -iE 'cec|pulse-eight|adapter' /storage/.kodi/temp/kodi.log
    2025-06-26 09:45:04.877 T:1814 info <general>: Register - new cec device registered on cec->Linux: CEC Adapter (0000:0000)
    2025-06-26 09:45:06.300 T:1831 error <general>: OpenConnection - could not opening a connection to the CEC adapter


    Anyone has any idea what could be the problem?

  • I have CEC disabled in my AVR so it's something that I ever test, so no clues, but I'd ask that you update to an LE13 nightly first as the LE12.2 codebase isn't going to receive any further development. Functionally LE13 is light-years ahead of LE12.2 as well (all the hardware decoders work).

  • I just tested with LE13 nightly and CEC works, but doesn't work right away after boot, after booting it fails to connect to CEC, then if i remove the hdmi cable and connect it again then CEC starts to work fine.

    Edited once, last by mvrk (November 22, 2026 at 8:44 PM).

  • After a fresh boot, before touching the cable, please run:

    Code
    cec-ctl -d /dev/cec0 | grep -iE "physical|logical|state"
    dmesg | grep -iE "cec|hdmi"
    grep -i cec /storage/.kodi/temp/kodi.log

    Then unplug and replug HDMI, run the cec-ctl line again, and share the output via pastebin. Please also say whether the TV was on or in standby when the box booted.

  • When the box booted TV was on.


    After unplugging and plugging the cable:

    Code
    odroidc4:~ # cec-ctl -d /dev/cec0 | grep -iE "physical|logical|state"
            Logical Addresses
        Available Logical Addresses: 4
        Physical Address           : 1.0.0.0
        Logical Address Mask       : 0x0002
        Logical Addresses          : 1 (Allow Fallback to Unregistered)
          Logical Address          : 1 (Recording Device 1)
            Logical Address Type   : Record


    Another thing i noticed is if i wait around 30m after booting, it connects to CEC without need to unplug/plug the hdmi cable.


    I tested also with CoreELEC 21.3 and 22.0 RC2 and works fine, doesn't have this issue.

    Edited 2 times, last by mvrk (November 23, 2026 at 8:54 PM).

  • Next test, while it is still failing after a boot:

    Code
    echo 2 > /sys/module/cec/parameters/debug 
    sleep 40
    dmesg | grep -i cec | tail -150
    echo 0 > /sys/module/cec/parameters/debug

    The 40 s covers about three of Kodi's retries. Debug level 2 logs each poll and the status it got back (OK, NACK, ARB_LOST or ERROR), which tells us whether this is the bus or TV (ARB_LOST, ERROR, or other devices answering) or the driver (no completion at all).