LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 03-21-2023, 05:10 AM   #1
Johpin
Member
 
Registered: May 2020
Posts: 48

Rep: Reputation: Disabled
CEC support on RPi4 fails


To switch on and off a TV for example you could use cec.

cec-ctl fails to open /dev/cec0, because there isn't one.

I am using the 6.1.16-v7l-sarpi4 kernel.

locate cec.ko returns
/lib/modules/6.1.16-v7l-sarpi4/kernel/drivers/media/cec/core/cec.ko.xz

modprobe cec doesn't help

Under Raspberry Pi OS Bullseye you can find /dev/cec0

Is it a kernel problem? Should I replace Sarpi's kernel by the one from Bullseye?

Last edited by Johpin; 03-21-2023 at 02:11 PM. Reason: adjust title
 
Old 03-21-2023, 07:38 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,006

Rep: Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891
would be nice to post exactly what did you try and what's happened. "doesn't help" is not really helpful.
for me kodi on RPi Bullseye works perfectly (including CEC), but with an older kernel.
It also depends on the TV, sometimes it connects its CEC interface to another device (like STB).
 
Old 03-21-2023, 07:48 AM   #3
Johpin
Member
 
Registered: May 2020
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
would be nice to post exactly what did you try and what's happened. "doesn't help" is not really helpful.
for me kodi on RPi Bullseye works perfectly (including CEC), but with an older kernel.
It also depends on the TV, sometimes it connects its CEC interface to another device (like STB).
"doesn't help" -> it loaded the cec module but still no /dev/cec0

For RPi Bullseye I compiled kernel 6.1 and Kodi runs perfectly with CEC on the same television.
 
Old 03-21-2023, 11:33 AM   #4
Johpin
Member
 
Registered: May 2020
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Johpin View Post
Is it a kernel problem? Should I replace Sarpi's kernel to the one from Bullseye?
I used rpi-update to update the kernel to version 6.1.19-v7l+

Still no /dev/cec0
 
Old 03-21-2023, 11:36 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,006

Rep: Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891Reputation: 7891
you need to check the logs if there was any related message somewhere.
 
Old 03-21-2023, 11:49 AM   #6
Johpin
Member
 
Registered: May 2020
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
you need to check the logs if there was any related message somewhere.
I checked dmesg for the words "cec" and "CEC". No hit.
 
Old 03-21-2023, 02:10 PM   #7
Johpin
Member
 
Registered: May 2020
Posts: 48

Original Poster
Rep: Reputation: Disabled
On https://forums.raspberrypi.com/viewtopic.php?t=327247#p1974181 I found to use dtoverlay=vc4-kms-v3d in config.txt instead of dtoverlay=vc4-fkms-v3d

After adjusting config.txt and a reboot:
ls /dev/cec*
/dev/cec0 /dev/cec1

cec-ctl -d/dev/cec1 --test-power-cycle | head -n 2 gives
Adapter is unconfigured, please configure it first.
cec-ctl 1.22.1

How to configure?

According to man page of cec-ctl:
cec-ctl -d/dev/cec1 --tv -S

TV will be switched on and off in a cycle by
cec-ctl -d/dev/cec1 --test-power-cycle

Remark: Unfortunately cec-ctl -d/dev/cec1 -m does not monitor any key presses from the remote control of the television

Last edited by Johpin; 03-21-2023 at 03:09 PM.
 
Old 03-22-2023, 04:29 AM   #8
Minime_2003
Member
 
Registered: Aug 2021
Location: Sweden
Distribution: Slackware
Posts: 123

Rep: Reputation: 40
Tried rasberry pi´s kernel 6.1.19 and had issues when trying to compile large packages like llvm and chromium-ungoogled.
That kernel does not seam to read changes done in config.txt.

So i reverted kernel to 5.15.88

Last edited by Minime_2003; 03-22-2023 at 04:35 AM.
 
Old 03-22-2023, 12:20 PM   #9
Johpin
Member
 
Registered: May 2020
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Minime_2003 View Post
Tried rasberry pi´s kernel 6.1.19 and had issues when trying to compile large packages like llvm and chromium-ungoogled.
I could not compile Kodi and Libreoffice due to a kernel panic with deadlocked memory. I appreciate you are sharing you also had problems with the latest kernel.

Quote:
Originally Posted by Minime_2003 View Post
That kernel does not seam to read changes done in config.txt.
So i reverted kernel to 5.15.88
It does read config.txt -> I replaced Sarpi's 6.1.16 kernel by using rpi-update, because I thought it was the reason I could not find /dev/cecX.

I also will replace it by a 5.15 kernel.

Last edited by Johpin; 03-22-2023 at 02:16 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
user permission to launch a program? (cec-client, raspbian and openHAB) Alphonse Linux - Newbie 6 01-13-2020 06:05 AM
LXer: Raspberry Pi: Power On / Off A TV Connected Via HDMI-CEC LXer Syndicated Linux News 0 07-02-2019 11:38 PM
LXer: HDMI CEC Fuzzing LXer Syndicated Linux News 0 08-09-2015 06:03 PM
LXer: Linux Support For HDMI CEC Still In Development LXer Syndicated Linux News 0 10-09-2012 04:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 11:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration