table of contents
COM.DDCUTIL.DDCU(7) | Miscellaneous | COM.DDCUTIL.DDCU(7) |
NAME¶
com.ddcutil.DdcutilInterface - D-Bus service for libddcutil VESA DDC Monitor Virtual Control Panel
METHODS¶
Restart (IN s text_options,
IN u syslog_level,
IN u flags,
OUT i error_status,
OUT s error_message); Detect (IN u flags,
OUT i number_of_displays,
OUT a(iiisssqsu) detected_displays,
OUT i error_status,
OUT s error_message); GetVcp (IN i display_number,
IN s edid_txt,
IN y vcp_code,
IN u flags,
OUT q vcp_current_value,
OUT q vcp_max_value,
OUT s vcp_formatted_value,
OUT i error_status,
OUT s error_message); GetMultipleVcp (IN i display_number,
IN s edid_txt,
IN ay vcp_code,
IN u flags,
OUT a(yqqs) vcp_current_value,
OUT i error_status,
OUT s error_message); SetVcp (IN i display_number,
IN s edid_txt,
IN y vcp_code,
IN q vcp_new_value,
IN u flags,
OUT i error_status,
OUT s error_message); SetVcpWithContext (IN i display_number,
IN s edid_txt,
IN y vcp_code,
IN q vcp_new_value,
IN s client_context,
IN u flags,
OUT i error_status,
OUT s error_message); GetVcpMetadata (IN i display_number,
IN s edid_txt,
IN y vcp_code,
IN u flags,
OUT s feature_name,
OUT s feature_description,
OUT b is_read_only,
OUT b is_write_only,
OUT b is_rw,
OUT b is_complex,
OUT b is_continuous,
OUT i error_status,
OUT s error_message); GetCapabilitiesString (IN i display_number,
IN s edid_txt,
IN u flags,
OUT s capabilities_text,
OUT i error_status,
OUT s error_message); GetCapabilitiesMetadata (IN i display_number,
IN s edid_txt,
IN u flags,
OUT s model_name,
OUT y mccs_major,
OUT y mccs_minor,
OUT a{ys} commands,
OUT a{y(ssa{ys})} capabilities,
OUT i error_status,
OUT s error_message); GetDisplayState (IN i display_number,
IN s edid_txt,
IN u flags,
OUT i status,
OUT s message); GetSleepMultiplier (IN i display_number,
IN s edid_txt,
IN u flags,
OUT d current_multiplier,
OUT i error_status,
OUT s error_message); SetSleepMultiplier (IN i display_number,
IN s edid_txt,
IN d new_multiplier,
IN u flags,
OUT i error_status,
OUT s error_message);
SIGNALS¶
ConnectedDisplaysChanged (s edid_txt,
i event_type,
u flags); VcpValueChanged (i display_number,
s edid_txt,
y vcp_code,
q vcp_new_value,
s source_client_name,
s source_client_context,
u flags); ServiceInitialized (u flags);
PROPERTIES¶
AttributesReturnedByDetect readable as StatusValues readable a{is} DdcutilVersion readable s DdcutilDynamicSleep readwrite b DdcutilOutputLevel readwrite u DisplayEventTypes readable a{is} ServiceInterfaceVersion readable s ServiceInfoLogging readwrite b ServiceEmitConnectivitySignals readwrite b ServiceEmitSignals readwrite b ServiceFlagOptions readable a{is} ServiceParametersLocked readable b ServicePollInterval readwrite u ServicePollCascadeInterval readwrite d
DESCRIPTION¶
ddcutil-service is D-Bus service wrapper for libddcutil which implements the VESA DDC Monitor Control Command Set. Most things that can be controlled using a monitor's on-screen display can be controlled by this service.
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.
For many of the methods a VDU can be specified by either passing the DDC display_number or DDC EDID. The EDID is the more stable identifier, it remains unchanged if the number of connected or powered-up VDUs changes, whereas the DDCA display numbers may be reallocated. When passing an EDID, pass -1 for display_number, otherwise both are tied with the display_number having precedence.
Methods that accept an base-64 encoded EDID will accept a prefix of the EDID when passed a flags value of 1. This is intended as a convenience for passing EDIDs on the command line.
METHOD DETAILS¶
The Restart() method¶
Restart (IN s text_options,
IN u syslog_level,
IN u flags,
OUT i error_status,
OUT s error_message);
Restarts the service with the supplied parameters.
If the service is configuration-locked, an com.ddcutil.DdcutilService.Error.ConfigurationLocked error is raised.
IN s text_options:
IN u syslog_level:
IN u flags:
OUT i error_status:
OUT s error_message:
The Detect() method¶
Detect (IN u flags,
OUT i number_of_displays,
OUT a(iiisssqsu) detected_displays,
OUT i error_status,
OUT s error_message);
Issues a detect and returns the VDUs detected.
The array detected_displays will be of length number_of_displays.
Each element of detected_displays array will contain the fields specified by the AttributesReturnedByDetect property. The fields will include the libddcutil display-number and a base64-encoded EDID.
IN u flags:
OUT i number_of_displays:
OUT a(iiisssqsu) detected_displays:
OUT i error_status:
OUT s error_message:
The GetVcp() method¶
GetVcp (IN i display_number,
IN s edid_txt,
IN y vcp_code,
IN u flags,
OUT q vcp_current_value,
OUT q vcp_max_value,
OUT s vcp_formatted_value,
OUT i error_status,
OUT s error_message);
Retrieve the value for a VCP-code for the specified VDU.
For simplicity the vcp_current_value returned will always be 16 bit integer. Most VCP values are single byte 8-bit integers, very few are two-byte 16-bit.
The method's flags parameter can be set to 2 (RETURN_RAW_VALUE), see ddcutil-service.1 LIMITATIONS for an explanation.
The vcp_formatted_value contains the current value along with any related info, such as the maximum value, its similar to the output of the ddcutil getvcp shell-command.
IN i display_number:
IN s edid_txt:
IN y vcp_code:
IN u flags:
OUT q vcp_current_value:
OUT q vcp_max_value:
OUT s vcp_formatted_value:
OUT i error_status:
OUT s error_message:
The GetMultipleVcp() method¶
GetMultipleVcp (IN i display_number,
IN s edid_txt,
IN ay vcp_code,
IN u flags,
OUT a(yqqs) vcp_current_value,
OUT i error_status,
OUT s error_message);
Retrieves several different VCP values for the specified VDU. This is a convenience method provided to more efficiently utilise D-Bus.
Each entry in vcp_current_value array is a VCP-code along with its current, maximum and formatted values (the same as those returned by GetVcp).
The method's flags parameter can be set to 2 (RETURN_RAW_VALUES), see ddcutil-service.1 LIMITATIONS for an explanation.
IN i display_number:
IN s edid_txt:
IN ay vcp_code:
IN u flags:
OUT a(yqqs) vcp_current_value:
OUT i error_status:
OUT s error_message:
The SetVcp() method¶
SetVcp (IN i display_number,
IN s edid_txt,
IN y vcp_code,
IN q vcp_new_value,
IN u flags,
OUT i error_status,
OUT s error_message);
Set the value for a VCP-code for the specified VDU.
For simplicity the vcp_new_value is always passed as a 16 bit integer (most VCP values are single byte 8-bit integers, very few are two-byte 16-bit).
The method's flags parameter can be set to 4 (NO_VERIFY) to disable libddcutil verify and retry. Verification and retry is the default.
IN i display_number:
IN s edid_txt:
IN y vcp_code:
IN q vcp_new_value:
IN u flags:
OUT i error_status:
OUT s error_message:
The SetVcpWithContext() method¶
SetVcpWithContext (IN i display_number,
IN s edid_txt,
IN y vcp_code,
IN q vcp_new_value,
IN s client_context,
IN u flags,
OUT i error_status,
OUT s error_message);
Set the value for a VCP-code for the specified VDU.
For simplicity the vcp_new_value is always passed as a 16 bit integer (most VCP values are single byte 8-bit interers, very few are two-byte 16-bit).
The method's flags parameter can be set to 4 (NO_VERIFY) to disable libddcutil verify and retry. Verification and retry is the default.
IN i display_number:
IN s edid_txt:
IN y vcp_code:
IN q vcp_new_value:
IN s client_context:
IN u flags:
OUT i error_status:
OUT s error_message:
The GetVcpMetadata() method¶
GetVcpMetadata (IN i display_number,
IN s edid_txt,
IN y vcp_code,
IN u flags,
OUT s feature_name,
OUT s feature_description,
OUT b is_read_only,
OUT b is_write_only,
OUT b is_rw,
OUT b is_complex,
OUT b is_continuous,
OUT i error_status,
OUT s error_message);
Retrieve the metadata for a VCP-code for the specified VDU.
IN i display_number:
IN s edid_txt:
IN y vcp_code:
IN u flags:
OUT s feature_name:
OUT s feature_description:
OUT b is_read_only:
OUT b is_write_only:
OUT b is_rw:
OUT b is_complex:
OUT b is_continuous:
OUT i error_status:
OUT s error_message:
The GetCapabilitiesString() method¶
GetCapabilitiesString (IN i display_number,
IN s edid_txt,
IN u flags,
OUT s capabilities_text,
OUT i error_status,
OUT s error_message);
Retrieve the capabilities metadata for a VDU in a format similar to that output by the command ddcutil terse capabilities (similar enough for parsing by common code).
IN i display_number:
IN s edid_txt:
IN u flags:
OUT s capabilities_text:
OUT i error_status:
OUT s error_message:
The GetCapabilitiesMetadata() method¶
GetCapabilitiesMetadata (IN i display_number,
IN s edid_txt,
IN u flags,
OUT s model_name,
OUT y mccs_major,
OUT y mccs_minor,
OUT a{ys} commands,
OUT a{y(ssa{ys})} capabilities,
OUT i error_status,
OUT s error_message);
Retrieve the capabilities metadata for a VDU in a parsed dictionary structure indexed by VCP code.
The capabilities out parameter is an array of dictionary entries. Each entry consists of a VCP-code along with a struct containing the feature-name, feature-description, and an array of permitted-values. For features that have continuous values, the associated permitted-value array will be empty. For non-continuous features, the permitted-value array will contain a dictionary entry for each permitted value, each entry containing a permitted-value and value-name.
IN i display_number:
IN s edid_txt:
IN u flags:
OUT s model_name:
OUT y mccs_major:
OUT y mccs_minor:
OUT a{ys} commands:
OUT a{y(ssa{ys})} capabilities:
OUT i error_status:
OUT s error_message:
The GetDisplayState() method¶
GetDisplayState (IN i display_number,
IN s edid_txt,
IN u flags,
OUT i status,
OUT s message);
Retrieve the libddcutil display state.
Depending on the hardware and drivers, this method might return anything useful.
For libddcutil prior to 2.1, the method will return a libddcutil error_status of DDCRC_UNIMPLEMENTED.
IN i display_number:
IN s edid_txt:
IN u flags:
OUT i status:
OUT s message:
The GetSleepMultiplier() method¶
GetSleepMultiplier (IN i display_number,
IN s edid_txt,
IN u flags,
OUT d current_multiplier,
OUT i error_status,
OUT s error_message);
Get the current libddcutil sleep multiplier for the specified VDU.
In more recent versions of libddcutil this value is generally managed automatically.
IN i display_number:
IN s edid_txt:
IN u flags:
OUT d current_multiplier:
OUT i error_status:
OUT s error_message:
The SetSleepMultiplier() method¶
SetSleepMultiplier (IN i display_number,
IN s edid_txt,
IN d new_multiplier,
IN u flags,
OUT i error_status,
OUT s error_message);
Set the libddcutil sleep multiplier for the specified VDU.
In more recent versions of libddcutil this is generally managed automatically, but this method is provided should manual control be necessary (due to problem hardware).
Prior to taking manual control of the sleep-multiplier, the DdcutilDynamicSleep property should be set to false to prevent the multiplier from being automatically returned.
If the service is configuration-locked, an com.ddcutil.DdcutilService.Error.ConfigurationLocked error is raised.
IN i display_number:
IN s edid_txt:
IN d new_multiplier:
IN u flags:
OUT i error_status:
OUT s error_message:
SIGNAL DETAILS¶
The ConnectedDisplaysChanged" signal"¶
ConnectedDisplaysChanged (s edid_txt,
i event_type,
u flags);
Where hardware and drivers support it, this signal will be raised if a displays connection status changes due to cabling, power, or DPMS.
The hardware, cabling and drivers determines which of states listed by DisplayEventTypes property that can actually be signaled (the possibilities cannot be determined programmatically).
Requires the ServiceEmitConnectivitySignals property to be set to true.
s edid_txt:
i event_type:
u flags:
The VcpValueChanged" signal"¶
VcpValueChanged (i display_number,
s edid_txt,
y vcp_code,
q vcp_new_value,
s source_client_name,
s source_client_context,
u flags);
This signal will be raised if a SetVcp or SetVcpWithContext method call succeeds.
i display_number:
s edid_txt:
y vcp_code:
q vcp_new_value:
s source_client_name:
s source_client_context:
u flags:
The ServiceInitialized" signal"¶
ServiceInitialized (u flags);
This signal is raised when the service is initialized. It provides clients with a way to detect restarts and reinstate properties or other settings.
u flags:
PROPERTY DETAILS¶
The AttributesReturnedByDetect" property"¶
AttributesReturnedByDetect readable as
The text names of each of the fields in the array of structs returned by the Detect method.
The StatusValues" property"¶
StatusValues readable a{is}
The list of libddcutil status values and their text names that might be returned in the error_status out-parameter of most of the service methods.
The DdcutilVersion" property"¶
DdcutilVersion readable s
The ddcutil version number for the linked libddcutil.
The DdcutilDynamicSleep" property"¶
DdcutilDynamicSleep readwrite b
Enables/disables automatic adjustment of the sleep-multiplier. Before using the SetSleepMultiplier method, this property should be set to false to stop any automatic retuning of the multiplier.
Attempting to set this property when the service is configuration-locked will result in an com.ddcutil.DdcutilService.Error.ConfigurationLocked error being raised.
The DdcutilOutputLevel" property"¶
DdcutilOutputLevel readwrite u
Change the libddcutil diagnostic output-level. See the libddcutil/ddcutil documentation for details.
Attempting to set this property when the service is configuration-locked will result in an com.ddcutil.DdcutilService.Error.ConfigurationLocked error being raised.
The DisplayEventTypes" property"¶
DisplayEventTypes readable a{is}
A list of the event types sent by the ConnectedDisplaysChanged signal along with their text names. Events are included for display connection/disconnection (hotplug), DPMS-sleep, and DPMS-wake. If the list is empty, the GPU, GPU-driver, or libddcutil version does not support display event detection.
The ServiceInterfaceVersion" property"¶
ServiceInterfaceVersion readable s
The interface version of this service. Providing the major number remains the same, the service remains backward compatibility with existing clients.
The ServiceInfoLogging" property"¶
ServiceInfoLogging readwrite b
Enables/disables info and debug level logging within the service executable. (The service using glib logging.)
Attempting to set this property when the service is configuration-locked will result in an com.ddcutil.DdcutilService.Error.ConfigurationLocked error being raised.
The ServiceEmitConnectivitySignals" property"¶
ServiceEmitConnectivitySignals readwrite b
Because VDU connectivity change detection involves some polling, this property can be used to disable it if it is unecessary. For example, where the configuration of VDUs is fixed.
Attempting to set this property when the service is configuration-locked will result in an com.ddcutil.DdcutilService.Error.ConfigurationLocked error being raised.
The ServiceEmitSignals" property"¶
ServiceEmitSignals readwrite b
Deprecated, name was too generic, replaced by ServiceEmitConnectivitySignals
The ServiceFlagOptions" property"¶
ServiceFlagOptions readable a{is}
The list of available flags values that can be passed to the service methods. Not all options are applicable to all methods.
The ServiceParametersLocked" property"¶
ServiceParametersLocked readable b
Indicates whether the lock command line argument has been used to prevent configuration changes via method calls and property changes.
The ServicePollInterval" property"¶
ServicePollInterval readwrite u
Query or set the display change detection poll-interval performed by the service (minimum 10 seconds, zero to disable polling).
If libddcutil supports change detection and it works for hardware, drivers and cabling in use, internal polling by the service may be unecessary, in which case polling can be turned off by setting the interval to zero.
Attempting to set this property when the service is configuration-locked will result in an com.ddcutil.DdcutilService.Error.ConfigurationLocked error being raised.
The ServicePollCascadeInterval" property"¶
ServicePollCascadeInterval readwrite d
Query or set the display change detection poll-cascade-interval (minimum 0.1 seconds). When dealing with a cascade of events, for example, when several VDUs are set to DPMS sleep, polling occurs more frequently until the cascade is cleared.
Attempting to set this property when the service is configuration-locked will result in an com.ddcutil.DdcutilService.Error.ConfigurationLocked error being raised.
AUTHOR¶
Michael Hamilton
COPYRIGHT¶
Copyright (C) 2023,2024 Michael Hamilton.
ddcutil‐service is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
07/02/2024 | ddcutil-service |