← 返回命令列表

Linux command

cec-ctl 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

cec-ctl --list-devices

Monitor

sudo cec-ctl -m

Example

cec-ctl -S

说明

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.

参数

--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

FAQ

What is the cec-ctl command used for?

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.

How do I run a basic cec-ctl example?

Run `cec-ctl --list-devices` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --list-devices do in cec-ctl?

List available CEC devices