You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call the low-level library of the system to access the display monitor DDC/CI channel and interface
Get the display driver information, such as display driver name, current display location
Get the value of the current parameter and the range of the current parameters, such as brightness, sharpness, contrast, red, green, blue, and other custom query parameters
Set the value of the display parameter, such as brightness, sharpness, contrast, red, green, blue, and other custom settings parameters
Interacting with the display, such as setting the displayed input source, controlling the displayed power mode
package main
import (
"fmt""github.com/gek64/displayController""log"
)
funcmain() {
// Get the system display devicescompositeMonitors, err:=displayController.GetCompositeMonitors()
iferr!=nil {
log.Fatal(err)
}
// Travel in all display devices one by onefori, compositeMonitor:=rangecompositeMonitors {
fmt.Printf("Monitor No.%d\n", i)
fmt.Printf("PhysicalInfo:%v\n", compositeMonitor.PhysicalInfo)
fmt.Printf("SysInfo:%v\n", compositeMonitor.SysInfo)
// Get the current and maximum value of the brightness parameters of the physical displaycurrentValue, _, err:=displayController.GetVCPFeatureAndVCPFeatureReply(compositeMonitor.PhysicalInfo.Handle, displayController.Brightness)
iferr!=nil {
log.Println(err)
}
// Set the brightness of the current display to current valueerr=displayController.SetVCPFeature(compositeMonitor.PhysicalInfo.Handle, displayController.Brightness, currentValue)
iferr!=nil {
log.Println(err)
}
}
}
FAQ
What operating system does this module support?
It only supports Windows now, and support systems such as macOS, Linux kernel system and freeBSD will be considered in the future.
Get the display driver parameter normally, but the display monitor parameter cannot be obtained and controlled.
This program uses the VESADDC/CI Display communication standard protocol which release in 1998 to exchange data with physical display monitors. Most of the modern display supports and enables this feature by default, If you encounter this problem, please confirm whether the DDC/CI function has been opened in OSD menu, or contact your display manufacturer to get more relevant information
What other parameters can be customized?
Please refer to the following articles to get more custom parameters
How to find parameters supported by my own display monitor?
If the monitor does not support a certain parameter, the error will be returned when calling the command. You can use the error information to determine whether the monitor supports a certain parameter
You can use this tool to check which parameters that your monitor supported ControlMyMonitor
My monitor can't find the option to control DDC/CI
I've collected some uncommon ways to enable this feature for some well-known monitors, check instructions
Please consult the manufacturer of your monitor for instructions