Configure display subsection

The display subsection specifies the configuration to apply to the physical displays that are supported by the platform.

This section must begin with begin display display_id and end with end display. Include this section in your configuration file only if your system supports displays. or if there are applications on your system that require them.

There can be multiple display sections within a configuration file. The number of display sections depends on the number of physical displays supported by the platform.

You use the display_id to associate each display section with a physical display. The display_id can be a number identifying the display, or it can be the connection type of the display.

If the display_id is an integer, Screen applies the configuration parameters to the display whose ID is that specified by display_id. Otherwise, if the display_id is a string that matches one of the valid display connection types, then Screen applies the configuration parameters to the first available display whose connection type matches that specified by the display_id.

Below is an example of a display subsection of a graphics.conf file. In this example, the display_id is a connection type of hdmi; therefore, the configuration parameters are applied to the first available display that supports hdmi:

begin display hdmi
   formats = rgba8888 rgbx8888 nv12
   video-mode = 1280 x 720 @ 60
end display
   

Parameters

The following are valid parameters that can be configured under the display subsection:

Parameter Description Type Possible values (if applicable)
background The background color of the display. Use RGB color code (hexadecimal value) to identify the color (e.g., blue = 0xff). Unsigned long integer (hex) 0x00 (default: black)
cbabc Content-based automatic brightness control; specifies the content type of the display String
none
The display content that's not video, UI, or photo.
video
The display content is for a video.
ui
The display content is a user interface.
photo
The display content is static image.
cursor The visibility of the cursor on the display String
auto (default)
The cursor remains visible on the display until there are 10 seconds of cursor inactivity. After that, the cursor is made invisible on the display.
on
The cursor always remains visible on the display, regardless of cursor inactivity.
off
The cursor always remains invisible on the display, regardless of cursor activity.
cursor-type

The configuration required to use a cursor shape. This parameter is specified in the following format: cursor-type; filename; hotspot_x,hotspot_y

The parameters for cursor-type are defined as follows:

cursor-type
The type of cursor shape that you're defining. The following are valid cursor shapes:
  • arrow
  • keyboard
  • home
  • menu
  • hand
  • ibeam
  • wait
  • zoom-in
  • zoom-out
  • grab
  • grabbing
  • cross
  • move
filename
A filename containing the cursor image. Only bitmap images are currently supported. The file is expected to be located in the directory /usr/share/icons. Cursor shapes must have a color depth of 32 bits per pixel. The WFD driver is required to do format conversion if 32 bits per pixel can't be used for cursors.
hotspot_x, hotspot_y
The x and y offsets, respectively, into the image that should align with the cursor position. The actual cursor rectangle corresponds to the cursor position with the hotspot offset applied as a reverse translation. This means clipping may be done on all sides of the image (top, left, right, bottom).
String Depends on the cursor type.
defer-framebuffer-creation Specify whether Screen creates a framebuffer on startup or only when a framebuffer is required (e.g. for composition). Set to false if you want Screen to create a framebuffer always on startup. String

true (default)

false

formats

The pixel format(s) supported by the display. You can configure this parameter with multiple values.

Specifying the format reduces startup time because Screen doesn't need to discover which formats are supported.

String

byte

rgba4444

rgbx4444

rgba5551

rgbx5111

rgb565

rgb888

rgba8888

rgbx8888

yvu9

yuv420

nv12

yv12

uyvy

yuy2

v422

ayuv

gamma The gamma value of the WFD driver. The range for this gamma value is specific to the driver. Unsigned long integer 0 to 255
idle-timeout The number of seconds after which the display enters an idle state. String or unsigned long integer

off

0 to 4,294,967,295

mirroring The mirror type. String
disabled
Mirroring is disabled.
normal
Mirroring is enabled, and the aspect ratio of the image is 1:1.
stretch
Mirroring is enabled, and the image should fill the display while not preserving the aspect ratio.
zoom
Mirroring is enabled, and the image should fill the display while preserving the aspect ratio. Image content may be clipped.
fill
Mirroring is enabled, and the image should fill the display while preserving the aspect ratio. Image may be shown with black bars where applicable.
priority The priority of the update thread (i.e., the thread that renders the framebuffer or framebuffers). Integer 0 to 4,294,967,295

15 (default)

protection-enable Content protection for the window(s) on the display. Typically, you set this parameter only if the application is interested in HDCP (High-Bandwidth Digital Content Protection). String

true

false

rotation

The clockwise rotation of a display, in degrees. Display rotation is absolute.

If you specify rotation, then you must also set defer-framebuffer-creation to false. Otherwise, Screen can't rotate the display.

Long integer

0

90

180

270

rotation-mode Your preference of display rotation mode. If the mode of rotation that's specified isn't supported by your display controller, then Screen defaults to none. String
blits
Rotated blits with pipeline rotation where possible
generic
Generic modes can resize
none (default)
No rotation is supported
port
Port rotation, framebuffer resizes
pipeline
Pipeline rotation, framebuffer resizes
splash The indicator to post the framebuffer on startup. This parameter is considered only if the WFD driver supports it. Integer
0(default)
Post the framebuffer immediately (blank screen).
1
Post the framebuffer after the application requests a post.
stack-size The stack size (in units of bytes) that Screen is to use for its threads. This stack-size must be configured appropriately for blitters/compositors that are using Mesa (e.g., gles2blt). The default stack size is insufficient for these types of blitters/compositors. Integer 0 to 4,294,967,295

Example: 2097152

strict-pipelines The indicator to request that Screen respects your pipeline assignment. You can assign pipelines by using the pipeline parameter in class subsection of your configuration file, or by setting the SCREEN_PROPERTY_PIPELINE property through the Screen API. Integer
0
Screen uses a composition strategy that aims to optimize for the current scene while taking memory bandwidth and available pipelines into consideration.
1
Screen respects pipeline assignments, if any.
touch-adjustments The x and y adjustments to be added to all touch events. This configuration must be in the form: x-adjustment,y-adjustment Unsigned long integer 0 to 4,294,967,295

Example: 10,10

video-mode

The initial resolution and refresh rate for the display port. This configuration must be one that is reported by the WFD driver. If you set this to values that aren't supported, then the resolution and refresh rate defaults to the first mode specified by the driver. The resolution and refresh rate must be in the form of:

widthxheight@irefresh

The i indicates that interlacing is set.

String video-mode = 1280x720@60