CEC not working

Thanks so much for your efforts on this. In my case (using S905x2 X96 max 4g/32g box), the “couldn’t initialize CEC adapter” message happened nearly 100% of the time. Then I upgraded the Android firmware from Oreo to Pie and also turned on, off and then on again the HDMI-CEC setting in Android first. Since then, I’m getting about 80-90% success rate with initializing CEC.

I’ll give your images a try and let you know. Thanks again!!

Also please enable debug logging in Kodi and add the libCEC component, please!

A very quick test (I’ll run with debug later this evening if I can).

The nr-1 image failed to initialize the CEC adapter. I then tried nr-2 and so far it has been 4 out of 4 successful reboots - some with TV already on and TV off.

I’ll stick with nr-2 for now - it looks good so far. Do you still want debug logs??

Again - many thanks for your time and effort!

Really? Didn’t expect that :wink:

First 2 test images:

Here another test version n3!
It have added a hardcoded sleep of 30 seconds before the CEC adapter get initialized!
So please if nr 2 isn’t working try this test version!

  1. CoreELEC-Amlogic-ng.arm-9.2-devel-1569509352.tar


"hardcode" default bootloader CEC setting to 0x3f
Do not touch received messages if address is not enabled.
Added hardcoded sleep of 30s before adapter initialize

nr 2 still working 100% for the S905x2 x96 max 4g/32g box here. One good change I also noticed is that when I power off the S905x2 box now, the HDMI source switches automatically to the TV source (before your change it did not do that).

One question - and AFAIK it has always been this way with this kernel - If I power off the TV with the TV remote, the CE box also powers off (good - controlled by CEC settings in CE). If I then power on the TV with the TV remote, the CE box also powers on - with older versions of CE and LE, powering on the TV had no effect on the CE box. If I wanted to turn on the CE box and TV, I would use the power on the CE remote.

I could not find a setting in CEC in CoreELEC to control this - am I missing something here? I would not expect the CE box to power on if I use the TV remote power button - I would expect just the TV to power on.

Thank you very much for your efforts @all. Unfortunately, on an Odroid N2 --> Marantz AVR --> Philips TV even with 30 seconds delay: Could not initialise…


And nr 1 or nr 2?

N2 as well as N3 not working. N1 not tested so far. Is it worth it?

Please enable debug log in Kodi & enable the libCEC component too for logging!
Restart your N2 and after the pop up appeared open a SSH connection and enter:
cat /storage/.kodi/temp/kodi.log | paste
You will get a link to the uploaded debug log.

I have done another extra debug version:

If you get problem with the pop up (Couldn't initialize the CEC adapter) shown in Kodi please use this debug image. This update image is only to get a CEC debug log.

After update wait until you have seen the pop up in Kodi. Open a SSH connection and enter:

dmesg | grep cectx | paste

and post the resulting http link and a small description about the hardware setup.
Like box (N2) & AVR yes/no & TV brand.

Sorry for the delay. I fell asleep :slight_smile:

With the version you provided yesterday, “cat /storage/.kodi/temp/kodi.log | paste” brings


“dmesg | grep cectx | paste” brings


EDIT: Odroid N2 --> Marantz AVR --> Philips TV

Thx, I see the issue now!

It’s a CEC hardware issue of the SoC. As there is no register description available I don’t know how to fix it. I will take a look next week.

[   14.517904@5] cectx ff80023c.aocec: hdmitx_cec_write: size: 1
[   14.549776@4] cectx ff80023c.aocec: CEC tx msg len 1: f0
[   14.553647@1] cectx ff80023c.aocec: warning:ARB_LOST
[   14.554641@1] cectx ff80023c.aocec: warning:FOLLOWER
[   14.765304@1] cectx ff80023c.aocec: CEC tx msg len 1: f0
[   14.769439@1] cectx ff80023c.aocec: warning:ARB_LOST
[   14.770198@1] cectx ff80023c.aocec: warning:FOLLOWER
[   14.937027@4] cectx ff80023c.aocec: CEC tx msg len 1: f0
[   14.940917@1] cectx ff80023c.aocec: warning:ARB_LOST
[   14.940940@4] cectx ff80023c.aocec: hdmitx_cec_write: size: 1, ret 2

This log show a transfer (ping) of the box to the TV. But it fails after 3 unsuccessful attempt.
It fails by ARB_LOST. If no client (TV) is connected with node id 0x0 it should show a not acknowledge or an acknowledge if the TV is connected. But ARB_LOST shows a CEC bus problem.

1 Like

@Portisch can your work on CEC be added to the Vim 3 builds? On my Panasonic tv I don’t get the CEC initialisation error but CEC doesn’t work as it should. When I change source to vim3 initially CEC doesn’t work but then normally after start playback it starts to work. If you would like me to test any build I would be happy to

You just can test the tar on all Amlogic-ng devices :wink:
But Panasonic is just strange and make problems everywhere with CEC.
There is some info around here in the forum, I guess it was: deactivate set to active source on kodi start in CEC options.

Ok Thanks I’ll give it a go! I tried deactivating active source it didn’t work. Strange thing is CEC worked perfectly on my old mecool s912 device with the same tv it’s only since I upgraded to the vim3 it’s broken

The ARB_LOST issue was treated in this thread a couple of month ago. As far as I can see this was somehow fixed, but the corresponding build is not available any longer.

It is no help, but i have the same Problem, too.
Philips TV, Denon x2600h, Odroid C2.
Mostly CEC not correspond with TV <> Odroid.

I have now done a measurement with my oscilloscope on the CEC bus of the N2.
This is the transfer protocol:

[   20.833100@5] cectx ff80023c.aocec: try to send data by cec_ll_tx, len 1
[   20.859895@4] cectx ff80023c.aocec: CEC tx msg len 1: f0
[   20.889037@3] cectx ff80023c.aocec: try to send data by cec_ll_tx, len 2
[   20.915905@5] cectx ff80023c.aocec: CEC tx msg len 2: f0 8c
[   20.928535@1] cectx ff80023c.aocec: warning:ARB_LOST

The protocol shows the transfer of 0xf0 (ping TV) was successful.
The second transfer of 0xf0 0x8c fails by arbitration lost.
It just stop transfer after the third bit - I don’t know why.
The arbitration lost error happens randomly.

We got a hint from HK/Amlogic to remove a property in the dtb.
Maybe the CEC issue is fixed now!


Just update your device with this tar and have a test if the CEC issue Couldn't initialize the CEC adapter is solved!

1 Like