Hdmi-CEC and OSMC

Hi,
I had a corrupted SD card so I had to reinstall OSMC to a new card. RaspberryPI2 B with 1G of RAM.

Initially everything was working fine (well, I had to reconfigure everything), but once I just realized that the remote doesn’t work as it used to. And it worked initially with the new system also. But now it stopped working with TV. It’s a Samsung.
On the TV the Anynet+ is enabled, but when I go to find devices it doesn’t find any.

It worked, but now it doesn’t work…

Debug logs can be found here:
https://paste.osmc.tv/sodalamusi

Could it be that I have enabled a tty console also (so when mediacenter service is stopped I got a text console on screen, instead of rebooting kodi)?

When kodi is not running the cec-client’s outputs this:

osmc@osmc:~/.kodi/temp$ cec-client
No device type given. Using 'recording device'
CEC Parser created - libCEC version 6.0.2
no serial port given. trying autodetect:
 path:     /dev/cec0
 com port: Linux

opening a connection to the CEC adapter...
DEBUG:   [              97]     Broadcast (F): osd name set to 'Broadcast'
DEBUG:   [              97]     CLinuxCECAdapterCommunication::Open - m_fd=3 bStartListening=1
DEBUG:   [              97]     CLinuxCECAdapterCommunication::Open - ioctl CEC_ADAP_G_PHYS_ADDR - addr=2000
DEBUG:   [              97]     CLinuxCECAdapterCommunication::Open - ioctl CEC_ADAP_S_LOG_ADDRS - log_addr_mask=0000 num_log_addrs=0
DEBUG:   [              98]     CLinuxCECAdapterCommunication::Open - ioctl CEC_ADAP_S_LOG_ADDRS - log_addr_mask=8000 num_log_addrs=1
NOTICE:  [              98]     connection opened
DEBUG:   [              98]     CLinuxCECAdapterCommunication::Process - CEC_DQEVENT - CEC_EVENT_STATE_CHANGE - log_addr_mask=8000 phys_addr=2000
DEBUG:   [              99]     << Broadcast (F) -> TV (0): POLL
TRAFFIC: [              99]     << f0
DEBUG:   [              99]     processor thread started
DEBUG:   [             404]     CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT - tx_status=01 len=1 addr=f0 opcode=ffffffff
DEBUG:   [             404]     >> POLL sent
DEBUG:   [             404]     TV (0): device status changed into 'present'
DEBUG:   [             404]     << requesting vendor ID of 'TV' (0)
TRAFFIC: [             404]     << f0:8c
DEBUG:   [             471]     CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT - tx_status=01 len=2 addr=f0 opcode=8c
DEBUG:   [            1471]     expected response not received (87: device vendor id)
TRAFFIC: [            1472]     << f0:8c
DEBUG:   [            1524]     CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT - tx_status=01 len=2 addr=f0 opcode=8c
DEBUG:   [            2525]     expected response not received (87: device vendor id)
DEBUG:   [            2525]     registering new CEC client - v6.0.2
DEBUG:   [            2525]     SetClientVersion - using client version '6.0.2'
NOTICE:  [            2525]     setting HDMI port to 1 on device TV (0)
DEBUG:   [            2525]     SetConfiguration: double tap timeout = 200ms, repeat rate = 0ms, release delay = 500ms
DEBUG:   [            2525]     detecting logical address for type 'recording device'
DEBUG:   [            2525]     trying logical address 'Recorder 1'
DEBUG:   [            2525]     << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [            2525]     << 11
DEBUG:   [            2587]     CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT - tx_status=24 len=1 addr=11 opcode=ffffffff
TRAFFIC: [            2588]     << 11
DEBUG:   [            2659]     CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT - tx_status=24 len=1 addr=11 opcode=ffffffff
DEBUG:   [            2659]     >> POLL not sent
DEBUG:   [            2659]     using logical address 'Recorder 1'
DEBUG:   [            2659]     Recorder 1 (1): device status changed into 'handled by libCEC'
DEBUG:   [            2659]     Recorder 1 (1): power status changed from 'unknown' to 'on'
DEBUG:   [            2659]     Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG:   [            2659]     Recorder 1 (1): CEC version 1.4
DEBUG:   [            2659]     AllocateLogicalAddresses - device '0', type 'recording device', LA '1'
DEBUG:   [            2659]     CLinuxCECAdapterCommunication::SetLogicalAddresses - ioctl CEC_ADAP_S_LOG_ADDRS - log_addr_mask=0000 num_log_addrs=0
DEBUG:   [            2660]     CLinuxCECAdapterCommunication::Process - CEC_DQEVENT - CEC_EVENT_STATE_CHANGE - log_addr_mask=0000 phys_addr=2000
DEBUG:   [            2802]     CLinuxCECAdapterCommunication::Process - CEC_DQEVENT - CEC_EVENT_STATE_CHANGE - log_addr_mask=0002 phys_addr=2000
DEBUG:   [            2802]     changing physical address to 2000
DEBUG:   [            2802]     Recorder 1 (1): physical address changed from ffff to 2000
DEBUG:   [            2802]     CLinuxCECAdapterCommunication::SetLogicalAddresses - ioctl CEC_ADAP_S_LOG_ADDRS - log_addr_mask=0002 num_log_addrs=1
DEBUG:   [            2802]     Recorder 1 (1): osd name set to 'CECTester'
DEBUG:   [            2802]     Recorder 1 (1): menu language set to 'eng'
DEBUG:   [            2802]     using provided physical address 2000
NOTICE:  [            2802]     CEC client registered: libCEC version = 6.0.2, client version = 6.0.2, firmware version = 0, logical address(es) = Recorder 1 (1) , physical address: 2.0.0.0,  compiled on 2021-02-21 00:19:23 by root@compiler2 on Linux 4.19.0-9-amd64 (armv7l), features: P8_USB, DRM, P8_detect, Linux
DEBUG:   [            2802]     << Recorder 1 (1) -> TV (0): OSD name 'CECTester'
TRAFFIC: [            2802]     << 10:47:43:45:43:54:65:73:74:65:72
DEBUG:   [            3358]     CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT - tx_status=01 len=11 addr=10 opcode=47
DEBUG:   [            3358]     << requesting power status of 'TV' (0)
TRAFFIC: [            3358]     << 10:8f
DEBUG:   [            3425]     CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT - tx_status=01 len=2 addr=10 opcode=8f
DEBUG:   [            4425]     expected response not received (90: report power status)
TRAFFIC: [            4425]     << 10:8f
DEBUG:   [            4478]     CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT - tx_status=01 len=2 addr=10 opcode=8f
waiting for input
DEBUG:   [            5478]     expected response not received (90: report power status)
^Csignal caught: 2 - exiting
DEBUG:   [           32931]     unregistering all CEC clients
NOTICE:  [           32931]     unregistering client: libCEC version = 6.0.2, client version = 6.0.2, firmware version = 0, logical address(es) = Recorder 1 (1) , physical address: 2.0.0.0,  compiled on 2021-02-21 00:19:23 by root@compiler2 on Linux 4.19.0-9-amd64 (armv7l), features: P8_USB, DRM, P8_detect, Linux
DEBUG:   [           32931]     Recorder 1 (1): power status changed from 'on' to 'unknown'
DEBUG:   [           32931]     Recorder 1 (1): vendor = Unknown (000000)
DEBUG:   [           32931]     Recorder 1 (1): CEC version unknown
DEBUG:   [           32931]     Recorder 1 (1): osd name set to 'Recorder 1'
DEBUG:   [           32931]     Recorder 1 (1): device status changed into 'unknown'
DEBUG:   [           32931]     CLinuxCECAdapterCommunication::Process - CEC_DQEVENT - CEC_EVENT_STATE_CHANGE - log_addr_mask=0000 phys_addr=2000
DEBUG:   [           32931]     CLinuxCECAdapterCommunication::SetLogicalAddresses - ioctl CEC_ADAP_S_LOG_ADDRS - log_addr_mask=0000 num_log_addrs=0
DEBUG:   [           32931]     CLinuxCECAdapterCommunication::SetLogicalAddresses - ioctl CEC_ADAP_S_LOG_ADDRS - log_addr_mask=0000 num_log_addrs=0
DEBUG:   [           32931]     unregistering all CEC clients
DEBUG:   [           32931]     CLinuxCECAdapterCommunication::SetLogicalAddresses - ioctl CEC_ADAP_S_LOG_ADDRS - log_addr_mask=0000 num_log_addrs=0
DEBUG:   [           32936]     CLinuxCECAdapterCommunication::Process - CEC_DQEVENT - CEC_EVENT_STATE_CHANGE - log_addr_mask=0000 phys_addr=2000
DEBUG:   [           33943]     CLinuxCECAdapterCommunication::Process - stopped - m_fd=3
DEBUG:   [           33943]     CLinuxCECAdapterCommunication::Close - m_fd=3

