LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-26-2024, 08:57 PM   #1
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Rep: Reputation: 253Reputation: 253Reputation: 253
Question How do I enable CEC on RPi4b?


This may be not entirely Slackware on Aarch64 related, but people here might know.

I want to play with controlling the computer with a TV remote, and it is supposed to be done with the CEC protocol.

It is known that RPi supports CEC, but how do I enable it?

https://www.linuxuprising.com/2019/0...connected.html

Code:
echo 'scan' | cec-client -s -d 1
autodetect FAILED
Code:
cec-ctl -l
Failed to open /dev/cec0: No such file or directory
but,

Code:
raspinfo | grep cec
hdmi_force_cec_address:0=65535
hdmi_force_cec_address:1=65535
So it does know that such a thing as cec exists.

Last edited by Lockywolf; 03-28-2024 at 12:11 AM. Reason: mark solved
 
Old 03-27-2024, 01:28 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,852

Rep: Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310
no, rpi itself does not support it, you need to install some software. For example if you use kodi it will automatically detect it and use it, so you will be able to use kodi with your tv remote (without any additional configuration). What do you want to control with your remote?
 
1 members found this post helpful.
Old 03-28-2024, 12:01 AM   #3
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Original Poster
Rep: Reputation: 253Reputation: 253Reputation: 253
I figured it out.

CEC does not work with dtoverlay dtoverlay=vc4-fkms-v3d-pi4,cma=512, but it does work with dtoverlay=vc4-kms-v3d-pi4,cma=512.

I need to try and see how other features work on it.
 
Old 04-08-2024, 06:40 AM   #4
Johpin
Member
 
Registered: May 2020
Posts: 44

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
For example if you use kodi it will automatically detect it and use it, so you will be able to use kodi with your tv remote (without any additional configuration).
How did you do this? I compiled Kodi, but it does not show CEC adapter
despite of it has been compiled in, see my post https://www.linuxquestions.org/quest...er-4175735804/
.

Quote:
Originally Posted by Lockywolf View Post
I figured it out.

CEC does not work with dtoverlay dtoverlay=vc4-fkms-v3d-pi4,cma=512, but it does work with dtoverlay=vc4-kms-v3d-pi4,cma=512.

I need to try and see how other features work on it.
One year ago I posted https://www.linuxquestions.org/quest...6/#post6419247
In this post I described turning your television on and off using cec-ctl. For me cec-ctl -m still doesn't give output when pressing buttons on my remote control of my television.
 
Old 04-08-2024, 08:43 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,852

Rep: Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310
Quote:
Originally Posted by Johpin View Post
How did you do this?
Code:
pan@pi4:~ $ cec-ctl -l
Driver Info:
        Driver Name                : vc4_hdmi
        Adapter Name               : vc4-hdmi-0
        Capabilities               : 0x0000011e
                Logical Addresses
                Transmit
                Passthrough
                Remote Control Support
                Connector Info
        Driver version             : 6.6.20
        Available Logical Addresses: 1
        DRM Connector Info         : card 1, connector 32
        Physical Address           : 3.0.0.0
        Logical Address Mask       : 0x0000
        CEC Version                : 2.0
        OSD Name                   : ''
        Logical Addresses          : 0
but you need to see the device without kodi too
Code:
pan@pi4:~ $ ls -l /dev/cec*
crw-rw---- 1 root video 240, 0 Apr  5 17:59 /dev/cec0
crw-rw---- 1 root video 240, 1 Apr  5 17:59 /dev/cec1
it is detected automatically, I do not do anything. When I start kodi the smart tv will automatically connect to it.
and also you can use it with other software, like cec-client too (that was mentioned in your post too).

Or try libreelec (if that works at all) https://forums.raspberrypi.com/viewtopic.php?t=364971
 
Old 04-08-2024, 10:58 AM   #6
Johpin
Member
 
Registered: May 2020
Posts: 44

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
[code]pan@pi4:~ $ cec-ctl -l
but you need to see the device without kodi too

cec-client too (that was mentioned in your post too).

Or try libreelec
In my post https://www.linuxquestions.org/quest...6/#post6419247

1. I mentioned seeing the devices, so that's fine.

2. you cannot find the word "cec-client" in this thread, only cec-ctl: cec-client has been deprecated. In this post I have given an example to switch the television on and off.

Libreelec works out of the box and Kodi with CEC on Raspberry Pi OS Bullseye and Bookworm too. My problem is on the Slackware arm platform.

Quote:
Originally Posted by pan64 View Post
For example if you use kodi it will automatically detect it and use it
Settings -> system -> input -> peripherals does not show a CEC adapter in my case. How did you build Kodi with CEC support on Slackware arm?
 
  


Reply



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 06:59 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