HDMI-CEC work on PINE RockPRO64 until TV goes off and on cycle

  • Hi all,

    I have issue with HDMI-CEC on RockPro64 on 10beta1 and nightly (20210420). Turning TV off and on again stops remote controller work. The only resolution is to keep TV on and reboot the system. Then remote controller works until I turn the TV off and on again. It worked perfectly on LE 9.2.6. so nothing to do with HDMI cable or TV itself.

    Below are outputs from cec-ctl. Physical address and Logical address mask are changed when the TV goes the off and on cycle.

    TV is ON, RockPro64 has been rebooted and RC works:

    --------------------------------------------------------------------------------------------

    Driver Info:

    Driver Name : dwhdmi-rockchip

    Adapter Name : dw_hdmi

    Capabilities : 0x0000010e

    Logical Addresses

    Transmit

    Passthrough

    Connector Info

    Driver version : 5.10.30

    Available Logical Addresses: 4

    DRM Connector Info : card 0, connector 61

    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


    TV has been turned off and on again, RC doesn't work:

    --------------------------------------------------------------------------------------------

    Driver Info:

    Driver Name : dwhdmi-rockchip

    Adapter Name : dw_hdmi

    Capabilities : 0x0000010e

    Logical Addresses

    Transmit

    Passthrough

    Connector Info

    Driver version : 5.10.30

    Available Logical Addresses: 4

    DRM Connector Info : card 0, connector 61

    Physical Address : f.f.f.f

    Logical Address Mask : 0x0000

    CEC Version : 1.4

    Vendor ID : 0x001582 (Pulse-Eight)

    OSD Name : ''

    Logical Addresses : 1 (Allow Fallback to Unregistered)

    Logical Address : Not Allocated

    Primary Device Type : Playback

    Logical Address Type : Playback

    Any ideas?

    Thanks.

  • There are still some oddities with the upstream cec-driver, this however, seems to work for my TV (Samsung).

    Note that takes up to 10 secs to "recover" the connection. Can you paste the output of cec-ctl -m somewhere when switching TV on/off? It should look something like this: http://ix.io/2ZFX

  • I have 10 years old Panasonic TV. Here is the output of cec-ctl -m:

    First "Received from TV to all..." is when I turn TV off, the rest appeared when I turn TV on.

  • It looks like your TV doesn't announce that he went to standy - so HDMI controller doesn't "know", that the TV disappeared from CEC bus.

    After reading your report again: With "power cycle" you mean: cut off power completly? This way it can't (currently) work, since HDMI controller will continue to poll the old CEC address endlessley, while your TV will ask for a new (maybe even the one it had before) when you switch it on again. If this is possible it would be better to put TV in standby first and cut off power after that.

    The only way arround that (I can think of), is to ask TV to "search" for CEC devices again and reconnect.

  • I can see, I was not so clear regarding describing the situation. So, let me rephrase it again:

    1. RockPro64 is not connected to the power, TV is standby
    2. I turn on TV
    3. I power RockPro64 on
    4. HDMI-CEC works without any issue with RC
    5. I turn TV into standby
    6. RockPro64 is on, I can SSH into LE
    7. I turn TV on
    8. RC doesn't work on LE
    9. I have to SSH to LE and reboot it
    10. TV is on while LE's reboot
    11. HDMI-CEC works without any issue with RC
    12. I turn TV into standby
    13. Goto 7

    Interesting is that LE 9.2.6 worked properly without any issue. I can setup 9.2.6 again and check the messages, if you wish...

    I tried a lot of "magic" with TV and HDMI cable to disconnect/connect/turn on/turn off/remove from power/... none worked. I have to reboot LE.

    Time to time I can see in dmesg ouput LOW_DRIVE status but I cannot figure when the message appears. I checked source code and patches a found that it could be this part of code responsible for that in file projects/Rockchip/patches/linux/default/linux-1003-for-libreelec.patch

    No idea if this could be related...

  • I can see, I was not so clear regarding describing the situation. So, let me rephrase it again:

    Thanks, seems clearer now.

    So - the only difference, I can see between the two cec-ctl monitor logs is ,that my TV annouces it went to standby with

    Code
    Received from TV to all (0 to 15): STANDBY (0x36)

    what is completly missing in your log - this way the HDMI controller "knows", that the device will be re-requesting the same address at some later point.

    Time to time I can see in dmesg ouput LOW_DRIVE status but I cannot figure when the message appears. I checked source code and patches a found that it could be this part of code responsible for that in file

    This is a required patch for some other TVs - without it, CEC wasn't working at all for them. I don't think its releated to this problem. But it would be interessting, if your are seeing this message when switching your TV off.

    Interesting is that LE 9.2.6 worked properly without any issue. I can setup 9.2.6 again and check the messages, if you wish...

    That could be helpful.

    I'm not sure, if your TV has that option - could you also try to search for CEC devices (should be somewhere in the settings menu of your TV) after you switched it on again and paste the cec-ctl -m

  • Sorry, no way to configure in such detail CEC on the TV.

    Here is output from cec-ctl -m on LE 9.2.6

    TV is ON and I push RC power button to turn TV into standby:

    A here is output when I press RC power button to wake TV up:

    To be honest, I'm a bit surprised that there is such many lines but in the end it works.

    I also checked dmesg on LE 9.2.6 and these lines appear in the output when I wake the TV up:

    These lines don't show on LE 10b1.

  • One more thing, I have to appologize and sorry for that. I found I can a bit configure Viera Link on the TV.

    I configured it to support Viera Link (CEC) for standby status. After that I can see the message Received from TV to all (0 to 15): CEC_MSG_STANDBY (0x36) when I turn the TV to standby mode via RC. That's only difference from the previously pasted logs - the rest parts of logs continues in same manner.

    Nevertheless, the Viera Link configuration doesn't have impact on the behavior. LE 9.2.6 works with both Viera Link configs, LE 10b1 no way with any of them:-(

    Btw, I just noticed, LE 10b1 has these additional lines in tho log when I press RC power to turn the TV on:

    Code
    (warn: State Change events were lost)
    Event: State Change: PA: f.f.f.f, LA mask: 0x0000, Conn Info: yes
  • Thanks for the logs, I will have a look at them. No worries for the "missing" lines - they are not related to CEC - actually its debugging stuff, which shouldn't have logged by default in LE 9 as well :)

    From a quick glance: I see a lot of

    Code
    Tx, Error (1), Max Retries

    messages in LE 9 logs as well - I guess you already tried a different HDMI cable?

  • Could you try this image: https://mega.nz/file/yTIWTD7Q#…w6ozjcyeM02jLNY

    Please take a spare SD card and flash it there. Note: Since I can't reproduce your issue, I just compared the vendor driver with the current upstream driver and tried to find a difference that could have an impact - so: no guarentee it will change anything or even make it worse than before.

    If it doesn't work either: remove the cec.debounce_ms=5000 in extlinux.conf and check if that changes anything.

  • Unfortunately no improvement. I also made test with removed cec.debounce_ms=5000 from extlinux.conf but there is no difference.

    LE starts while TV is on:

    TV goes into Standby:

    Code
    Received from TV to all (0 to 15): VENDOR_COMMAND_WITH_ID (0xa0):
            vendor-id: 32837 (0x00008045)
            vendor-specific-data: 0x20 0x01 0x11
    Received from TV to all (0 to 15): STANDBY (0x36)
    Received from TV to all (0 to 15): STANDBY (0x36)

    TV is on again:

    Interrupted cec-ctl -m command and started again:

  • Hi everyone!

    I have same problem on Rock64 with Sony Bravia TV. Everything worked fine with LE 9.2.x releases but even with the latest 10.0b4 CEC works only after LE is freshly restarted and until TV is turned off.

    I'll attach some logs also.

    First, CEC in a working state. Last command appears when TV is turned off.

    After I turn TV back on, these commands are received but buttons on the remote don't generate anything to the log.

  • I also have this exact same issue with a RockPro64 and a TV Sony Bravia (although given the context I imagine that the tv used would make no difference).

    And I can say that it happens both on LibreELEC but also with Kodi Matrix.

  • Hello, include me on the list of people having CEC problems after updating. Using RK3328 though.

    CEC works after rebooting the RK3328, rebooting the TV from an off state or pulling the HDMI cable out does nothing once the CEC connection is lost.