LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

cec-ctl

kernel CEC device control tool

TLDR

List the CEC adapters the kernel knows about
$ cec-ctl --list-devices
copy
Show the topology of the HDMI bus
$ cec-ctl --show-topology
copy
Register this machine as a playback device under a chosen name
$ sudo cec-ctl --playback --osd-name [MyPC]
copy
Set the physical address by hand
$ sudo cec-ctl --phys-addr [1.0.0.0]
copy
Wake the TV and have it switch to this input
$ cec-ctl --to 0 --image-view-on
copy
Announce this device as the active source
$ cec-ctl --active-source phys-addr=[1.0.0.0]
copy
Put the TV into standby
$ cec-ctl --to 0 --standby
copy
Ask the TV for its power state
$ cec-ctl --to 0 --give-device-power-status
copy
Watch the traffic addressed to this adapter
$ sudo cec-ctl --monitor
copy
Watch every message on the bus, addressed to us or not
$ sudo cec-ctl --monitor-all
copy
Work with a specific adapter
$ cec-ctl -d [/dev/cec1] --show-topology
copy
Clear the adapter's configuration
$ sudo cec-ctl --clear
copy

SYNOPSIS

cec-ctl [options]

DESCRIPTION

cec-ctl controls kernel CEC (Consumer Electronics Control) devices through the Linux kernel's native CEC framework. It provides low-level access to the CEC subsystem for monitoring traffic, configuring adapters, and sending commands directly via the kernel driver.Unlike cec-client which relies on the userspace libCEC library and requires a USB CEC adapter, cec-ctl works with CEC hardware integrated into graphics cards and SoCs that expose `/dev/cecN` device nodes. This makes it the preferred tool on platforms with built-in CEC support, such as many ARM-based media players and modern Intel GPUs.The monitor mode (`-m`) is particularly useful for debugging CEC communication issues, as it displays all CEC traffic on the bus in real time.

PARAMETERS

--list-devices

List available CEC devices
-m, --monitor
Monitor CEC traffic on the bus
-S, --show-topology
Display the CEC device topology
-d device
Use specific CEC device
-p addr
Set physical address
-o addr
Set logical address

INSTALL

sudo apt install v4l-utils
copy
sudo dnf install v4l-utils
copy
sudo pacman -S v4l-utils
copy
sudo apk add v4l-utils
copy
sudo zypper install v4l-utils
copy
nix profile install nixpkgs#v4l-utils
copy

CAVEATS

Requires kernel CEC support (CONFIG_CEC). Monitor mode requires root privileges. Not all HDMI ports support CEC.

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid