Posts by noop

    After overlaying /usr/lib and /usr/bin at runtime and loading in the libcec 4.0.1 library/client from LibreELEC 8.x onto my running 9.0.1 system, the issue persists. I confirmed that the issue is absent if the Kodi service is stopped. As this issue was not present before I installed 9.0.0, it appears to be within Kodi. I have been perusing the Cec adapter code in Kodi for what caused this bug. For some reason the Kodi CEC adapter seems to be disregarding/overwriting the xml config that is set, even if Kodi is stopped. Based on reading the CEC code it should not be sending these responses to turn on the TV

    I still believe that patch for libcec would work, though, as it serves as a filter to abort unwanted responses.

    Okay, I shaved many yaks. I modified the shared library in LibreELEC at runtime using an overlayfs and (perhaps unsurprisingly) found that the given compiled binary targeted for raspbian is not loadable. In other news, at least now I know how to use a Magisk-style approach to modify LibreELEC.

    I guess I would have to patch the source in the LibreELEC repo and build a patched library to test it.

    Should anyone prefer the unabridged cec-client log that captured the issue:

    Hardware: RPi 3 Model B v1.2 (not the B+)

    LibreELEC version: 9.0.1 & 9.0.0

    Ever since upgrading from LibreELEC 8.x to 9 on my RPi3B (not B+), my Sony TV will not remain off for more than 5-10 minutes. Physically pressing the power button on the TV to activate standby mode works fine, but the TV will power on again after a short time. I have disabled everything power-on related that is possible in the libCEC config in the GUI. The xml config for CEC is below. The "wake_devices" aspect seems to be overwritten by Kodi even if the file is manually edited while the kodi.service is not running.

    I am confident that this is caused by the LibreELEC device. Below is the cec-client log output indicating that the TV is being powered on in response to a command sent by the LibreELEC device. Kodi debug logging is enabled, but the logs are *completely* silent when this event occurs, and remain silent until the screensaver kicks in 16 minutes later.

    What I am observing on my device appears to be this issue: AVR keeps turning on after turning off TV

    ...with a potential patch: AVR keeps turning on after turning off TV · Issue #403 · Pulse-Eight/libcec · GitHub

    Anything obvious I have overlooked? Any known solution?

    I'm trying to avoid posting an X-Y problem, but at this point I wanted to try that patched version of libcec.so.4.0.2 to see if it would fix my issue, but then I noticed that the device is booted from a squashfs root filesystem. Is there a simple way for me to test this patched library without repacking my libreelec image?


    cec-client log excerpt:

    TRAFFIC: [342010] >> 0f:84:00:00:00

    DEBUG: [342010] << Recorder 1 (1) -> broadcast (F): physical address 1000

    TRAFFIC: [342010] << 1f:84:10:00:01

    DEBUG: [342010] >> TV (0) -> Broadcast (F): report physical address (84)

    WARNING: [342430] unhandled response received: opcode=84 initiator=1 destination=f response=0

    TRAFFIC: [342430] >> 0f:87:08:00:46

    DEBUG: [342431] << Recorder 1 (1) -> Broadcast (F): vendor id Pulse Eight (1582)

    TRAFFIC: [342431] << 1f:87:00:15:82

    DEBUG: [342431] >> TV (0) -> Broadcast (F): device vendor id (87)

    TRAFFIC: [342792] >> 0f:a0:08:00:46:00:04:00:01

    DEBUG: [342792] >> TV (0) -> Broadcast (F): vendor command with id (A0)

    WARNING: [343062] unhandled response received: opcode=87 initiator=1 destination=f response=0

    TRAFFIC: [343063] >> 0f:80:00:00:10:00

    DEBUG: [343063] TV (0): power status changed from 'standby' to 'on'

    DEBUG: [343063] making Recorder 1 (1) the active source

    NOTICE: [343063] >> source activated: Recorder 1 (1)

    DEBUG: [343063] sending active source message for 'Recorder 1'

    NOTICE: [343063] << powering on 'TV' (0)

    TRAFFIC: [343063] << 10:04


    lib-cec config:

    <settings>

    <setting id="activate_source" value="0" />

    <setting id="button_release_delay_ms" value="0" />

    <setting id="button_repeat_rate_ms" value="0" />

    <setting id="cec_hdmi_port" value="1" />

    <setting id="cec_standby_screensaver" value="0" />

    <setting id="cec_wake_screensaver" value="0" />

    <setting id="connected_device" value="36037" />

    <setting id="device_name" value="Kodi" />

    <setting id="device_type" value="1" />

    <setting id="double_tap_timeout_ms" value="300" />

    <setting id="enabled" value="1" />

    <setting id="pause_or_stop_playback_on_deactivate" value="36045" />

    <setting id="pause_playback_on_deactivate" value="0" />

    <setting id="physical_address" value="0" />

    <setting id="power_avr_on_as" value="0" />

    <setting id="send_inactive_source" value="0" />

    <setting id="standby_devices" value="231" />

    <setting id="standby_devices_advanced" value="" />

    <setting id="standby_pc_on_tv_standby" value="36045" />

    <setting id="standby_tv_on_pc_standby" value="0" />

    <setting id="tv_vendor" value="0" />

    <setting id="use_tv_menu_language" value="0" />

    <setting id="wake_devices" value="36037" />

    <setting id="wake_devices_advanced" value="" />

    </settings>