Configuring graphics

Updated: March 11, 2025

This chapter describes the graphics configuration options to adjust the performance of your QNX cloud target.

You can configure the following graphics components:
Note: Any performance improvements to one area may negatively impact another. Always test the system environment when determining the optimal settings.

QNX Screen graphics configuration files

The cloud and hardware targets both use the same graphics subsystem; hence, the targets share the same binaries such as standard shared objects, utilities, and screen commands.

You can edit the following configuration files:
graphics.conf
By default, the QNX cloud target automatically runs the screen graphics utility from the default path /usr/lib/graphics/software-rendering/graphics.conf.
To specify a different graphics.conf file, run screen -c with the file path; for example:
screen -c /usr/lib/graphics/software-rendering/other_graphics.conf
Then test your configurations on your target with a graphics application; for example:
gles2-gears -display=1
gles2-gears -display=2
For details on editing the configuration file, go to the Configuring Screen chapter in the QNX Screen Graphics Subsystem Developer's Guide of the QNX SDP 7.1 documenation.
SwiftShader.ini
The SwiftShader library looks for the SwiftShader.ini file in the working directory of the process that loads the SwiftShader Vulkan libraries.
CAUTION:
The settings for SwiftShader.ini aren't system global. Each process that uses Swiftshader (e.g., Screen, gles2-gears, QVM) has its own SwiftShader.ini in its working directory. If the process doesn't find SwiftShader.ini, then it uses the default settings of SwiftShader.ini, which uses all available cores and threads for rendering.
In the following SwiftShader.ini example, AffinityMask is a bit-mask of available CPUs to run on, where each position specifies a CPU (e.g., position 0 is cpu0, position 1 is cpu1, and onwards):
[Processor]
## Number of threads used by the scheduler (0 interpreted as "min(max_cpus_available, 16)")
# ThreadCount = 0
ThreadCount=4

## Core affinity used by the scheduler
# AffinityMask=0x1
# AffinityMask=0xFFFFFFFFFFFFFFFF
AffinityMask=0xF000

## "any": threads can use any of the cores available in the affinity mask
# (default)
AffinityPolicy="any"
## "one" : threads can only ever use one of the cores available the affinity mask
# AffinityPolicy="one"

WFD driver (Wfdcfg library)

For QNX cloud targets, the default Wfdcfg library supports the following video modes:
  • 800x480 @ 60 Hz
  • 1024x768 @ 60 Hz
  • 1280x1024 @ 60 Hz
  • 1920x1080 @ 60 Hz
  • 1280x720 @ 60 Hz
  • 1280x800 @ 60 Hz
  • 4K (3840x2160) @ 60 Hz
You configure these video modes in your Wfdcfg source file (wfdcfg.c) within a mode structure; for details, go to the Setting timing parameters chapter in the OpenWF Display Configuration Developer's Guide.

To support other custom modes, you can customize the Wfdcfg library; for details, go to the Building the Wfdcfg library chapter in the OpenWF Display Configuration Developer's Guide.

WebRTC server (webrtc-server-iosock utility)

The webrtc-server-iosock process handles the entire display framebuffer (i.e., read, encode, packetize, and transmit).

Use the following options to adjust the size and resolution of the display framebuffer which affects the performance of webrtc-server-iosock:
--format changes the framebuffer format
Change the format of the QNX Screen display readback framebuffer. For example,
webrtc-server-iosock --format=rgb565
The default RGB565 should be the most efficient.
--scale changes the framebuffer scale
Scale down the actual size of the framebuffer that the network handles by providing a fractional scale argument such as --scale=1/2 or --scale=1/3. For example,
webrtc-server-iosock --scale=1/2
While scaled down, the web client retains the resolution in the Screen configuration file.
For a list of webrtc-server-iosock options, go to the webrtc-server-iosock utility page in this document.