输出配置表示

输出设备描述了合成器可用的显示设备。output_device 与 wl_output 类似,但侧重于输出配置管理。

客户端可以查询所有全局 output_device 对象以列出所有可用的显示设备,包括那些当前可能未被合成器表示为 wl_output 的设备。

客户端通过 outputconfiguration 接口向服务器发送配置更改,服务器将配置更改应用到硬件并向输出设备发出相应的更改信号。

此对象在启动时作为全局对象发布,用于每个可用的显示设备,或在设备稍后可用时发布(例如通过物理连接器热插拔)。

警告!此文件中描述的协议是桌面环境的实现细节。普通客户端不得使用此协议。可能会在不增加扩展主版本的情况下添加向后不兼容的更改。

geometry(x: int, y: int, physical_width: int, physical_height: int, subpixel: int, make: string, model: string, transform: int)
参数
类型
描述
xint
x position within the global compositor space
yint
y position within the global compositor space
physical_widthint
width in millimeters of the output
physical_heightint
height in millimeters of the output
subpixelint
subpixel orientation of the output
makestring
textual description of the manufacturer
modelstring
textual description of the model
transformint
transform that maps framebuffer to output
输出的几何属性

geometry 事件描述输出的几何属性。该事件在绑定到输出对象时以及任何属性更改时发送。

current_mode(mode: object<kde_output_device_mode_v2>)
参数
类型
描述
modeobject<kde_output_device_mode_v2>
当前模式

此事件描述此输出头当前使用的模式。仅在输出启用时发送。

参数
类型
描述
modenew_id<kde_output_device_mode_v2>
公布可用的输出模式及当前模式

mode 事件描述输出的可用模式。

当客户端绑定到 output_device 对象时,服务器会为 output_device 可以操作的每个可用模式发送一次此事件。

初始绑定时至少会发送一个事件,表示当前模式。

之后如果输出发生变化,其 mode 事件会再次发送,用于最终添加的模式,最后是当前模式。换句话说,当前模式始终由最后发送的带有 current 标志的事件表示。

模式的大小以输出设备的物理硬件单位给出。这不一定与全局合成器空间中的输出大小相同。例如,输出可能被缩放(如 kde_output_device_v2.scale 中所述)或变换(如 kde_output_device_v2.transform 中所述)。

done()
已发送所有输出信息

此事件在绑定到输出对象时所有其他属性发送完毕后,以及之后任何其他输出属性更改应用后发送。这允许将输出属性的更改视为原子操作,即使多个事件连续宣布它们。

scale(factor: fixed)
参数
类型
描述
factorfixed
scaling factor of output
输出缩放属性

此事件包含 geometry 事件中未包含的缩放几何信息。可以在绑定输出对象后或输出缩放稍后更改时发送。如果未发送,客户端应假设缩放比例为 1。

缩放比例大于 1 意味着合成器在渲染时会自动按此倍数缩放表面缓冲区。这用于高分辨率显示器,在这些显示器上应用程序以原生分辨率渲染会太小而难以阅读。

缩放感知客户端应跟踪表面的当前输出,如果它在缩放的输出上,应使用 wl_surface.set_buffer_scale 设置输出的缩放比例。这样合成器可以避免缩放表面,客户端可以提供更高质量的图像。

edid(raw: string)
参数
类型
描述
rawstring
base64-encoded EDID string
公布输出的 EDID 数据

edid 事件封装了输出设备的 EDID 数据。

该事件在绑定到输出对象时发送。EDID 数据可能为空,在这种情况下仍会发送此事件。如果 EDID 信息为空,可以回退使用输出设备的 name 等属性。

enabled(enabled: int)
参数
类型
描述
enabledint
output enabled state
输出已启用或禁用

enabled 事件通知此输出当前是否已启用并被服务器用于显示内容。该事件在绑定到输出对象时以及输出稍后通过启用或禁用更改状态时发送。

uuid(uuid: string)
参数
类型
描述
uuidstring
output devices ID
此输出设备的唯一标识

uuid 可用于标识输出。它完全由服务器控制。服务器应确保 uuid 在重启后保持持久。空的 uuid 被视为无效。

serial_number(serialNumber: string)
参数
类型
描述
serialNumberstring
textual representation of serial number
序列号

显示器的序列号,在启动时第一个 done 事件之前发送。

eisa_id(eisaId: string)
参数
类型
描述
eisaIdstring
textual representation of EISA identifier
EISA ID

显示器的 EISA ID,在启动时第一个 done 事件之前发送。

参数
类型
描述
flagsuint<kde_output_device_v2.capability>
功能标志

此设备具有哪些功能,在启动时第一个 done 事件之前发送。

overscan(overscan: uint)
参数
类型
描述
overscanuint
amount of overscan of the monitor
过扫描

显示器的过扫描值(百分比),在启动时第一个 done 事件之前发送。

可变刷新率策略

合成器在使用可变刷新率方面将采用什么策略。

RGB 范围

合成器对此输出使用的 RGB 范围

name(name: string)
参数
类型
描述
namestring
输出名称

输出的名称,可用于交叉引用 zxdg_output_v1 并最终引用 QScreen

high_dynamic_range(hdr_enabled: uint)
参数
类型
描述
hdr_enableduint
1 if enabled, 0 if disabled
是否启用 HDR

此输出是否启用了高动态范围

sdr_brightness(sdr_brightness: uint)
参数
类型
描述
sdr_brightnessuint
启用 HDR 时 SDR 的亮度

如果使用高动态范围,此值定义标准动态范围格式内容的亮度(以尼特为单位)。请注意,虽然该值以尼特为单位,但这不一定等同于屏幕上的相同亮度。

wide_color_gamut(wcg_enabled: uint)
参数
类型
描述
wcg_enableduint
1 if enabled, 0 if disabled
是否启用 WCG

此输出是否启用了广色域

描述何时使用自动旋转
icc_profile_path(profile_path: string)
参数
类型
描述
profile_pathstring
描述何时使用自动旋转
brightness_metadata(max_peak_brightness: uint, max_frame_average_brightness: uint, min_brightness: uint)
参数
类型
描述
max_peak_brightnessuint
in nits
max_frame_average_brightnessuint
in nits
min_brightnessuint
in 0.0001 nits
屏幕亮度限制的元数据
brightness_overrides(max_peak_brightness: int, max_average_brightness: int, min_brightness: int)
参数
类型
描述
max_peak_brightnessint
-1 for no override, positive values are the brightness in nits
max_average_brightnessint
-1 for no override, positive values are the brightness in nits
min_brightnessint
-1 for no override, positive values are the brightness in 0.0001 nits
屏幕亮度限制的覆盖值
sdr_gamut_wideness(gamut_wideness: uint)
参数
类型
描述
gamut_widenessuint
0 means rec.709 primaries, 10000 means native primaries
描述 sRGB 应用程序假定使用的色域

可用于提供用户认为 sRGB 应用程序应具有的颜色,基于许多现代 sRGB 屏幕上的默认体验。

描述合成器用于输出颜色配置文件的来源
brightness(brightness: uint)
参数
类型
描述
brightnessuint
brightness in 0-10000
亮度乘数

这是输出的亮度调节器。它不指定任何绝对值,而只是在其他亮度值(如 sdr_brightness 和 brightness_metadata)之上的乘数。0 是最小亮度(不是完全黑暗),10000 是最大亮度。 目前仅在 HDR 激活时支持/有意义。

首选的颜色/功耗权衡
dimming(multiplier: uint)
参数
类型
描述
multiplieruint
multiplier in 0-10000
调光乘数

这是输出的调光乘数。这与亮度设置类似,但它只是临时设置,不是持久的,并且可能根据显示器的不同以不同方式实现。0 是最小调光系数(不是完全黑暗),10000 表示输出未被调光。

replication_source(source: string)
参数
类型
描述
sourcestring
uuid of the source output
镜像的源输出
ddc_ci_allowed(allowed: uint)
参数
类型
描述
alloweduint
1 if allowed, 0 if disabled
是否应使用 DDC/CI 控制亮度等

如果存在 ddc_ci 功能,这决定了是否应使用 DDC/CI 设置亮度、对比度等。

max_bits_per_color(max_bpc: uint)
参数
类型
描述
max_bpcuint
0 for the default / automatic
覆盖最大每颜色位数

这限制了发送到显示器的每颜色位数。

max_bits_per_color_range(min_value: uint, max_value: uint)
参数
类型
描述
min_valueuint
the minimum supported by the driver
max_valueuint
the maximum supported by the driver
最大每颜色位数值的范围
automatic_max_bits_per_color_limit(max_bpc_limit: uint)
参数
类型
描述
max_bpc_limituint
which value automatic bpc gets limited to. 0 if not limited
自动最大每颜色位数是否受限及其限制值
合成器何时可以应用 EDR

当 EDR 启用时,合成器可能会将背光提高到用户指定的设置之上,以便在没有原生 HDR 支持的显示器上呈现 HDR 内容。这通常会带来更好的视觉效果,但也会增加电池消耗。

sharpness(sharpness: uint)
参数
类型
描述
sharpnessuint
sharpness in 0-10000
锐度强度

这是输出的锐度调节器。0 表示禁用锐度,10000 表示最大锐度

priority(priority: uint)
参数
类型
描述
priorityuint
priority
输出优先级

描述输出在输出顺序列表中的位置,值较小的在列表中靠前。列表没有特定的起始值,此值仅用于排序输出。

请注意,输出顺序协议对此不够充分,因为如果输出被禁用或正在镜像另一个屏幕,它可能不在输出顺序中。

auto_brightness(enabled: uint)
参数
类型
描述
enableduint
1 for enabled, 0 for disabled
是否启用自动亮度
子像素几何信息

