HDMI-CEC display control support
HDMI-CEC offers TV control features equivalently as DPMS and DDC/CI offer computer display control. In majority of DEs TVs currently cannot be used in the same manner as computer monitors, for example they have to be turned on and off manually or by sending IR commands with appropriate hardware and scripts. DPMS at best allows for only switching the panel state in TVs.
It turns out that not much is needed for TV-as-monitor setup to work in Xfce. CEC drivers are mainlined and the cec-ctl
utility is readily-available in v4l-utils
. All that is needed in a working PoC setup is a single background-running script that sets up CEC interface with cec-ctl --playback --no-rc-passthrough
at start and then monitors appropriate xfce4-power-manager
signals while sending CEC on/off commands as appropriate, namely cec-ctl -t0 --image-view-on
and cec-ctl -t0 --standby
.
Hardware-wise USB-CEC interfaces are available for setups with no native option. CEC is natively supported in many ARM SBCs, some Android and ChromeOS devices, UDOO x86 boards and also through a DisplayPort v1.3+ with a compatible DP-to-HDMI adapter. Most notably HDMI-CEC through HDMI is extremely rare in PC GPUs, so DP 1.3+ tunneling with amdgpu
/i915
/nouveau
drivers and buying a working adapter is probably the least expensive option.