-
Notifications
You must be signed in to change notification settings - Fork 11
Backlight
Backlight setting module is pretty customizable, and supports:
- Sysfs
- DDC
- emulated
backlight devices.
Emulated backlight is a xrandr like implementation of gamma control for external screens that do not support DDC and is available since Clightd 5.8.
Normally, they are all enabled, but one can disable them via env variables; there are 3 of them:
-
CLIGHTD_BL_SYSFS_ENABLED
to dynamically disable Sysfs support -
CLIGHTD_BL_DDC_ENABLED
to dynamically disable DDC support -
CLIGHTD_BL_EMULATED_ENABLED
to dynamically disable emulated backlight support
Shipped clightd systemd unit already provides Environment
variables making it is easy to customize these values.
Moreover, DDC (and emulated) support can also be switched off at build time, dropping also the ddcutil
dependency.
Clightd uses ddcutil C api to set external monitor brightness and thus supporting desktop PCs too.
ddcutil is a program for querying and changing monitor settings, such as brightness and color levels.
ddcutil uses DDC/CI to communicate with monitors implementing MCCS (Monitor Control Command Set) over I2C.
Its support is compile time optional.
For Ubuntu users: note that C api is not packaged together with ddcutil package in latest ubuntu. You will have to build it from sources.
When building with ddcutil support enabled, an /usr/lib/modules-load.d/i2c_clightd.conf will be installed too; it will automatically load i2c-dev
kernel module at startup for you.
As noted here, not all monitor expose same VCP feature code to manage backlight; thus, since Clightd 4.1, users are able to customize the code.
By default, it is 0x10 and it should work in most cases.
You can customize that through a shell env variable: CLIGHTD_BL_VCP
.
Shipped clightd systemd unit already provides an Environment
variable making it is easy to update its value.
Moreover, since Clightd 5.5, you are also able to further customize VCP code for each external monitor, using CLIGHTD_BL_VCP_$monId
env variable, where $monId
is the monitor serial number as returned by Clightd Backlight2 Get methods.
Since ddcutil 1.2.0, support for reloading monitor list has been added.
Clightd 5.5 makes use of this feature to poll for newly added/removed external monitors, thus gaining the support for monitor hotplug.
To allow users to compile with older versions of ddcutil, the feature is only built if ddcutil at least version 1.2.0 is detected.
Note that ddcutil 1.2.0 has some memleaks in regards to monitor reloading. These will be fixed in ddcutil 1.2.1.