此枚举描述输出上物理像素的排列方式。

从帧缓冲到输出的变换

这描述了合成器将应用于表面的变换,以补偿输出设备的旋转或镜像。

翻转值对应于围绕垂直轴的初始翻转,然后是旋转。

其目的主要是允许客户端相应地渲染并通知合成器,以便对于全屏表面,合成器仍然可以直接扫描客户端表面。

参数
描述
overscan0x1
此 output_device 是否支持过扫描
vrr0x2
此 outputdevice 是否支持可变刷新率
rgb_range0x4
是否可以设置 RGB 范围
high_dynamic_range起始版本 30x8
此 outputdevice 是否支持高动态范围
wide_color_gamut起始版本 30x10
此 outputdevice 是否支持广色域
auto_rotate起始版本 40x20
此 outputdevice 是否支持自动旋转
icc_profile起始版本 50x40
此 outputdevice 是否支持 ICC 配置文件
brightness起始版本 90x80
此 outputdevice 是否支持亮度设置
built_in_color起始版本 120x100
此 outputdevice 是否支持内置颜色配置文件
ddc_ci起始版本 140x200
此 outputdevice 是否支持 DDC/CI
max_bits_per_color起始版本 150x400
此 outputdevice 是否支持设置最大每颜色位数
edr起始版本 160x800
此 outputdevice 是否支持 EDR
sharpness起始版本 170x1000
此 outputdevice 是否支持锐度设置
custom_modes起始版本 180x2000
此 outputdevice 是否支持自定义模式
auto_brightness起始版本 190x4000
描述输出设备的功能

描述此设备具有哪些功能。

vrr_policy { never, always, automatic } 
参数
描述
never0
always1
automatic2
描述 VRR 策略

描述合成器何时可以使用可变刷新率

rgb_range { automatic, full, limited } 
参数
描述
automatic0
full1
limited2
描述 RGB 范围策略

应使用全范围还是有限范围颜色

auto_rotate_policy { never, in_tablet_mode, always } 
参数
描述
never0
in_tablet_mode1
always2
描述何时应使用自动旋转
color_profile_source { sRGB, ICC, EDID } 
参数
描述
sRGB0
ICC1
EDID2
合成器应使用哪个来源作为输出的颜色配置文件
color_power_tradeoff { efficiency, accuracy } 
参数
描述
efficiency0
优先考虑效率和性能
accuracy1
优先考虑准确性
功耗与准确性之间的权衡

合成器可以做很多事情来权衡性能、功耗和颜色准确性。此设置描述了用户关于应在哪个方向进行权衡的高级偏好。

edr_policy { never, always } 
参数
描述
never0
always1
合成器何时可以使用 EDR

输出模式

此对象描述输出模式。

某些输出头不支持输出模式,在这种情况下不会公布模式。

通过此接口发送的属性通过 kde_output_device.done 事件原子性地应用。不保证属性的发送顺序。

size(width: int, height: int)
参数
类型
描述
widthint
width of the mode in hardware units
heightint
height of the mode in hardware units
模式大小

此事件描述模式大小。大小以输出设备的物理硬件单位给出。这不一定与全局合成器空间中的输出大小相同。例如,输出可能被缩放或变换。

refresh(refresh: int)
参数
类型
描述
refreshint
vertical refresh rate in mHz
模式刷新率

此事件描述模式的固定垂直刷新率。仅在模式具有固定刷新率时发送。

preferred()
首选模式

此事件将此模式标记为首选模式。

removed()
模式已被销毁

合成器将在发送此事件后立即销毁对象,因此它将变为无效,客户端应释放与其关联的任何资源。

参数
类型
描述
flagsuint<kde_output_device_mode_v2.flags>
模式标志

此事件描述模式的标志。


合成器支持

Cage
Cage
0.2.0
COSMIC
COSMIC
1.0.0~beta.8
GameScope
GameScope
3.15.14
Hyprland
Hyprland
0.52.1
Jay
1.12.0
KWin
KWin
6.6
Labwc
Labwc
0.9.2
Louvre
Louvre
2.14.1
Mir
Mir
2.26
Muffin
Muffin
6.6.0
Mutter
Mutter
49.2
niri
niri
25.11
phoc
phoc
0.52
river
river
0.3.13
Sway
Sway
1.11
Treeland
Treeland
0.8.0
Wayfire
Wayfire
0.9.0
Weston
Weston
14.0.2
kde_output_device_v2
x
x
x
x
x
20
x
x
x
x
x
x
x
x
x
x
x
x

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-License-Identifier: MIT-CMU

Footer

© 2026 Wayland Explorer

本网站与 Wayland 官方项目无任何关联。网站所有内容均根据 Wayland 协议 XML 文件自动生成。

本网站使用的 Visual Studio Code - Codicons 遵循 CC BY 4.0 许可。