MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.88k stars 497 forks source link

HDMI-CEC not working on Odroid N2+ #6712

Open Ofboir opened 1 year ago

Ofboir commented 1 year ago

I would like to be able to control Kodi with my TV remote, but it doesn't work.

Required Information

Software

Additional Information (if applicable)

MichaIng commented 1 year ago

We use Armbian's mainline kernel builds, so those cannot be compared to the ancient vendor kernel builds of Hardkernel, and it is expected that not all hardware features are supported (OOTB), especially the rarely used ones. I checked at the Armbian forum and could not find anyone asking for CEC support.

Actually it seems like the kernel driver itself needs to support it. In the kernel docs I see only older Odroid/meson chips being supported: https://www.kernel.org/doc/html/latest/admin-guide/media/cec.html

But it could be also a different issue: https://github.com/home-assistant/operating-system/pull/1717/files

Is the CEC module available, does it load, and in case does it throw errors?

modinfo cec
modprobe cec
dmesg -l 0,1,2,3

EDIT: Just checked myself: It is builtin, as is the meson DRM driver. Possibly we are bugged from the same issue HA OS was, and need to compile those as modules instead builtin, for whatever reason.

Ofboir commented 1 year ago

Hi

Thank you for your answer. I am not familiar at all with the modules mecanisms, so I just pasted blindly the commands you suggested :

modinfo cec

name: cec filename: (builtin) license: GPL file: drivers/media/cec/core/cec description: Device node registration for cec drivers author: Hans Verkuil hans.verkuil@cisco.com parm: debug:debug level (0-2) (int) parm: debug_phys_addr:add CEC_CAP_PHYS_ADDR if set (bool)

modprobe cec Nothing on the console

dmesg -l 0,1,2,3

[ 1.923562] genirq: Setting trigger mode 3 for irq 23 failed (meson_gpio_irq_set_type+0x0/0x60) [ 4.040467] panfrost ffe40000.gpu: error -ENODEV: _opp_set_regulators: no regulator (mali) found

coder-ant commented 9 months ago

Same issue here on RPI 2, DietPi v9.0.2

cec-client -l libCEC version: 6.0.2, compiled on Linux ... , features: P8_USB, DRM, P8_detect, randr, Exynos, Linux, AOCEC Found devices: NONE

MichaIng commented 9 months ago

Try with KMS and cec-ctl:

G_CONFIG_INJECT 'dtoverlay=vc4-' 'dtoverlay=vc4-kms-v3d' /boot/config.txt
apt install v4l-utils
reboot

See here: https://forums.raspberrypi.com/viewtopic.php?t=348779 Probably cec-client works as well with KMS.

coder-ant commented 9 months ago

Thanks. cec-ctl works fine for me under kms (though kms broke one other command I was using under fkms - vcgencmd display_power, that is a different topic).