Randomly losing CEC topology after x-amount of time

For a while we’ve had a strange occurance of some of our device losing CEC connection to our TVs. This occurs after a random time the TV is on.

We have two situations running “cec-ctl -S”:

  • We have a physical address (e.g. 1.0.0.0) but no topology (most occurances and example below)
  • We have no physical address (f.f.f.f) and no topology

In the first situation a reboot always seems to help restore the CEC connection. However we don’t want to rely on reboots and sustain the CEC connection.

For context, we have multiple devices running digital signage. At night we make them go in standby and in the morning we activate them.

This seems to be the HDMI Adapter: https://github.com/armbian/linux-rockchip/blob/9fb8c4cc0ec516870dea431c83e2d546bb57df7d/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c#L1151

Xrandr always seems to recognize the screen an example (xrandr -q):

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 640mm x 360mm
1920x1080 60.00 *+ 50.00 59.94 30.00 25.00 24.00 29.97 23.98
1920x1080i 60.00 50.00 59.94
1280x1024 60.02
1360x768 59.80
1280x720 60.00 50.00 59.94
1024x768 60.00
800x600 60.32
720x576 50.00
720x576i 50.00
720x480 60.00 59.94
720x480i 60.00 59.94
640x480 60.00 59.94
1920x1080_60.00 59.96
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)

Some example outputs of a display that lost it’s CEC to the tv:

Driver Info:
Driver Name : dwhdmi-rockchip
Adapter Name : dw_hdmi_qp
Capabilities : 0x0000000e
Logical Addresses
Transmit
Passthrough
Driver version : 5.10.110
Available Logical Addresses: 4
Connector Info : None
Physical Address : 1.0.0.0
Logical Address Mask : 0x0000
CEC Version : 2.0
Vendor ID : 0x000c03 (HDMI)
OSD Name : ‘Record’
Logical Addresses : 1 (Allow RC Passthrough)

      Logical Address          : Not Allocated
        Primary Device Type    : Record
        Logical Address Type   : Record
        All Device Types       : Record
        RC TV Profile          : None
        Device Features        :
            None


    Topology:

A working device shows this:

Driver Info:
Driver Name : dwhdmi-rockchip
Adapter Name : dw_hdmi_qp
Capabilities : 0x0000000e
Logical Addresses
Transmit
Passthrough
Driver version : 5.10.110
Available Logical Addresses: 4
Connector Info : None
Physical Address : 1.3.0.0
Logical Address Mask : 0x0002
CEC Version : 2.0
Vendor ID : 0x000c03 (HDMI)
OSD Name : ‘Record’
Logical Addresses : 1 (Allow RC Passthrough)

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

    System Information for device 0 (TV) from device 1 (Recording Device 1):
            CEC Version                : 1.4
            Physical Address           : 0.0.0.0
            Primary Device Type        : TV
            Vendor ID                  : 0xffffff, 16777215
            OSD Name                   : 'X-ONE75'
            Menu Language              : eng
            Power Status               : On

    Topology:

        0.0.0.0: TV
                1.3.0.0: Recording Device 1

We’ve tried many things but no luck. Any insights are very welcome.

Kind regards!