LE 10.0.1/10.0.2 RPi4 - "CECActivateSource" stops working when soundbar connected

  • Hello,

    My specs:

    JVC LT-55C550 TV

    Panasonic SC-HTB488EBK Soundbar

    Raspberry Pi 4 Model B

    LibreELEC 10.0.1 & 10.0.2

    Never had this issue in LE 9.* or 10.0.0. Also, downgrading to LE 10.0.0 from 10.0.1/10.0.2 immediately resolves the problem.

    The soundbar and the raspberry have no direct connection with each other. Instead, they are connected with their own respective HDMI cables to ports 1 and 3 on the TV.

    After switching the TV off with "CECStandby" command, issuing "CECActivateSource" has no effect. I normally use a Flirc remote to issue the commands via script, i.e:

    Code
    runscript(special://masterprofile/turn_on.py)
    
    
    import xbmc
    xbmc.executebuiltin('CECActivateSource')

    However, I also tried sending the command via ssh kodi-send -a "CECActivateSource" which again yields no results (but does work on earlier LE versions).

    Disconnecting the soundbar, restarting the raspberry, and then reconnecting the soundbar resolves the issue temporarily. But, if the raspberry is shutdown/restarted again with soundbar connected, the issue returns.

    I've searched the forum, but most issues I found relate to CEC not working at all, not just the one command. The few things suggested from those topics that I tried:

    - Put `hdmi_force_hotplug=1` in config.txt

    - Buy a new microhdmi cable and make sure it's connected in the raspberry port closest to the power port

    - Cut off power to TV for 20min

    - Tried "CECToggleState" instead of "CECActivateSource", but that command never worked consistently even in the older versions, and it's no better in the new ones

  • not sure if the same source, but since 10 we sometimes have to manually select Anynet+ on my Samsungtv to be able to ue the tv-remote on kodi.

  • not sure if the same source, but since 10 we sometimes have to manually select Anynet+ on my Samsungtv to be able to ue the tv-remote on kodi.

    Sadly, the issue is not remote-exclusive, as sending commands directly to raspberry via ssh still has no desired effect.

  • I've tried the dev build and added "vc4.inval_delay=0 vc4.cec_debug=0x100" in cmdline.txt file (as per link below) which has resolved the issue for me. From what I understand the delay was set to prevent the TV from inadvertently turning back on after shutting down. With the standard delay of 1000ms (1sec) you would expect to be able to turn the TV back on almost immediately. In my case, however, waiting for 5 seconds or 2 minutes did not help and the TV was not waking up at all via CECActivateSource.

    popcornmix
    March 27, 2022 at 9:50 PM

    Would it be possible to add the option within the GUI to adjust this delay?

  • Would it be possible to add the option within the GUI to adjust this delay?

    You said you fixed it with "vc4.inval_delay=0 vc4.cec_debug=0x100".

    Have you fixed it with "vc4.inval_delay=<some number> vc4.cec_debug=0"

    If not, there's no point adding a gui option to adjust the delay for you.

  • You said you fixed it with "vc4.inval_delay=0 vc4.cec_debug=0x100".

    Have you fixed it with "vc4.inval_delay=<some number> vc4.cec_debug=0"

    If not, there's no point adding a gui option to adjust the delay for you.

    Ah, apologies, I naively assumed vc4.cec_debug adds some verbose logs to help debug problems or something like that. Did not realize it can actually affect anything.

    The results when adding to the end of the "/flash/cmdline.txt" file:

    vc4.inval_delay=0 vc4.cec_debug=0

    TV does not switch on.

    vc4.inval_delay=3000 vc4.cec_debug=0

    TV switches on as long as I send CECActivateSource within 3 seconds. Does not switch on if I wait longer (e.g. 5-7seconds).

    vc4.inval_delay=5000

    TV switches on as long as I send CECActivateSource within 5 seconds. Does not switch on if I wait longer (e.g. 10seconds).

    vc4.cec_debug=0x100

    TV always switches on when I send CECActivateSource.

    Then my question is, what does vc4.cec_debug=0x100 do and why does it fix my case? Is it something that can be added in the options instead of delay? Or is there a way to fix whatever that is affecting me? I'm happy to try anything else if it helps.

  • Alternatively, is there any way I can resolve this issue manually just for myself via command line/config files in a non-dev build? I've tried the new LE 10.0.3, and the issue remains so I'm still stuck with LE 10.0.0.

  • I'm having a similar issue. I can get CECActivateSource to work but CECToggleState will only power on my TV it won't put it into standby. I tried the above mentioned vc4.force_hotplug=1 and nothing works. At one point I did have CECStandby working too but I can't recreate this now.

    I'm on LE 10.0.3 RPi 4B connected to Samsung TV + Sony AVR. My cec_CEC_Adapter.xml in peripheral_data looks like this:

  • I just use different buttons to turn TV on and off, and execute an appropriate python script. CECToggleState seems to be iffy with some TVs, so I only use CECActivate and CECStandby.

    Code: userdata/turn_off.py
    import xbmc
    
    xbmc.executebuiltin('Action(stop)')
    xbmc.executebuiltin('activatewindow(home)')
    xbmc.executebuiltin('CECStandby')