Could someone guide me to the correct direction where to look because now I am clueless…
Thanks,
S

First thing to try is removing the power to the TV and the osmc device for a few minutes. They need to be off and not in stand by

Running CEC-client will break CEC input in Kodi until you reboot the RPi (not just restarting Kodi) just FYI. If this is a clean install then it should have been enabled by default but just in case you might check settings>system>input>peripherals> to be sure.

This is somekind of black magic.

I did what you suggested: turned off, power removed (pi + TV), 5mins, turned back everything.
Thanks a lot for your help, now it works.

ok, good to know. Anyway, when I executed cec-client, libcec didn’t work before either on Kodi.
And yes, I checked. It is enabled on Kodi, enabled on TV.

The solution was the good-old powercycle (with a little rest between trurning off and on). Is the libcec std designed by Microsoft?? :slight_smile:

br,
S

Not really. TV’s sometimes get messed up with the CEC and a hard boot is the only way to get the TV to start fresh with new CEC assignments. In the same way a downstream device can get stuck using a device identifier on the CEC bus that either conflicts or the TV doesn’t know about and rebooting the device is a way to ensure a new poll gets requested.

If you look into the history it is way worse than if it was written by MSFT. The issue with the cec-client is that only piece of software can be controlling CEC at a time and by starting that you take the control away from Kodi.

Apologies, really the correct thread but someone else might find this useful.

I upgraded to a Pi4 and the latest OSMC build. CEC stopped working.
I’ve been here before so tried swapping cables and powering off…
For some reason CEC worked perfectly when I swapped the micro HDMI to the left port. I had it in the right thinking i wanted space between it and the power.

Anyway, left micro HDMI was a winner.

1 Like

After messing around with all the tedious configuration settings and the remove, unplug, reset, restart solutions offered here and elsewhere, THIS ↑↑↑↑ is the one that actually worked. I just moved the micro-HDMI to the left port, next to the power, and rebooted it. Suddenly the remote works.