kde_output_management_v2 ↗
Copyright
SPDX-FileCopyrightText: 2008-2011 Kristian Høgsberg SPDX-FileCopyrightText: 2010-2011 Intel Corporation SPDX-FileCopyrightText: 2012-2013 Collabora, Ltd. SPDX-FileCopyrightText: 2015 Sebastian Kügler <sebas@kde.org> SPDX-FileCopyrightText: 2021 Méven Car <meven.car@enioka.com> SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@kde.org> SPDX-License-Identifier: MIT-CMU
- kde_output_management_v2 — configuration of server outputs through clients
- kde_output_configuration_v2 — configure single output devices
- kde_mode_list_v2 — a list of custom modes
kde_output_management_v2
kde_output_management_v2
- create_configuration — provide outputconfiguration object for configuring outputs
- create_mode_list — create a list of custom modes
configuration of server outputs through clients
This interface enables clients to set properties of output devices for screen configuration purposes via the server. To this end output devices are referenced by global kde_output_device_v2 objects.
outputmanagement (wl_global) -------------------------- request:
create_configuration -> outputconfiguration (wl_resource)
outputconfiguration (wl_resource) -------------------------- requests:
enable(outputdevice, bool)
mode(outputdevice, mode)
transformation(outputdevice, flag)
position(outputdevice, x, y)
apply
events:
applied
failed
The server registers one outputmanagement object as a global object. In order to configure outputs a client requests create_configuration, which provides a resource referencing an outputconfiguration for one-time configuration. That way the server knows which requests belong together and can group them by that.
On the outputconfiguration object the client calls for each output whether the output should be enabled, which mode should be set (by referencing the mode from the list of announced modes) and the output's global position. Once all outputs are configured that way, the client calls apply. At that point and not earlier the server should try to apply the configuration. If this succeeds the server emits the applied signal, otherwise the failed signal, such that the configuring client is noticed about the success of its configuration request.
Through this design the interface enables atomic output configuration changes if internally supported by the server.
Warning! The protocol described in this file is a desktop environment implementation detail. Regular clients must not use this protocol. Backward incompatible changes may be added without bumping the major version of the extension.
kde_output_management_v2
kde_output_configuration_v2
- error — kde_output_configuration_v2 error values
- enable — enable or disable an output
- mode — switch output-device to mode
- transform — transform output-device
- position — position output in global space
- scale — set scaling factor of this output
- apply — apply configuration changes to all output devices
- applied — configuration changes have been applied
- failed — configuration changes failed to apply
- destroy — release the outputconfiguration object
- overscan — set overscan value
- vrr_policy — describes vrr policy
- set_vrr_policy — set the VRR policy
- rgb_range — describes RGB range policy
- set_rgb_range — RGB range
- set_primary_output — Select which primary output to use
- set_priority — Set the order of outputs
- set_high_dynamic_range — change if HDR should be enabled
- set_sdr_brightness — set the brightness for sdr content
- set_wide_color_gamut — change if a wide color gamut should be used
- auto_rotate_policy — describes when auto rotate should be used
- set_auto_rotate_policy — change when auto rotate should be used
- set_icc_profile_path — change the used icc profile for SDR mode
- set_brightness_overrides — override metadata about the screen's brightness limits
- set_sdr_gamut_wideness — describes which gamut is assumed for sRGB applications
- color_profile_source — which source the compositor should use for the color profile on an output
- set_color_profile_source — which source the compositor should use for the color profile on an output in SDR mode
- set_brightness — brightness multiplier
- color_power_tradeoff — tradeoff between power and accuracy
- set_color_power_tradeoff — set the preferred color/power tradeoff
- set_dimming — dimming multiplier
- failure_reason — reason for failure
- set_replication_source — source output for mirroring
- set_ddc_ci_allowed — if DDC/CI should be used to control brightness etc.
- set_max_bits_per_color — override the max bpc
- edr_policy — when the compositor may make use of EDR
- set_edr_policy — set when the compositor may apply EDR
- set_sharpness — sharpness strength
- set_custom_modes — set the custom mode list
- set_auto_brightness — whether or not automatic brightness is enabled
- set_hdr_icc_profile_path — change the used icc profile for HDR mode
- set_hdr_color_profile_source — which source the compositor should use for the color profile on an output in HDR mode
- set_abm_level — set the allowed level of adaptive backlight modulation
configure single output devices
outputconfiguration is a client-specific resource that can be used to ask the server to apply changes to available output devices.
The client receives a list of output devices from the registry. When it wants to apply new settings, it creates a configuration object from the outputmanagement global, writes changes through this object's enable, scale, transform and mode calls. It then asks the server to apply these settings in an atomic fashion, for example through Linux' DRM interface.
The server signals back whether the new settings have applied successfully or failed to apply. outputdevice objects are updated after the changes have been applied to the hardware and before the server side sends the applied event.
kde_output_management_v2
kde_mode_list_v2
- error — kde_mode_list_v2 error values
- destroy — destroy the mode list object
- add_mode — Add the current mode configuration to the list
- set_resolution
- set_refresh_rate
- set_reduced_blanking — whether or not the mode should have reduced blanking
- add_cvt — new mode with CVT timings
a list of custom modes
This list is populated by first setting each relevant property, and then calling add_mode to add a mode with these properties. One would for example call
set_resolution
set_refresh_rate
set_reduced_blanking
add_mode
add_mode does not reset the properties that were previously set, they are valid until the object is destroyed. The compositor may additionally have sensible defaults for some properties like reduced_blanking, but for consistent results, it's best to always set each known property every time.
One can also specify custom modes with CVT timings, for example
add_cvt
add_cvt
The parameters resolution and refresh rate are required, if they are not set, the missing_parameters error will be emitted.