WESTON-DRM(7)
β¨ weston-drm β¨
okay bestie, welcome to the weston-drm page β it lives in section 7 (Miscellaneous Information Manual) and it's literally the whole lore dump on the DRM backend for Weston. grab a snack π
π SYNOPSIS π
weston --backend=drm
π DESCRIPTION π
The DRM backend is the native Weston backend for systems that support the Linux kernel DRM, kernel mode setting (KMS), and evdev input devices. It's the recommended backend for desktop PCs, and it's out here chasing the full Wayland experience with the "every frame is perfect" concept. It also leans on the Mesa GBM interface. π
With the DRM backend, weston runs without any underlying windowing system. The backend uses the Linux KMS API to detect connected monitors. Monitor hot-plugging? Supported, obviously. π¦ Input devices get found automatically by udev(7). Compositing happens mainly in GL ES 2, initialized through EGL, or Vulkan. You can also take advantage of hardware cursors and overlays, when they exist and are functional. Full-screen surfaces will be scanned out directly without compositing, when possible. Hardware accelerated clients are supported via EGL or Vulkan. slay.
The backend chooses the DRM graphics device first based on seat id. If seat identifiers are not set, it looks for the graphics device that was used in boot. If that is not found, it finally chooses the first DRM device returned by udev(7). Combining multiple graphics devices is not supported yet β one day maybe, not today. π
The DRM backend also supports virtual outputs that are transmitted over an RTP session as a series of JPEG images (RTP payload type 26) to a remote client. Virtual outputs are configured in the remote-output section of weston.ini.
π CONFIGURATION π
The DRM backend uses the following entries from weston.ini.
β Section core
gbm-format=format β sets the default pixel format for DRM KMS framebuffers. format can bexrgb8888,xrgb2101010,rgb565or others. Weston recognizes the names of most pixel formats defined by the kernel DRM subsystem in thedrm_fourcc.hheader without theDRM_FORMAT_prefix. The actually supported pixel formats depend on the DRM driver and hardware, and the renderer used. Using Pixman-renderer, DRM-backend supportsxrgb8888,xrgb2101010,rgb565and some of their permutations. The formats supported with GL-renderer or vulkan-renderer depend on the driver implementations. The names are case-insensitive. This setting applies only to outputs in SDR mode β seeeotf-modeinweston.ini(5). If the hardware platform supports hardware planes placed under the DRM primary plane type (underlays), specifyingargb8888would be needed for Weston to display content lifted into such hardware planes. If not specified,xrgb8888is used. See alsogbm-formatin the output section.pageflip-timeout=milliseconds β sets Weston's pageflip timeout in milliseconds. This sets a timer to exit gracefully with a log message and an exit code of 1 in case the DRM driver is non-responsive. Setting it to0disables this feature.offload-blend-to-output=trueβ allow the backend to offload the blend-to-output color transformation (whenever possible) instead of performing this transformation in the renderer. Only the DRM-backend is capable of doing that at the moment. Requires color management enabled. Boolean, defaults tofalse.
CAVEAT: This may result in loss of color precision and may cause color banding. π
πΈ Section output
name=connector β the KMS connector name identifying the output, for instanceLVDS1.mode=mode β specify the video mode for the output. The argument mode can be one of the wordsoffto turn the output off,preferredto use the monitor's preferred video mode, orcurrentto use the current video mode and avoid a mode switch. It can also be a resolution as:
mode=widthxheight
mode=widthxheight@refresh_rate
Specify a mode with a given refresh-rate measured in Hz.
mode=widthxheight@refresh_rate ratio
Here ratio is Picture Aspect-Ratio which can have values as 4:3, 16:9, 64:27, and 256:135. This resolution-format helps to select a CEA mode, if such a video mode is present in the mode-list of the output.
CEA defines the timing of a video mode, which is considered as a standard for HDMI specification and compliance testing. It defines each and every parameter of a video mode, like hactive, vactive, vfront, vback etc., including aspect-ratio information. For CEA modes, the drm layer stores this aspect-ratio information in user-mode (drmModeModeInfo) flag bits 19-22. For the non-CEA modes a value of 0 is stored in the aspect-ratio flag bits.
Each CEA-mode is identified by a unique Video Identification Code (VIC). For example, VIC=4 is 1280x720@60 aspect-ratio 16:9. This mode will be different than a non-CEA mode 1280x720@60 0:0. When the video mode 1280x720@60 0:0 is applied, since its timing doesn't exactly match with the CEA information for VIC=4, it would be treated as a non-CEA mode. Also, while setting the HDMI-AVI-Inforframe, VIC parameter will be given as '0'. If video mode 1280x720@60 16:9 is applied, its CEA timings matches with that of video mode with VIC=4, so the VIC parameter in HDMI-AVI-Infoframe will be set to 4.
Many a times, an output may have both CEA and non-CEA modes, which are similar in all respect, differing only in the aspect-ratio. A user can select a CEA mode by giving the aspect-ratio, along with the other arguments for the mode. By omitting the aspect-ratio, user can specify the non-CEA modes. This helps when certification testing is done, in tests like 7-27, the HDMI-analyzer applies a particular CEA mode, and expects the applied mode to be with exactly same timings, including the aspect-ratio and VIC field.
The resolution can also be a detailed mode line as below.
mode=dotclock hdisp hsyncstart hsyncend htotal vdisp vsyncstart vsyncend
vtotal hflag vflag
Use the given detailed mode line as the video mode for this output. The definition is the same as in xorg.conf(5), and cvt(1) can generate detailed mode lines.
transform=transform β transform for the output, which can be rotated in 90-degree steps and possibly flipped. Possible values arenormal,rotate-90,rotate-180,rotate-270,flipped,flipped-rotate-90,flipped-rotate-180, andflipped-rotate-270.gbm-format=format β set the DRM KMS framebuffer format for this specific output. If not set, the value fromgbm-formatoption in the core section is used for SDR mode outputs andxrgb2101010for other modes. For the possible values for format seegbm-formatoption in core section. For SDR mode, seeeotf-modeinweston.ini(7).pixman-shadow=boolean β if using the Pixman-renderer, use shadow framebuffers. Defaults totrue.clone-of=name β make this output (connector) a clone of another. The argument name is thenamevalue of another output section. The referred to output section must exist. When this key is present in an output section, all other keys have no effect on the configuration.force-on=trueβ force the output to be enabled even if the connector is disconnected. Defaults tofalse. Note thatmode=offwill overrideforce-on=true. When a connector is disconnected, there is no EDID information to provide a list of video modes. Therefore a forced output should also have a detailed mode line specified.max-bpc=Nβ set"max bpc"KMS property to valueN, silently clamped to the hardware driver supported range. This artificially limits the driver chosen link bits-per-channel which may be useful for working around sink hardware (e.g. monitor) limitations. The default is16which is practically unlimited. If you need to work around hardware issues, try a lower value like8. A value of0means that the current max bpc will be reprogrammed.
π¦ Section remote-output
name=name β specify unique name for the output.mode=mode β specify the video mode for the output. The argument mode is a resolution setting, such as:
mode=widthxheight
mode=widthxheight@refresh_rate
If refresh_rate is not specified it will default to a 60Hz.
host=host β specify the host name or IP Address that the remote output will be transmitted to.port=port β specify the port number to transmit the remote output to. Usable port range is1-65533.gst-pipeline=pipeline β specify the gstreamer pipeline. It is necessary that source isappsrc, its name is"src", and sink name is"sink"in pipeline. Ignoreportandhostconfiguration if thegst-pipelineis specified.
π₯ OPTIONS π₯
When the DRM backend is loaded, weston will understand the following additional command line options.
--current-modeβ by default, use the current video mode of all outputs, instead of switching to the monitor preferred mode.--drm-device=cardN β use the DRM device cardN for rendering and output instead of the default heuristics based on seat assignments and boot VGA status. For example, usecard0.--additional-devices=cardN β comma separated list of secondary DRM devices cardM,cardN that will only be used as outputs, but not for rendering. For example, usecard1,card2.--seat=seatid β use graphics and input devices designated for seat seatid instead of the seat defined in the environment variableXDG_SEAT. If neither is specified,seat0will be assumed.--continue-without-inputβ allow Weston to start without input devices. Used for testing purposes.--disable-drm-state-reuseβ force-rebuild the DRM state on every frame (only available in combination with--debug). Used for testing purposes.
π ENVIRONMENT π
WESTON_LIBINPUT_LOG_PRIORITYβ the minimum libinput verbosity level to be printed to Weston's log. Valid values aredebug,info, anderror. Default isinfo.XDG_SEATβ the seat Weston will start on, unless overridden on the command line.
π«Ά SEE ALSO π«Ά
and that's the whole page, bestie!! π this one's from Weston 16.0.0, dated 2012-11-27 β vintage but still iconic, no cap. go forth and --backend=drm responsibly πβ¨
π¦ where this page comes from
- nixpkgs unstable: weston 16.0.0
- ubuntu stonking: weston 16.0.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms