Optimize the Screen Configuration File

The graphics.conf file is a Screen configuration file that you can optimize to help reduce the time it takes for the Screen service to start.

A default version of the graphics.conf is provided in the BSP kit for your hardware platform.


Figure 1. Optimize the graphics.conf file.
The graphics.conf file can be found at these locations:
Here's how you can modify the graphics.conf file to optimize the startup time for Screen:

Configure display options

Screen is designed to be flexible and fault-tolerant. For this reason, by default, Screen scans the hardware to determine the best settings for the display, which requires extra time. When possible, configure the pixel format in the graphics.conf file to skip the scanning process and save time–provided you know the correct settings on the display or monitor.

To configure the pixel format, modify the following option in the display section of the graphics.conf file:

formats
All the pixel formats that will be returned as supported to applications. If this display option isn't specified, Screen must take the time to determine which pixel formats are supported by your display hardware. You can save time if you can avoid this discovery stage.

For more information about the display parameters, see the “Configure display subsection” in the Configuring Screen chapter of the Screen Developer's Guide.

Optimize the contents of the graphics.conf file

As part of the Screen initialization process, everything in the graphics.conf file is read and parsed. These are some recommended approaches to help you reduce the size of the graphics.conf :
  • Put files that the graphics.conf refers to in the primary IFS if they are required to show content on the display. Your graphics.conf can still refer to files that aren't in the primary IFS, but loaded in the secondary IFS or filesystem. This is also an important consideration to help you to reduce the size of the primary IFS.
  • Remove all comments and unnecessary options from the graphics.conf file to make it as small (or short) as possible. This helps to improve the startup time for the Screen service because there isn't as much to process.

Optimize the contents of the graphics.conf file when your system doesn't support or use displays

Your configuration file can be optimized to exclude sections that don't apply to your system and to the applications running on your system. There are sections of the graphics.conf file that are related to display drivers, libraries, and physical displays. If your system doesn't support displays, or if there aren't any applications that use displays on your system, then you should exclude the following sections from your graphics.conf:

the wfd device subsection

For more information about the wfd subsection that's under the of the khronos section of graphics.conf, see the “Configure wfd device subsection” in the Configuring Screen chapter of the Screen Developer's Guide.

the display subsection

For more information about the display subsection that's under the of the winmgr section of graphics.conf, see the “Configure display subsection” in the Configuring Screen chapter of the Screen Developer's Guide.

the class subsection

For more information about the display subsection that's under the of the winmgr section of graphics.conf, see the “Configure class subsection” in the Configuring Screen chapter of the Screen Developer's Guide.

The default-display parameter that's specified in the globals section, of graphics.conf isn't valid if your system doesn't support displays.

Optimize the contents of the graphics.conf file when your system doesn't have or use a GPU

Your configuration file can be optimized to exclude sections that don't apply to your system, and to the applications running on your system. There's a section of the graphics.conf file that's related to GPU drivers and libraries. If your system doesn't have a GPU, or if there aren't any applications that use the graphics drivers on your system, then you should exclude the following from your graphics.conf:

For systems that use Screen, but don't have a GPU, you should exclude the following from your graphics.conf:

the egl display subsection of the khronos section

For more information about the egl display subsection that's under the of the khronos section of graphics.conf, see the “Configure egl display subsection” in the Configuring Screen chapter of the Screen Developer's Guide.