KDE external brightness
kde_external_brightness_v1
Some brightness control mechanisms are somewhat unstable, or require root privileges, so putting them inside of the compositor is not desired. This protocol is for outsourcing the actual brightness-setting to a process outside of the compositor.
create_brightness_control(id: new_id<kde_external_brightness_device_v1>)
Argument | Type | Description |
---|---|---|
id | new_id<kde_external_brightness_device_v1> |
kde_external_brightness_device_v1
After creating this object, the client should issue all relevant setup requests (set_internal, set_edid, set_max_brightness, optionally set_observed_brightness) and finish the sequence with commit. Afterwards, for each change in values, the client must call commit again.
destroy()
set_internal(internal: uint)
Argument | Type | Description |
---|---|---|
internal | uint | 1 if it's an internal panel, 0 if not |
set_edid(string: string)
Argument | Type | Description |
---|---|---|
string | string | base-64 encoded string of the first 128 bytes of the EDID |
set_max_brightness(value: uint)
Argument | Type | Description |
---|---|---|
value | uint | the maximum value that can be set |
commit()
set_observed_brightness(value: uint)
Argument | Type | Description |
---|---|---|
value | uint | the observed value that was read |
The client can set this to notify the compositor of the device's initial brightness. It can also set this again after the initial commit to notify the compositor that the brightness level has changed due to external factors. The compositor is free to use or ignore this value as it sees fit.
requested_brightness(value: uint)
Argument | Type | Description |
---|---|---|
value | uint | the value to set the device to |
The client must ensure that if the brightness level changes due to external factors, that it either overwrites those changes with what the compositor last requested, or commit again with set_observed_brightness specifying the changed brightness.
Compositor Support
Mutter 47.3 | KWin 6.2 | Sway 1.10 | COSMIC 0.1 | Hyprland 0.42.0 | niri 25.01 | Weston 13 | Mir 2.19 | GameScope 3.15.14 | Jay 1.7.0 | |
---|---|---|---|---|---|---|---|---|---|---|
kde_external_brightness_v1 | x | 1 | x | x | x | x | x | x | x | x |
Copyright
SPDX-FileCopyrightText: 2024 Xaver Hugl <xaver.hugl@gmail.com>
SPDX-License-Identifier: MIT-CMU