external brightness control

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.

destroy()
Destroy the object.
create_brightness_control(id: new_id<kde_external_brightness_device_v1>)
Argument
Type
Description
idnew_id<kde_external_brightness_device_v1>
registers a brightness device with the compositor

brightness control device

After creating this object, the client should issue all relevant setup requests (set_internal, set_edid, set_max_brightness) and finish the sequence with commit. Afterwards, for each change in values, the client must call commit again.

destroy()
destroy the object and unregister the brightness control device
set_internal(internal: uint)
Argument
Type
Description
internaluint
1 if it's an internal panel, 0 if not
sets whether or not the brightness device belongs to an internal display
set_edid(string: string)
Argument
Type
Description
stringstring
base-64 encoded string of the first 128 bytes of the EDID
set the EDID data for identification of the display
set_max_brightness(value: uint)
Argument
Type
Description
valueuint
the maximum value that can be set
notifies the compositor of the maximum brightness that can be set on this device
commit()
notifies the compositor that all relevant identifiers and values have been sent
requested_brightness(value: uint)
Argument
Type
Description
valueuint
the value to set the device to
requests the client to change the brightness to this value

The client must ensure that if the brightness level changes due to external factors, that it overwrites those changes with what the compositor last requested.


Compositor Support

Mutter
Mutter
46
KWin
KWin
6.2
Sway
Sway
1.9
COSMIC
COSMIC
1.0.0
Hyprland
Hyprland
0.42.0
niri
0.1.8
Weston
Weston
13
Mir
Mir
2.19
GameScope
GameScope
3.15.14
Jay
1.7.0
kde_external_brightness_v1
x
1
x
x
x
x
x
x
x
x

SPDX-FileCopyrightText: 2024 Xaver Hugl <xaver.hugl@gmail.com>

SPDX-License-Identifier: MIT-CMU