Resolution and Scale

You can configure the screen resolution and scale of Weston in the output section of weston.ini.

The following code block provides an example.
# /etc/xdg/weston/weston.ini
[output]
name=LVDS-1
mode=1280x800
# should be an effective resolution supported by the screen
scale=2
# value must be an integer, support application-level scaling

If you want to scale to a specific resolution (without changing the physical resolution), you can configure through WESTON_DRM_VIRTUAL_SIZE environment variable.

The following code block provides an example.
# /root/run_weston.sh
export WESTON_DRM_VIRTUAL_SIZE=1024x768

If you want to configure the resolution and scaling dynamically, you can use the dynamic configuration file.

The following code block provides an example of changing the resolution of HDMI-A-1 to 800 × 600.
echo "output:HDMI-A-1:mode=800x600" > /tmp/.weston_drm.conf
The following code block provides an example of setting eDP-1 display to the position of (10, 20), and scaling the display to 400 × 600.
echo "output:eDP-1:rect=<10,20,410,620>" > /tmp/.weston_drm.conf

When the VOP hardware doesn't support scaling, these kinds of scale requires RGA 2D acceleration from StarFive.