tvservice is a command line application used to get and set information about the display, targeted mainly at HDMI video and audio.
tvservice by itself will display a list of available command line options.
Power on the HDMI output with preferred settings.
Powers off the display output.
Important Note: Powering off the output using this command will also destroy any framebuffers/dispmanx layers associated with the display. These are NOT re-established with a subsequent power on, so will result in a blank screen.
A better option is to use the vcgencmd display_power option, as this will retain any framebuffers, so when the power is turned back on the display will be the returned to the previous power on state.
-e, --explicit="Group Mode Drive"
Power on the HDMI with the specified settings
Group can be one of
Mode is one of the modes returned from the
-m, --modes option.
Drive can be one of
Use 59.94Hz (NTSC frequency) rather than 60Hz for HDMI mode.
-c, --sdtvon="Mode Aspect [P]"
Power on the SDTV (composite output) with the specified mode,
NSTC, and the specified aspect,
16:9. The optional
P parameter can be used to specify progressive mode.
where Group is
Shows a list of display modes available in the specified group.
Monitors for any HDMI events, for example unplugging or attaching.
Shows the current settings for the display mode, including mode, resolution, and frequency.
Shows the current settings for the audio mode, including channels, sample rate and sample size.
Save the current EDID to the specified filename. You can then use
edidparser <filename> to display the data in a human readable form.
When used in combination with the
--modes options, displays the mode information in JSON format.
Extracts the display name from the EDID data and shows it.
Lists all attached displays and their display ID.
Specifies the ID of the device to use; see the output of
--list for available IDs.