您可以打开和关闭HDMI本身。
HDMI开启:
/opt/vc/bin/tvservice -p
HDMI关闭:
/opt/vc/bin/tvservice -o
有关tvservice二进制的更多详细信息:
# dpkg -S /opt/vc/bin/tvservice
libraspberrypi-bin: /opt/vc/bin/tvservice
# dpkg -s libraspberrypi-bin
Package: libraspberrypi-bin
Maintainer: Serge Schneider
Description: Miscellaneous Raspberry Pi utilities
This package contains various utilities for interacting with the Raspberry
Pi's VideoCore IV.
Homepage: https://github.com/raspberrypi/firmware
# /opt/vc/bin/tvservice
Usage: tvservice [OPTION]...
-p, --preferred Power on HDMI with preferred settings
-e, --explicit="GROUP MODE DRIVE" Power on HDMI with explicit GROUP (CEA, DMT, CEA_3D_SBS, CEA_3D_TB, CEA_3D_FP, CEA_3D_FS)
MODE (see --modes) and DRIVE (HDMI, DVI)
-t, --ntsc Use NTSC frequency for HDMI mode (e.g. 59.94Hz rather than 60Hz)
-c, --sdtvon="MODE ASPECT [P]" Power on SDTV with MODE (PAL or NTSC) and ASPECT (4:3 14:9 or 16:9) Add P for progressive
-o, --off Power off the display
-m, --modes=GROUP Get supported modes for GROUP (CEA, DMT)
-M, --monitor Monitor HDMI events
-s, --status Get HDMI status
-a, --audio Get supported audio information
-d, --dumpedid Dump EDID information to file
-j, --json Use JSON format for --modes output
-n, --name Print the device ID from EDID
-h, --help Print this information