A D-Bus ddcutil service for control of DDC Monitors/VDUs
The aim of this service is to make it easier to create widgets and apps for ddcutil. The service's client interface is now quite stable, but there may be some additions or tweaks if new requirements are discovered.
The service is written in C. It has very few dependencies (glib-2 and libddcutil) and is consequently quite easy to build. Once built, running the executable should make a ddcutil service available on the D-Bus Session-Bus.
Testing using the d-feet D-Bus interactive GUI:
session-bus
button in the d-feet header;ddcutil
.com.ddcutil.DdcutilService
com/ddcutil/DdcutilService
and
navigate down to the com.ddcutil.DdcutilInterface
Method inputs can be supplied as CSV, for example, Method Input to GetVcp
could be
1,'',0x10
This would access display 1
, blank-edid ''
, DDC VCP Feature code 0x10
(brightness). VDU's are identified either by display-number or base-64-encoded
EDID.
Several bash and python scripts that demonstrate using the service are included in
the examples
folder. They cover the use of the dbus-send
command line utility
and the python dasbus
and QtDBus
libraries.
The service was developed with the assistance of amendments to libddcutil by @rockowitz.
The current intention is to eventually package it with ddcutil/libddcutil.
When using this service, avoid excessively writing VCP values because each VDU's NVRAM likely has a write-cycle limit/lifespan. The suggested guideline is to limit updates to rates comparable to those observed when using the VDU's onboard controls. Avoid coding that might rapidly or infinitely loop, including when recovering from errors and bugs.
Non-standard manufacturer specific features should only be experimented with caution, some may have irreversible consequences, including bricking the hardware.
Detailed documentation can be found in the two manual pages:
There is an official Tumbleweed RPM:
The same page also provides links to unofficial builds I've done for Leap.
Mark Wagie (yochananmarqos) has kindly provided AUR packaging:
Maciej Wójcik (https://gitlab.com/w8jcik) has kindly
provided a collection of unofficial debian/ubuntu packages along with instructions
for installing the required versions of libddcutil
:
Check/modify the dependencies specified in the Makefile
:
libddcutil-devel
>= 1.4.0glib2-devel
>= 2.40 (gio-2
is normally part of glib2
)The names of required development packages may vary depending on which distribution you are targeting.
Check the install PREFIX in the Makefile
and make any changes required
for your circumstances, and issue make install
or sudo make install
as appropriate.
Manual steps for installing a dbus-daemon service file for auto-starting and auto-restarting the service are as follows:
com.ddcutil.DdcutilService.service
and set the Exec location of
the service executable (can be anywhere)./usr/share/dbus-1/services/com.ddutil.DdcutilService.service
Or maybe to: $HOME/.local/share/dbus-1/services/com.ddutil.DdcutilService.service
Installing the service file is optional. The service file enables autostart of
the service by dbus-daemon
. The service executable can be manually started
without the service file being installed.
vdu_controls
The vdu_controls
GUI has been modified to use the service by default, see:
https://github.com/digitaltrails/vdu_controls
The source includes an ddcutil-client
(ddcutil-client.c
and
man page ddcutil-client.1
). Packaging and deployment of the client is optional.
If busctl
or dbus-send
is available, they will be about as fast.
A purpose built client is mostly a convenience for those that might
want a syntactically straight forward command line interface.
Thanks go out to Sanford Rockowitz (rockowitz) for libddcutil, ddcutil and all the assistance and advice provided during the development of this service.
Thanks also to Michal Suchanek for assistance with the OpenSUSE RPM spec; Johan Grande (nahoj) for the Ubuntu patches; Mark Wagie (yochananmarqos) for AUR packaging; and Maciej Wójcik (https://gitlab.com/w8jcik) for debian/ubuntu packaging.
The development IDE is JetBrains CLion-Nova/CLion. Thanks go out to JetBrains for granting the Open Source development license.