Multiple Screens

The Buildroot SDK Weston supports multi-screen with the same or different display and hot-plug functions.

You can differentiate screens based on the name of DRM (obtained through Weston start-up log or /sys/class/drm/card0-<name>).

You can configure the settings in environment variables.

The following list provides examples for different scenarios.
  • Specify HDMI-A-1 as the main display:
    export WESTON_DRM_PRIMARY=HDMI-A-1
  • In mirror mode (multi-screen with the same display), if you skip this environment variable, the system will show different displays:
    export WESTON_DRM_MIRROR=1 
  • In mirror mode, scaling maintains the aspect ratio. If you skip this environment variable, the system will show forced full-screen:
    export WESTON_DRM_KEEP_RATIO=1
  • Turn off the built-in monitor automatically when an external monitor is connected:
    export WESTON_DRM_PREFER_EXTERNAL=1
  • When an external monitor is connected, keep the first external monitor as the main display by default:
    export WESTON_DRM_PREFER_EXTERNAL_DUAL=1

When the VOP hardware doesn't support scaling, it would try to use StarFive RGA 2D acceleration.

It also supports disabling the specified screen individually in the output section of weston.ini.

The following code block provides an example.
# /etc/xdg/weston/weston.ini
[output]
name=LVDS-1

mode=off
# off|current|preferred|<WIDTHxHEIGHT@RATE>