# PS5 HDMI libcec commands

> Source: <https://gist.github.com/Gezine/a0a6e4748df084b8092b256e34539019>
> Published: 2025-09-20 11:36:35+00:00

PS5_CEC_example.sh

      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      
Learn more about bidirectional Unicode characters

 
    Show hidden characters

# Note

# I am using Raspberry pi 4 to send CEC commands

# /dev/cec1 is pi's second HDMI port

# '4' is PS5 address that TV assigned, change if you need

# Turn on PS5 (You need to enable "Power off Link" at PS5 HDMI settings to turn on from rest mode)

cec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=power-on-function

# Turn on PS5 from rest mode (When you didn't enable "Power off Link" at PS5 HDMI settings)

cec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=power-toggle-function

# Put in rest mode (You need to enable "Power off Link" at PS5 HDMI settings)

cec-ctl -d /dev/cec1 --to 4 --standby

# Query PS5 power status

cec-ctl -d /dev/cec1 --to 4 --give-device-power-status

# Returns: on (0x00) or standby (0x01)

# X button (confirm/select)

cec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=select

# O button (back/cancel)

cec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=back

# D-Pad Navigation

cec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=up

cec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=down

cec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=left

cec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=right

# PS button

cec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=device-root-menu
