CEC in Debian does not work what did we miss?

We have installed Rock Pi 4 with Debian Desktop from the download page https://wiki.radxa.com/Rockpi4/downloads . The image was played with Rufus 3.4 on a 32GB SD card.

  • Version on installation: Debian Stretch 9.9

  • Kernel on installation: 4.4.154-90-rockchip-ga14f6502e045

  • Basic updates have been carried out

sudo apt-get update

sudo apt-get upgrade

sudo apt-get dist-upgrade

  • Kernel is dist-upgraded to version 4.4.154-91-rockchip-g70838c09a6b6 after dist-upgrade

  • According to kernel list there is no more current kernel

Kernel List: sudo apt-cache search linux-image

  • CEC client and dependencies were installed with sudo apt-get install cec-utils

libCEC Version: 4.0.2

  • CEC was tested on the same CEC-enabled monitor as libreELEC with the commands:

(The Rock Pi 4 was first tested with libreELEC for CEC functionality. Under libreELEC (Leia) 9.0.0 the TV is detected and can be switched off for example).

  • sudo cec-client -l

Output:

libCEC version: 4.0.2, compiled on Linux-4.4.0-142-generic … features: P8_USB, DRM, P8_detect, randr

Found devices: NONE

  • echo ‘scan’ | cec-client -s -d 1

Output:

Autodetect: Failed

  • The troubleshooting brings us to the following forum post: Send HDMI CEC messages using cec-client The problem should be solved since April with kernel integration.

  • Apparently the most recent kernel is 4.4.154-91-rockchip-g70838c09a6b6 and the CEC is still not working.

Here are the LibreELEC CEC changes

Maybe it can help if added to the 4.4 Radxa Linux kernel too?

1 Like

This is related to my problem: Mainline-Kernel not booting

@mo123 could help! can I somehow bring a kernel to my debian with these changes already integrated? Or can somebody make a ready debian image to install on my Rock Pi 4B?

The hardware support in Debian is great, with graphics card recognition in chromium, etc, however, I badly need to get the CEC working too!

Thanks for any pointers or ideas how to bring this forward!

Do you use mainline kernel not the 4.4 kernel?
If so then these are the LibreELEC CEC mainline kernel changes.

You can basically fork it to your Github account and in the Debian build files change the kernel source to use yours instead. Or you can save all the individual kernel commits as patches and then include it in your Debian build. Or you can make all the kernel changes on your PC and then upload everything to a kernel folder on your Github.

I have only built LibreELEC and Armbian before so not sure how to build Debian or if it works the same way. Maybe if I have more time, I’ll try to check how it works.

Have you tried another Linux OS with a mainline kernel like Manjaro and checked if CEC works there?
Maybe it will be a good idea to check other OS’s first and find one where it works then you can look at it’s kernel source for any HDMI CEC changes that might help.

The Libreelec cec works.

Yes, I was trying to build a mainline kernel, after reading that cec should be supported there from 5.1. I dont exactly care if in the end it will be 4.4 or 5.1 or whatever, as long as cec works. Is it written somewhere how to build your own debian image, so i can do the above fork and change kernel that you write?

For Debian with 4.4 kernel, you can refer:

https://wiki.radxa.com/Rockpi4/dev/Debian

We will cherry-pick the two CEC patches to our 4.4 kernel. Thanks @mo123 .

For mainline kernel, I suggest you use the debos or build Armbian for ROCK Pi 4.

debos: https://www.collabora.com/news-and-blog/blog/2019/08/06/rockpi-panfrost-wayland/

Hey @jack
when could we expect an updated build with the two cherry-picks already inside? :slight_smile:
Thanks!
Lucas

It might be all last 5 commits here

The forum formats it to show a single commit in blue text too.
You must click on the link next to the Github icon at the top, not the middle blue text to see the whole repo with all commits.
So you need to use this repo and replace the spaces with /
github.com kwiboo linux-rockchip commits rockchip-4.4-2019-cec

Hello, I happen to have almost the same problem!
My current kernel is 4.4.154-92-rockchip-g58d4b8d2fd3b on Debian 9.11 stretch.
Everything is working great so far but i can’t seem to get the HDMI-CEC to work.

According to this post a fix was already implemented into the kernel back in April.
Which kernel version actually supports HDMI-CEC?
I can’t seem to find any more recent ones than 4.4.154-92. Is it the most recent one or do i have to upgrade in a specific way other than normal dist-upgrades?
I’m also interested in Ubuntu, is there perhaps a Ubuntu version where HDMI-CEC is available?

Best regards!
Otte

Hi,

To support CEC better, we have a newer version of kernel (4.4.179),
whose related packages are located at https://dl.radxa.com/users/dev/.

This version of kernel is testing, and we will add more features in the future.

Thanks!

1 Like

Hi Stephen,
thank you for the quick response. I’ve installed the new kernel using the packages provided but to no avail regarding CEC. As mentioned I have almost the same problem so my cec-client also doesn’t find any devices whatsoever.
Output for the scan being “autodetect FAILED” instead of actually trying to find devices.

My current Kernel is now 4.4.179-6-rockchip-g246d1b34 and I’ve re-installed the cec-client just to be sure.

Any further help with this would be appreciated! :slightly_smiling_face:

Hello, when will there be a solution to the CEC problem? Does anyone have a solution that works? It should have been solved since the April Kernel. Is there a Debian version with CEC to download?

Thank you for your support.