CEC mostly not working

Hi,

The device I have: MINIX Neo T5 ( s905x2 )
TV I have: an old Panasonic Viera TV

Image on microSD card: CoreELEC-Amlogic-ng.arm-19.5-Matrix_rc1-Generic.img

Note: I used this exact same TV for years with the exact same HDMI cable with a Raspberry Pi 3 B+ and LibreELEC 9.2.x (KODI Leia) and controlling KODI with the TV’s remote controller always worked. Today I just swapped out the Pi with the Minix. KODI works fine. But the Panasonic TV’s remote mostly doesn’t! I say mostly, because while I tried to fix / debug this issue today from about 4 PM to 1 AM (total of 9 hours!) I can say that out of this time, the Panasonic remote manged to controlled CoreELEC via a CEC a few times! I’d say it worked like 3-4 times, for 20 minutes total time – at the most unexpected times! For example, it did not work at all for hours so I decided to enable Debug logging in KODI using the Minix’s IR controller. After I enabled debug logging, the Panasonic remote started to work all of a sudden! Totally unexpected. So I rebooted the device with debug logging on, and after the reboot the TV’s remote sometimes continued to work, but not always. Regardless if debug logging was enabled or not it sometimes work, but mostly not. In the rare occasion when it worked then debugging was mostly turned on (I noticed that Debug logging slowed down KODI so maybe that’s why). But at least one time the remote worked even when debug logging was disabled.

But it was always way too easy to make it not to work: For example, when it worked, I just turned off the TV only (MINIX with CE remained ON) and then turned the TV back on. After this the TV’s remote no longer worked! Then I enabled debug logging again, it did not fixed the issue this time so I rebooted with debug logging enabled and after the reboot the TV’s remote still did not work. Here is the log file of this last reboot ( filtered with: grep -i cec ) :

In this log file I can see: “marking opcode ‘set osd name’ as unsupported feature for device ‘TV’” – this is true. On this old TV the port is always called “HDMI2” it cannot be custom named. But it is NOT a problem at all when using LibreELEC (same TV, same HDMI port, same HDMI cable) it always work.
I checked, in LibreELEC the libCEC version is 4.0.4
While in CE we have libCEC 6.0.2 …

I also see in the log file that KODI is looking for an audio device (“Audio (5): device status changed into ‘not present’”) however, I don’t use an AMP. I just want 2.0 channel audio signal sent to the TV via the HDMI cable and use the TV’s built-in speakers for sound. That’s what I prefer. I don’t own an AMP. So I suggest that there should be a setting somewhere in KODI where one can specify NOT to scan for an AMP via CEC. I would use that option for sure as I want to use the TV’s built in speakers, that works.

So the main problem is that the Panasonic TV’s remote cannot control KODI most of the time. This is a real deal breaker for me because on the TV’s remote I have a button for the context menu while on the MINIX remote controller I don’t have that button. :frowning: I really need that button. I also got used to be using the TV’s remote to control KODI while I was using LibreELEC with the Raspberry Pi 3 for years – it just always worked! So it would be great if CEC functionality could be fixed it CoreELEC!

Please let me know how I can help fixing this. I can try nightly builds and I can record more debug logs. I can even try to edit the program code of libCEC and/or KODI as I am a programmer myself – but I have no idea how to compile the code… Maybe someone can give me instructions on how to do that.

Again, I am looking for help. I would really need my Panasonic TV’s remote to work via CEC. Can anyone help?

Thanks,

Zoltan

I can’t help with the CEC issues, but here is the how to compile guide.
https://wiki.coreelec.org/coreelec:build_ce

The old libCEC version is known to work better with Panasonic. But there is currently no way to choose the libCEC version anymore.

libCEC pings the AMP (5) to check if is available. It’s normal behavior and not adjustable. When you use 4.0.4 you will see a lot of pings to node 5, as this was fixed in newer versions.

The log is not helpful when stripped. at least the libCEC component was activated…

Also it looks like there are other devices connected to TV with CEC, try without them.
Also I recommend to try any other G12B device as it uses another CEC hardware in the SoC (CECA instead CECB for G12A):

Thank you very much for the reply! I would like to try the old 4.0.x libCEC version with the latest version of CE. You said: " there is currently no way to choose the libCEC version anymore." Do you think this option could be added back?
I checked diffs on the github site, I believe this is the relevant commit:

Do you think if I revert just this one commit locally and then re-compile it, it would work?
BTW, thanks for the comiple guide @wizardknight !
One thing I am concerned about is this:
The old libcec library was called: /var/lib/libcec.so.4
while the new one is called: /var/lib/libcec.so.6
How will KODI know which file to load? the one which ends with .4 or the one which ends with .6 ??
I understand that symlinks can be (and should) be created.
Could you please help me out with this information?
I will try to build CE tonight using the 4.0.5 version of libCEC and give it a shot.
Thanks,
Zoltan

@Portisch Regarding your suggestion of trying g12b instead of g12a, do you mean that I should try to copy e.g. g12b_s922x_minix_u22xj.dtb to /dtb.img instead of copying g12a_s905x2_2g_1gbit.dtb ?
Could you please confirm?
Thanks,
Zoltan

@wizardknight Thanks for the compile guide, I managed to compile under Ubuntu Linux (20.04 LTS), but as a result I got an x86_64 build… :frowning: How do I cross compile the 19.x version (not the legacy 9.2.x one!) to Amlogic-ng ??
I probably need to specify a PROJECT, but which one?
Thanks,
Zoltan

I have no idea. I just knew there was a guide, and you asked for one.

No, you need to check with different hardwar, not g12b dtb.
Also ensure all other HDMI devices are disconnected and then test again if CEC does working.
Also disconnect all AVR if connected.

When build happen for x86 than you are on the wrong CoreELEC branch. Correct one is coreelec-19