CEC works on 8.2.2.x builds but doesn't work on 8.90.x builds for power off only

  • Hello.

    I know that "CEC might not work when your box has incompatible u-boot or your TV is not that well supported by Amlogic low-level CEC driver." But it works on one release and doesn't work on other.

    But what is the difference between 8.2.2.x and 8.90.x builds CEC function or power off function may be?

    It doesn't work when I press power off on my S912 device in 8.90.x builds, but works in 8.2.2.x builds. For power on it works in both builds.

    Visually it looks like 8.90.x builds powered off faster.

    What kind of logs can I collect for this issue?

  • This is the main difference that makes 8.2.x builds shut down longer:

    kodi: wait longer for Kodi to stop · kszaq/LibreELEC.tv@25ff796 · GitHub

    This means that in 8.2 builds I extended a period of time in which Kodi has to shut down (or else the process is killed). This might affect CEC shutdown function - if Kodi is killed before it fully shuts down, it won't be able to send CEC shutdown command.

    GDPR-2 You may want to pick that commit for testing.

  • This is the main difference that makes 8.2.x builds shut down longer:

    kodi: wait longer for Kodi to stop · kszaq/LibreELEC.tv@25ff796 · GitHub

    This means that in 8.2 builds I extended a period of time in which Kodi has to shut down (or else the process is killed). This might affect CEC shutdown function - if Kodi is killed before it fully shuts down, it won't be able to send CEC shutdown command.

    GDPR-2 You may want to pick that commit for testing.

    Looks like it can be the reason for my second problem too, my hdd connected via usb is not going in power off state in 8.90.x builds too.

  • Looks like it can be the reason for my second problem too, my hdd connected via usb is not going in power off state in 8.90.x builds too.

    thanks for the heads up kszaq I did see this when porting your branch to master but I didn't know what this was for so I didn't include it

    CEC problem solved in last devel build.

    But the problem with my HDD still exist, it doesn't wan't to go in sleep mode after LE shutdown

    May be some other fixes are not transferred to 8.90.x builds?

  • CEC problem solved in last devel build.

    But the problem with my HDD still exist, it doesn't wan't to go in sleep mode after LE shutdown

    May be some other fixes are not transferred to 8.90.x builds?

    Did it enter into sleep mode in 8.2?

  • Did it enter into sleep mode in 8.2?

    Yes, it goes into sleep mode in 8.2.x
    But in 8.90.x it still working and working. I waited for 1 hour, no changes, it still spinning and working after LE shutdown.

    HDD connected via USB dock station with separate power.


    Are any logs from both versions can help to resolve this issue?

    Edited once, last by boot2k3 (January 22, 2018 at 7:24 PM).

  • With the fix kodi: wait longer for Kodi to stop · kszaq/LibreELEC.tv@25ff796 · GitHub in 8.90.3 CEC sometime works, sometime no.
    If I press an shutdown button on my remote while IPTV is working the CEC doesn't work and my AVR still working

    If I press an shutdown button when system is idle (on any GUI page for example) then CEC works and AVR goes to standby mode.

    Looks like 15 seconds sometime is not enough. Is it possible to change the order or priority for processes shutdown procedure?

    Also HDD shutdown problem described above still persist.

    GDPR-2, could you make a test build with 60 seconds timeout to check if this function works or not in 8.90. builds? And I will try to collect shutdown log if it will be working to find what process does not have a time for shutdown.

  • Still the problem with CEC if I press shutdown button while looking for TV (PVR IPTV.Simple). My AVR doesn't go to standby and process take a lot of time.

    I tried to add kodi-send --action "Stop" in shutdown.sh to stop working TV or video before shutdown, but it doesn't work.

    As a working solution I assign a script on power button:

    Bash
    #!/bin/sh
    kodi-send --action "Stop"
    kodi-send --action "Shutdown()"

    And now CEC works and shutdown process goes much faster.

    GDPR-2, is it possible to add this action in the code to stop any video/PVR process before shutdown process starts?